Skip to content

Commit

Permalink
feat(max-len): ignore described eslint ignores (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
code-forger authored Apr 13, 2022
1 parent 1ea05ac commit 283f68e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,24 @@ module.exports = {
},
],
/* eslint-enable inclusive-language/use-inclusive-words -- Check for noninclusive words */

// https://eslint.org/docs/rules/max-len
'max-len': [
// Options from airbnb https://github.com/airbnb/javascript/blob/d8cb404da74c302506f91e5928f30cc75109e74d/packages/eslint-config-airbnb-base/rules/style.js#L198-L205
'error',
100,
2,
{
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
// Options we want to override
// Ignore comments that contain described eslint ignores, as these are often very long
ignorePattern: '^\\s*// eslint-disable-next-line.*?--',
},
],
},
overrides: [
{
Expand Down

0 comments on commit 283f68e

Please sign in to comment.