more config
This commit is contained in:
parent
a7be394b23
commit
46d36cbc70
86
index.js
86
index.js
@ -63,55 +63,55 @@ module.exports = {
|
|||||||
'no-param-reassign': 'error',
|
'no-param-reassign': 'error',
|
||||||
'no-proto': 'error',
|
'no-proto': 'error',
|
||||||
'no-restricted-properties': 'error',
|
'no-restricted-properties': 'error',
|
||||||
'no-return-assign': null, // https://eslint.org/docs/rules/no-return-assign // disallow assignment operators in `return` statements
|
'no-return-assign': ['error', 'except-parens'],
|
||||||
'no-return-await': 'error',
|
'no-return-await': 'error',
|
||||||
'no-script-url': null, // https://eslint.org/docs/rules/no-script-url // disallow `javascript:` urls
|
'no-script-url': 'error',
|
||||||
'no-self-compare': 'error',
|
'no-self-compare': 'error',
|
||||||
'no-sequences': null, // https://eslint.org/docs/rules/no-sequences // disallow comma operators
|
'no-sequences': 'error',
|
||||||
'no-throw-literal': null, // https://eslint.org/docs/rules/no-throw-literal // disallow throwing literals as exceptions
|
'no-throw-literal': 'error',
|
||||||
'no-unmodified-loop-condition': null, // https://eslint.org/docs/rules/no-unmodified-loop-condition // disallow unmodified loop conditions
|
'no-unmodified-loop-condition': 'error',
|
||||||
'no-unused-expressions': 'error',
|
'no-unused-expressions': 'error',
|
||||||
'no-useless-call': null, // https://eslint.org/docs/rules/no-useless-call // disallow unnecessary calls to `.call()` and `.apply()`
|
'no-useless-call': 'error',
|
||||||
'no-useless-concat': 'error',
|
'no-useless-concat': 'error',
|
||||||
'no-useless-return': 'error',
|
'no-useless-return': 'error',
|
||||||
'no-void': null, // https://eslint.org/docs/rules/no-void // disallow `void` operators
|
'no-void': 'error',
|
||||||
'no-warning-comments': null, // https://eslint.org/docs/rules/no-warning-comments // disallow specified warning terms in comments
|
'no-warning-comments': 'warn',
|
||||||
'prefer-named-capture-group': null, // https://eslint.org/docs/rules/prefer-named-capture-group // enforce using named capture group in regular expression
|
'prefer-named-capture-group': 'warn',
|
||||||
'prefer-promise-reject-errors': null, // https://eslint.org/docs/rules/prefer-promise-reject-errors // require using Error objects as Promise rejection reasons
|
'prefer-promise-reject-errors': 'error',
|
||||||
'prefer-regex-literals': null, // https://eslint.org/docs/rules/prefer-regex-literals // disallow use of the `RegExp` constructor in favor of regular expression literals
|
'prefer-regex-literals': 'error',
|
||||||
radix: '', // enforce the consistent use of the radix argument when using `parseInt()`
|
radix: ['error', 'as-needed'],
|
||||||
'require-await': 'error',
|
'require-await': 'error',
|
||||||
'require-unicode-regexp': null, // https://eslint.org/docs/rules/require-unicode-regexp // enforce the use of `u` flag on RegExp
|
'require-unicode-regexp': 'error',
|
||||||
'vars-on-top': 'error',
|
'vars-on-top': 'error',
|
||||||
'wrap-iife': null, // https://eslint.org/docs/rules/wrap-iife // require parentheses around immediate `function` invocations
|
'wrap-iife': ['error', 'inside'],
|
||||||
yoda: '', // require or disallow "Yoda" conditions
|
yoda: ['error', 'always', { exceptRange: true }],
|
||||||
// ## Strict Mode
|
|
||||||
// These rules relate to strict mode directives:
|
// Strict Mode https://eslint.org/docs/rules/#strict-mode
|
||||||
strict: ['error', 'safe'],
|
strict: ['error', 'safe'],
|
||||||
// ## Variables
|
|
||||||
// These rules relate to variable declarations:
|
// Variables https://eslint.org/docs/rules/#variables
|
||||||
'init-declarations': null, // https://eslint.org/docs/rules/init-declarations // require or disallow initialization in variable declarations
|
'init-declarations': ['error', 'always'],
|
||||||
'no-label-var': null, // https://eslint.org/docs/rules/no-label-var // disallow labels that share a name with a variable
|
'no-label-var': 'error',
|
||||||
'no-restricted-globals': null, // https://eslint.org/docs/rules/no-restricted-globals // disallow specified global variables
|
'no-restricted-globals': 'off',
|
||||||
'no-shadow': null, // https://eslint.org/docs/rules/no-shadow // disallow variable declarations from shadowing variables declared in the outer scope
|
'no-shadow': ['error', { builtinGlobals: true, hoist: 'all' }],
|
||||||
'no-undef-init': null, // https://eslint.org/docs/rules/no-undef-init // disallow initializing variables to `undefined`
|
'no-undef-init': 'error',
|
||||||
'no-undefined': null, // https://eslint.org/docs/rules/no-undefined // disallow the use of `undefined` as an identifier
|
'no-undefined': 'error',
|
||||||
'no-use-before-define': null, // https://eslint.org/docs/rules/no-use-before-define // disallow the use of variables before they are defined
|
'no-use-before-define': 'error',
|
||||||
// ## Node.js and CommonJS
|
|
||||||
// These rules relate to code running in Node.js, or in browsers with CommonJS:
|
// Node.js and CommonJS https://eslint.org/docs/rules/#node-js-and-commonjs
|
||||||
'callback-return': null, // https://eslint.org/docs/rules/callback-return // require `return` statements after callbacks
|
'callback-return': 'error',
|
||||||
'global-require': null, // https://eslint.org/docs/rules/global-require // require `require()` calls to be placed at top-level module scope
|
'global-require': 'error',
|
||||||
'handle-callback-err': null, // https://eslint.org/docs/rules/handle-callback-err // require error handling in callbacks
|
'handle-callback-err': 'error',
|
||||||
'no-buffer-constructor': null, // https://eslint.org/docs/rules/no-buffer-constructor // disallow use of the `Buffer()` constructor
|
'no-buffer-constructor': 'error',
|
||||||
'no-mixed-requires': null, // https://eslint.org/docs/rules/no-mixed-requires // disallow `require` calls to be mixed with regular variable declarations
|
'no-mixed-requires': 'error',
|
||||||
'no-new-require': null, // https://eslint.org/docs/rules/no-new-require // disallow `new` operators with calls to `require`
|
'no-new-require': 'error',
|
||||||
'no-path-concat': null, // https://eslint.org/docs/rules/no-path-concat // disallow string concatenation with `__dirname` and `__filename`
|
'no-path-concat': 'error',
|
||||||
'no-process-env': null, // https://eslint.org/docs/rules/no-process-env // disallow the use of `process.env`
|
'no-process-env': 'warn',
|
||||||
'no-process-exit': null, // https://eslint.org/docs/rules/no-process-exit // disallow the use of `process.exit()`
|
'no-process-exit': 'warn',
|
||||||
'no-restricted-modules': null, // https://eslint.org/docs/rules/no-restricted-modules // disallow specified modules when loaded by `require`
|
'no-restricted-modules': 'off',
|
||||||
'no-sync': null, // https://eslint.org/docs/rules/no-sync // disallow synchronous methods
|
'no-sync': ['error', { allowAtRootLevel: true }],
|
||||||
// ## Stylistic Issues
|
|
||||||
// These rules relate to style guidelines, and are therefore quite subjective:
|
// Stylistic Issues https://eslint.org/docs/rules/#stylistic-issues
|
||||||
'array-bracket-newline': null, // https://eslint.org/docs/rules/array-bracket-newline // enforce linebreaks after opening and before closing array brackets
|
'array-bracket-newline': null, // https://eslint.org/docs/rules/array-bracket-newline // enforce linebreaks after opening and before closing array brackets
|
||||||
'array-bracket-spacing': null, // https://eslint.org/docs/rules/array-bracket-spacing // enforce consistent spacing inside array brackets
|
'array-bracket-spacing': null, // https://eslint.org/docs/rules/array-bracket-spacing // enforce consistent spacing inside array brackets
|
||||||
'array-element-newline': null, // https://eslint.org/docs/rules/array-element-newline // enforce line breaks after each array element
|
'array-element-newline': null, // https://eslint.org/docs/rules/array-element-newline // enforce line breaks after each array element
|
||||||
@ -204,8 +204,8 @@ module.exports = {
|
|||||||
'template-tag-spacing': null, // https://eslint.org/docs/rules/template-tag-spacing // require or disallow spacing between template tags and their literals
|
'template-tag-spacing': null, // https://eslint.org/docs/rules/template-tag-spacing // require or disallow spacing between template tags and their literals
|
||||||
'unicode-bom': null, // https://eslint.org/docs/rules/unicode-bom // require or disallow Unicode byte order mark (BOM)
|
'unicode-bom': null, // https://eslint.org/docs/rules/unicode-bom // require or disallow Unicode byte order mark (BOM)
|
||||||
'wrap-regex': null, // https://eslint.org/docs/rules/wrap-regex // require parenthesis around regex literals
|
'wrap-regex': null, // https://eslint.org/docs/rules/wrap-regex // require parenthesis around regex literals
|
||||||
// ## ECMAScript 6
|
|
||||||
// These rules relate to ES6, also known as ES2015:
|
// ECMAScript 6 https://eslint.org/docs/rules/#ecmascript-6
|
||||||
'arrow-body-style': null, // https://eslint.org/docs/rules/arrow-body-style // require braces around arrow function bodies
|
'arrow-body-style': null, // https://eslint.org/docs/rules/arrow-body-style // require braces around arrow function bodies
|
||||||
'arrow-parens': null, // https://eslint.org/docs/rules/arrow-parens // require parentheses around arrow function arguments
|
'arrow-parens': null, // https://eslint.org/docs/rules/arrow-parens // require parentheses around arrow function arguments
|
||||||
'arrow-spacing': null, // https://eslint.org/docs/rules/arrow-spacing // enforce consistent spacing before and after the arrow in arrow functions
|
'arrow-spacing': null, // https://eslint.org/docs/rules/arrow-spacing // enforce consistent spacing before and after the arrow in arrow functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user