triston-notes/+ Encounters/EsLint Rules To apply over time.md

31 lines
1000 B
Markdown
Raw Normal View History

2023-10-21 23:52:54 +00:00
```JSON
'max-lines-per-function': ['error', { max: 60, skipBlankLines: true, skipComments: true, IIFEs: true }],
camelcase: 'error',
complexity: ['error', 2],
'func-style': ['warn', 'declaration', { allowArrowFunctions: true }],
'max-depth': ['error', 2],
'max-nested-callbacks': ['warn', 1],
'no-confusing-arrow': 'error',
'no-console': 'warn',
'no-else-return': ['error', { allowElseIf: false }],
'no-extra-boolean-cast': 'error',
'no-lonely-if': 'error',
'no-magic-numbers': 'warn',
'no-negated-condition': 'warn',
'no-nested-ternary': 'error',
'no-unneeded-ternary': 'error',
'no-param-reassign': ['error', { props: true }],
'no-return-assign': 'error',
'no-return-await': 'warn',
'no-throw-literal': 'error',
'no-var': 'error',
'prefer-arrow-callback': 'error',
'prefer-object-has-own': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
'require-await': 'warn',
'vars-on-top': 'error',
yoda: ['error', 'never', { exceptRange: true }],
semi: ['error', 'never']
```