Skip to content

Commit

Permalink
Added ignoring of template literals to js-styles/max-len
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui authored Nov 24, 2024
1 parent 649753b commit 31e5536
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ export default [
...js.configs.recommended.rules, ...regexp.configs['flat/recommended'].rules,
'indent': 'off', 'no-unexpected-multiline': 'off', 'key-spacing': 'off', // allow whitespace anywhere
'js-styles/no-trailing-spaces': 'error', // ...except at ends of lines
'js-styles/max-len': ['error', { // limit lines to 120 chars
'code': 120, 'ignoreComments': true, 'ignoreStrings': true, 'ignoreRegExpLiterals': true }],
'js-styles/max-len': ['error', { 'code': 120, // limit lines to 120 chars except if containing...
'ignoreComments': true, 'ignoreStrings': true, // ...trailing/own-line comments, quoted strings...
'ignoreTemplateLiterals': true, 'ignoreRegExpLiterals': true }], // ...or template/regex literals
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }], // enforce single quotes except backticks to avoid escaping quotes
'comma-dangle': ['error', 'never'], // enforce no trailing commas in arrays or objects
'no-async-promise-executor': 'off', // allow promise executor functions to be async (to accomodate await lines)
Expand Down

0 comments on commit 31e5536

Please sign in to comment.