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"],
"plugins": ["prettier"],
"rules": {
"max-len": [
"error",
{ "code": 80, "ignoreUrls": true, "ignoreTemplateLiterals": true }
],
"prettier/prettier": "error"
},
"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 () => {
const challengeUrlResolver = await createChallengeUrlResolver(mockApp, {
_getFirstChallenge: mockGetFirstChallenge
@ -349,6 +350,7 @@ describe('boot/challenge', () => {
done();
});
// eslint-disable-next-line max-len
it('redirects to the url provided by the challengeUrlResolver', async done => {
const challengeUrlResolver = await createChallengeUrlResolver(mockApp, {
_getFirstChallenge: mockGetFirstChallenge
@ -369,6 +371,7 @@ describe('boot/challenge', () => {
done();
});
// eslint-disable-next-line max-len
it('redirects to the first challenge for users without a currentChallengeId', async done => {
const challengeUrlResolver = await createChallengeUrlResolver(mockApp, {
_getFirstChallenge: mockGetFirstChallenge

View File

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

View File

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

View File

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

View File

@ -6,6 +6,7 @@ import { Link, Spacer } from '../components/helpers';
import './common-pages.css';
/* eslint-disable max-len */
const SupportPage = () => {
return (
<Fragment>
@ -43,7 +44,12 @@ const SupportPage = () => {
cancel your donations right from your settings page. In the
meantime, if you need to update or cancel your monthly donation,
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
for you in our database.
</p>
@ -105,6 +111,7 @@ const SupportPage = () => {
</Fragment>
);
};
/* eslint-enable max-len */
SupportPage.displayName = 'SupportPage';