fix: set a max-len rule for eslint

This commit is contained in:
Valeriy S
2019-02-22 16:38:45 +03:00
committed by mrugesh mohapatra
parent 1c6df3649b
commit 1faa8dc0c1
6 changed files with 20 additions and 1 deletions

View File

@ -3,6 +3,10 @@
"extends": ["@freecodecamp/eslint-config", "prettier", "prettier/react"], "extends": ["@freecodecamp/eslint-config", "prettier", "prettier/react"],
"plugins": ["prettier"], "plugins": ["prettier"],
"rules": { "rules": {
"max-len": [
"error",
{ "code": 80, "ignoreUrls": true, "ignoreTemplateLiterals": true }
],
"prettier/prettier": "error" "prettier/prettier": "error"
}, },
"settings": { "settings": {

View File

@ -180,6 +180,7 @@ describe('boot/challenge', () => {
}); });
}); });
// eslint-disable-next-line max-len
it('returns the first challenge url if the provided id does not relate to a challenge', async () => { it('returns the first challenge url if the provided id does not relate to a challenge', async () => {
const challengeUrlResolver = await createChallengeUrlResolver(mockApp, { const challengeUrlResolver = await createChallengeUrlResolver(mockApp, {
_getFirstChallenge: mockGetFirstChallenge _getFirstChallenge: mockGetFirstChallenge
@ -349,6 +350,7 @@ describe('boot/challenge', () => {
done(); done();
}); });
// eslint-disable-next-line max-len
it('redirects to the url provided by the challengeUrlResolver', async done => { it('redirects to the url provided by the challengeUrlResolver', async done => {
const challengeUrlResolver = await createChallengeUrlResolver(mockApp, { const challengeUrlResolver = await createChallengeUrlResolver(mockApp, {
_getFirstChallenge: mockGetFirstChallenge _getFirstChallenge: mockGetFirstChallenge
@ -369,6 +371,7 @@ describe('boot/challenge', () => {
done(); done();
}); });
// eslint-disable-next-line max-len
it('redirects to the first challenge for users without a currentChallengeId', async done => { it('redirects to the first challenge for users without a currentChallengeId', async done => {
const challengeUrlResolver = await createChallengeUrlResolver(mockApp, { const challengeUrlResolver = await createChallengeUrlResolver(mockApp, {
_getFirstChallenge: mockGetFirstChallenge _getFirstChallenge: mockGetFirstChallenge

View File

@ -161,6 +161,7 @@ describe('getSetAccessToken', () => {
}); });
describe('removeCookies', () => { describe('removeCookies', () => {
// eslint-disable-next-line max-len
it('removes four cookies set in the lifetime of an authenticated session', () => { it('removes four cookies set in the lifetime of an authenticated session', () => {
// expect.assertions(4); // expect.assertions(4);
const req = mockReq(); const req = mockReq();

View File

@ -21,6 +21,7 @@ import { Link, Spacer } from '../components/helpers';
import './common-pages.css'; import './common-pages.css';
/* eslint-disable max-len */
const AboutPage = () => { const AboutPage = () => {
return ( return (
<Fragment> <Fragment>
@ -335,6 +336,7 @@ const AboutPage = () => {
</Fragment> </Fragment>
); );
}; };
/* eslint-enable max-len */
AboutPage.displayName = 'AboutPage'; AboutPage.displayName = 'AboutPage';

View File

@ -83,6 +83,7 @@ class DonateOtherPage extends Component {
); );
} }
/* eslint-disable max-len */
render() { render() {
return ( return (
<Fragment> <Fragment>
@ -222,6 +223,7 @@ class DonateOtherPage extends Component {
</Fragment> </Fragment>
); );
} }
/* eslint-enable max-len */
} }
DonateOtherPage.displayName = 'DonateOtherPage'; DonateOtherPage.displayName = 'DonateOtherPage';

View File

@ -6,6 +6,7 @@ import { Link, Spacer } from '../components/helpers';
import './common-pages.css'; import './common-pages.css';
/* eslint-disable max-len */
const SupportPage = () => { const SupportPage = () => {
return ( return (
<Fragment> <Fragment>
@ -43,7 +44,12 @@ const SupportPage = () => {
cancel your donations right from your settings page. In the cancel your donations right from your settings page. In the
meantime, if you need to update or cancel your monthly donation, meantime, if you need to update or cancel your monthly donation,
forward an invoice you received in your email to{' '} forward an invoice you received in your email to{' '}
<a href='mailto:team@freecodecamp.org'>team@freecodecamp.org</a>{' '} {
/* prettier-ignore */
}
<a href='mailto:team@freecodecamp.org'>
team@freecodecamp.org
</a>{' '}
and tell us what you'd like us to do, and we'll take care of it and tell us what you'd like us to do, and we'll take care of it
for you in our database. for you in our database.
</p> </p>
@ -105,6 +111,7 @@ const SupportPage = () => {
</Fragment> </Fragment>
); );
}; };
/* eslint-enable max-len */
SupportPage.displayName = 'SupportPage'; SupportPage.displayName = 'SupportPage';