Skip to content

Commit

Permalink
Added js-styles/max-len to limit lines to 120 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Nov 24, 2024
1 parent 88250bf commit c8b572b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +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', { '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 c8b572b

Please sign in to comment.