chore: update ESLint rules

This commit is contained in:
Jeff Williams 2020-12-24 09:10:50 -08:00
parent f57374e325
commit b10fb33462
2 changed files with 13 additions and 15 deletions

1
package-lock.json generated
View File

@ -4,6 +4,7 @@
"requires": true,
"packages": {
"": {
"name": "jsdoc",
"license": "Apache-2.0",
"devDependencies": {
"@jsdoc/eslint-config": "^1.0.8",

View File

@ -37,6 +37,7 @@ module.exports = {
'no-inner-declarations': ['error', 'functions'],
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-loss-of-precision': 'error',
'no-misleading-character-class': 'error',
'no-obj-calls': 'error',
'no-prototype-builtins': 'error',
@ -46,8 +47,11 @@ module.exports = {
'no-template-curly-in-string': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unreachable-loop': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unsafe-optional-chaining': 'error',
'no-useless-backreference': 'error',
'require-atomic-updates': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
@ -61,6 +65,7 @@ module.exports = {
'consistent-return': 'error',
curly: ['error', 'all'],
'default-case': 'error',
'default-case-last': 'error',
'default-param-last': 'error',
'dot-location': ['error', 'property'],
'dot-notation': 'error',
@ -98,6 +103,7 @@ module.exports = {
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-param-reassign': 'off',
@ -115,12 +121,14 @@ module.exports = {
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'no-void': 'error',
'no-warning-comments': 'off',
'no-with': 'error',
'prefer-named-capture-group': 'off', // TODO: enable
'prefer-promise-reject-errors': 'error',
'prefer-regex-literals': 'error',
radix: 'error',
@ -146,19 +154,6 @@ module.exports = {
'no-unused-vars': 'error',
'no-use-before-define': 'error',
// Node.js and CommonJS
'callback-return': 'off',
'global-require': 'off', // TODO: enable
'handle-callback-err': 'error',
'no-buffer-constructor': 'error',
'no-mixed-requires': 'error',
'no-new-require': 'error',
'no-path-concat': 'error',
'no-process-env': 'error',
'no-process-exit': 'error',
'no-restricted-modules': 'off',
'no-sync': 'off',
// Stylistic issues
'array-bracket-newline': 'off',
'array-bracket-spacing': ['error', 'never'],
@ -183,8 +178,9 @@ module.exports = {
'func-name-matching': ['error', 'always'],
'func-names': 'off',
'func-style': 'off',
'function-call-argument-newline:': 'off',
'function-paren-newline': 'off',
'id-blacklist': 'off',
'id-denylist': 'off',
'id-length': 'off',
'id-match': 'off',
'implicit-arrow-linebreak': 'off',
@ -338,12 +334,13 @@ module.exports = {
}
],
'no-new-symbol': 'error',
'no-restricted-exports': 'off',
'no-restricted-imports': 'off',
'no-this-before-super': 'error',
'no-useless-computed-key': 'error',
'no-useless-constructor': 'off',
'no-useless-rename': 'error',
'no-var': 'off',
'no-var': 'off', // TODO: enable
'object-shorthand': 'off',
'prefer-arrow-callback': 'off',
'prefer-const': 'off',