diff --git a/.eslintrc.json b/.eslintrc.json
index a2a145dc2e..3921b8dec7 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,6 +1,6 @@
{
"extends": ["plugin:react/recommended", "@freecodecamp/eslint-config"],
- "rules": { "no-shadow": 0 },
+ "rules": { "no-shadow": 0, "react/no-unescaped-entities": 0 },
"settings": {
"react": {
"version": "16.4.2"
diff --git a/client/plugins/fcc-create-nav-data/create-navigation-node.test.js b/client/plugins/fcc-create-nav-data/create-navigation-node.test.js
index 2f6e7d71f0..50fbb80d3f 100644
--- a/client/plugins/fcc-create-nav-data/create-navigation-node.test.js
+++ b/client/plugins/fcc-create-nav-data/create-navigation-node.test.js
@@ -43,13 +43,21 @@ describe('fcc-create-nav-data', () => {
expect(result.dashedName).equal('file-writing');
});
- it('node.path should equal the file path from pagesDir, prefixed with `/guide`', () => {
- expect(result.path).to.equal('/guide/php/functions/files/file-writing');
- });
+ it(
+ 'node.path should equal the file path from pagesDir, ' +
+ 'prefixed with `/guide`',
+ () => {
+ expect(result.path).to.equal('/guide/php/functions/files/file-writing');
+ }
+ );
- it('node.parentPath should equal the path of the parent page, prefixed with `/guide`', () => {
- expect(result.parentPath).to.equal('/guide/php/functions/files');
- });
+ it(
+ 'node.parentPath should equal the path of the parent page, ' +
+ 'prefixed with `/guide`',
+ () => {
+ expect(result.parentPath).to.equal('/guide/php/functions/files');
+ }
+ );
it('node.title should equal srcNode.frontmatter.title', () => {
expect(result.title).to.equal(mockNode.frontmatter.title);
diff --git a/client/src/client-only-routes/ShowSettings.js b/client/src/client-only-routes/ShowSettings.js
index 4737d519c8..65d32cbe32 100644
--- a/client/src/client-only-routes/ShowSettings.js
+++ b/client/src/client-only-routes/ShowSettings.js
@@ -258,7 +258,6 @@ function ShowSettings(props) {
verifyCert={verifyCert}
/>
- {/* */}
diff --git a/client/src/components/Donation/components/DonateForm.js b/client/src/components/Donation/components/DonateForm.js
index e133a04374..f3a798cd63 100644
--- a/client/src/components/Donation/components/DonateForm.js
+++ b/client/src/components/Donation/components/DonateForm.js
@@ -21,6 +21,7 @@ import { userSelector, isSignedInSelector } from '../../../redux';
const propTypes = {
email: PropTypes.string,
+ isSignedIn: PropTypes.bool,
stripe: PropTypes.shape({
createToken: PropTypes.func.isRequired
})
@@ -120,9 +121,9 @@ class DonateForm extends Component {
}
}));
- const chargeStripePath = isSignedIn ?
- `/internal/donate/charge-stripe` :
- `${apiLocation}/unauthenticated/donate/charge-stripe`;
+ const chargeStripePath = isSignedIn
+ ? `${apiLocation}/internal/donate/charge-stripe`
+ : `${apiLocation}/unauthenticated/donate/charge-stripe`;
return postJSON$(chargeStripePath, {
token,
amount
@@ -151,7 +152,7 @@ class DonateForm extends Component {
}
resetDonation() {
- return this.setState({...initialState});
+ return this.setState({ ...initialState });
}
renderCompletion(props) {
diff --git a/client/src/components/Footer/index.js b/client/src/components/Footer/index.js
index e36c893045..f93545a431 100644
--- a/client/src/components/Footer/index.js
+++ b/client/src/components/Footer/index.js
@@ -1,14 +1,22 @@
import React from 'react';
+import PropTypes from 'prop-types';
import { Link as GatsbyLink } from 'gatsby';
import { Grid, Row, Col } from '@freecodecamp/react-bootstrap';
import './footer.css';
+const propTypes = {
+ children: PropTypes.any,
+ external: PropTypes.bool,
+ to: PropTypes.string.isRequired
+};
+
const ColHeader = ({ children, ...other }) => (
{children}
);
+ColHeader.propTypes = propTypes;
const Link = ({ children, to, external, ...other }) => {
if (!external && (/^\/(?!\/)/).test(to)) {
@@ -25,6 +33,7 @@ const Link = ({ children, to, external, ...other }) => {
);
};
+Link.propTypes = propTypes;
function Footer() {
return (
diff --git a/client/src/components/Map/components/Block.js b/client/src/components/Map/components/Block.js
index eab7378195..052f3dd8c7 100644
--- a/client/src/components/Map/components/Block.js
+++ b/client/src/components/Map/components/Block.js
@@ -109,7 +109,13 @@ export class Block extends Component {
}
render() {
- const { blockDashedName, completedChallenges, challenges, isExpanded, intro } = this.props;
+ const {
+ blockDashedName,
+ completedChallenges,
+ challenges,
+ isExpanded,
+ intro
+ } = this.props;
let completedCount = 0;
const challengesWithCompleted = challenges.map(challenge => {
const { id } = challenge;
diff --git a/client/src/components/formHelpers/index.js b/client/src/components/formHelpers/index.js
index ec9c9e182c..41e5377d6a 100644
--- a/client/src/components/formHelpers/index.js
+++ b/client/src/components/formHelpers/index.js
@@ -65,7 +65,7 @@ export function getValidationState(field) {
return null;
}
- if (/https?:\/\/glitch\.com\/edit\/#!\/.*/g.test(field.value)) {
+ if ((/https?:\/\/glitch\.com\/edit\/#!\/.*/g).test(field.value)) {
return 'glitch-warning';
}
diff --git a/client/src/components/settings/Certification.js b/client/src/components/settings/Certification.js
index a595f65e20..b7d7ad4456 100644
--- a/client/src/components/settings/Certification.js
+++ b/client/src/components/settings/Certification.js
@@ -78,12 +78,8 @@ const isCertMapSelector = createSelector(
is2018DataVisCert,
isApisMicroservicesCert,
isJsAlgoDataStructCert,
- isBackEndCert,
- isDataVisCert,
- isFrontEndCert,
isInfosecQaCert,
isFrontEndLibsCert,
- isFullStackCert,
isRespWebDesignCert
}) => ({
'Responsive Web Design': isRespWebDesignCert,
diff --git a/client/src/head/favicons.js b/client/src/head/favicons.js
index 6e05fb5071..06a3f579d5 100644
--- a/client/src/head/favicons.js
+++ b/client/src/head/favicons.js
@@ -3,32 +3,53 @@ import React from 'react';
const favicons = [
,
,
,
,
- ,
- ,
- ,
- ,
-
+ ,
+ ,
+ ,
+ ,
+
];
export default favicons;
diff --git a/client/src/head/meta.js b/client/src/head/meta.js
index c614950b8f..bb788268a9 100644
--- a/client/src/head/meta.js
+++ b/client/src/head/meta.js
@@ -1,16 +1,22 @@
import React from 'react';
const meta = [
- ,
- ,
- ,
- ,
+ ,
+ ,
+ ,
+ ,
,
];
diff --git a/client/src/head/preloads.js b/client/src/head/preloads.js
index f3c4647cb3..c38f582a4f 100644
--- a/client/src/head/preloads.js
+++ b/client/src/head/preloads.js
@@ -1,14 +1,9 @@
import React from 'react';
import styleSheets from './styleSheets';
-const preloads = styleSheets.map((styleSheet, i) => (
-
-
+const preloads = styleSheets.map(styleSheet => (
+
+
{styleSheet}
));
diff --git a/client/src/head/scripts.js b/client/src/head/scripts.js
index dbf3da2f4a..09c3064fbd 100644
--- a/client/src/head/scripts.js
+++ b/client/src/head/scripts.js
@@ -3,6 +3,7 @@ import React from 'react';
const scripts = [
];
diff --git a/client/src/head/styleSheets.js b/client/src/head/styleSheets.js
index 3e87245b43..0ede0cef81 100644
--- a/client/src/head/styleSheets.js
+++ b/client/src/head/styleSheets.js
@@ -1,8 +1,3 @@
-import React from 'react';
-
-const styleSheets = [
- // bootstrap v3.3.7
-
-];
+const styleSheets = [];
export default styleSheets;
diff --git a/client/src/resources/honesty-policy.js b/client/src/resources/honesty-policy.js
index 3233f799fc..ec542c858f 100644
--- a/client/src/resources/honesty-policy.js
+++ b/client/src/resources/honesty-policy.js
@@ -1,43 +1,43 @@
import React from 'react';
const policy = [
-
+
Before we issue our verified certification to a camper, he or she must
accept our Academic Honesty Pledge, which reads:
,
-
+
"I understand that plagiarism means copying someone else’s work and
presenting the work as if it were my own, without clearly attributing the
original author."
,
-
+
"I understand that plagiarism is an act of intellectual dishonesty, and that
people usually get kicked out of university or fired from their jobs if they
get caught plagiarizing".
,
-
+
"Aside from using open source libraries such as jQuery and Bootstrap, and
short snippets of code which are clearly attributed to their original
author, 100% of the code in my projects was written by me, or along with
another camper with whom I was pair programming in real time."
,
-
+
"I pledge that I did not plagiarize any of my freeCodeCamp.org work. I
understand that freeCodeCamp.org’s team will audit my projects to confirm
this."
,
-
+
In the situations where we discover instances of unambiguous plagiarism, we
will replace the camper in question’s certification with a message that
"Upon review, this account has been flagged for academic dishonesty."
,
-
+
As an academic institution that grants achievement-based certifications, we
take academic honesty very seriously. If you have any questions about this
policy, or suspect that someone has violated it, you can email{' '}
team@freecodecamp.org
and we will investigate.
-].map((el, i) => ({...el, key: `honesty-${i}`}));
+];
export default policy;
diff --git a/client/src/templates/Challenges/components/Preview.js b/client/src/templates/Challenges/components/Preview.js
index 2e8593846e..78c517b083 100644
--- a/client/src/templates/Challenges/components/Preview.js
+++ b/client/src/templates/Challenges/components/Preview.js
@@ -47,7 +47,11 @@ class Preview extends Component {
const iframeToggle = this.state.iframeStatus ? 'disable' : 'enable';
return (
-
+
);
}
diff --git a/client/src/templates/Introduction/Intro.js b/client/src/templates/Introduction/Intro.js
index 566769573e..6abd63189c 100644
--- a/client/src/templates/Introduction/Intro.js
+++ b/client/src/templates/Introduction/Intro.js
@@ -52,7 +52,10 @@ function IntroductionPage({ data: { markdownRemark, allChallengeNode } }) {
/>
-
+
Go to the first lesson