Skip to content

Commit f133168

Browse files
authored
Added js-styles/max-len to limit lines to 120 chars
1 parent 7cda52b commit f133168

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export default [
1313
...js.configs.recommended.rules,
1414
'indent': 'off', 'no-unexpected-multiline': 'off', 'key-spacing': 'off', // allow whitespace anywhere
1515
'js-styles/no-trailing-spaces': 'error', // ...except at ends of lines
16+
'js-styles/max-len': ['error', { 'code': 120, // limit lines to 120 chars except if containing...
17+
'ignoreComments': true, 'ignoreStrings': true, // ...trailing/own-line comments, quoted strings...
18+
'ignoreTemplateLiterals': true, 'ignoreRegExpLiterals': true }], // ...or template/regex literals
1619
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }], // enforce single quotes except backticks to avoid escaping quotes
1720
'comma-dangle': ['error', 'never'], // enforce no trailing commas in arrays or objects
1821
'no-async-promise-executor': 'off', // allow promise executor functions to be async (to accomodate await lines)

0 commit comments

Comments
 (0)