eslint-config-adpyke-es6
Version:
A nice ESLint preset for ES6
131 lines (129 loc) • 3.52 kB
JavaScript
'use strict';
module.exports = {
extends: 'eslint:recommended',
rules: {
'no-console': 'off',
'require-atomic-updates': 0,
'comma-dangle': 2,
eqeqeq: [2, 'always', { null: 'ignore' }],
'global-require': 2,
'new-parens': 2,
'no-array-constructor': 2,
'no-buffer-constructor': 2,
'no-caller': 2,
'no-duplicate-imports': 2,
'no-eval': 2,
'no-implicit-globals': 2,
'no-implied-eval': 2,
'no-invalid-this': 2,
'no-iterator': 2,
'no-labels': 2,
'no-multi-str': 2,
'no-new-func': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-wrappers': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-return-await': 2,
'no-script-url': 2,
'no-self-compare': 2,
'no-shadow-restricted-names': 2,
'no-throw-literal': 2,
'no-var': 2,
'no-void': 2,
'no-whitespace-before-property': 2,
'no-with': 2,
'prefer-promise-reject-errors': 2,
'prefer-rest-params': 2,
'require-await': 2,
'rest-spread-spacing': 2,
semi: 2,
'semi-style': 2,
strict: 2,
'wrap-iife': 2,
'require-unicode-regexp': 2,
'arrow-body-style': 1,
'array-bracket-newline': [1, 'consistent'],
'array-bracket-spacing': 1,
'arrow-parens': [1, 'as-needed'],
'arrow-spacing': 1,
'block-spacing': 1,
'brace-style': [1, '1tbs', { allowSingleLine: true }],
'comma-spacing': 1,
'comma-style': 1,
'computed-property-spacing': 1,
'dot-notation': 1,
'eol-last': 1,
'function-paren-newline': [1, 'consistent'],
'generator-star-spacing': [1, { before: false, after: false, named: 'after' }],
indent: [1, 'tab', { SwitchCase: 1, flatTernaryExpressions: true }],
'jsx-quotes': [1, 'prefer-single'],
'key-spacing': 1,
'keyword-spacing': 1,
'no-empty-function': 1,
'no-extra-bind': 1,
'no-floating-decimal': 1,
'no-lone-blocks': 1,
'no-lonely-if': 1,
'no-mixed-operators': 1,
'no-mixed-spaces-and-tabs': [1, 'smart-tabs'],
'no-multi-spaces': 1,
'no-multiple-empty-lines': [1, { max: 2, maxEOF: 0, maxBOF: 0 }],
'no-trailing-spaces': 1,
'no-undef-init': 1,
'no-unneeded-ternary': 1,
'no-useless-call': 1,
'no-useless-computed-key': 1,
'no-useless-concat': 1,
'no-useless-constructor': 1,
'no-useless-escape': 1,
'no-useless-rename': 1,
'no-useless-return': 1,
'no-unused-vars': [
1,
{
args: 'after-used',
ignoreRestSiblings: true,
argsIgnorePattern: '^_+$',
varsIgnorePattern: '^_+$'
}
],
'nonblock-statement-body-position': 1,
'object-curly-newline': [1, { consistent: true }],
'object-curly-spacing': [1, 'always'],
'object-shorthand': 1,
'operator-assignment': 1,
'operator-linebreak': [1, 'before'],
'padded-blocks': [1, 'never'],
'prefer-arrow-callback': 1,
'prefer-const': [1, { destructuring: 'all' }],
'prefer-spread': 1,
quotes: [1, 'single', { avoidEscape: true }],
'semi-spacing': 1,
'space-before-blocks': 1,
'space-before-function-paren': [1, 'never'],
'space-in-parens': 1,
'space-unary-ops': 1,
'spaced-comment': 1,
'switch-colon-spacing': 1,
'template-curly-spacing': 1,
yoda: 1,
'func-call-spacing': 1,
'func-style': 1,
'no-unmodified-loop-condition': 1,
'no-unused-expressions': [
1,
{ allowShortCircuit: true, allowTernary: true, allowTaggedTemplates: true }
],
'dot-location': [1, 'property']
},
parserOptions: {
ecmaVersion: 2018
},
env: {
es6: true,
browser: true
}
};