Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessarily overwritten recommended config #6

Merged
merged 7 commits into from Jul 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
158 changes: 73 additions & 85 deletions eslint.js
Expand Up @@ -2,141 +2,129 @@ module.exports = {
extends: ['eslint:recommended', 'plugin:node/recommended'],
plugins: ['node'],
rules: {
'curly': ['error', 'multi-line'],
// override recomennded
'no-console': 'off',
'no-path-concat': 'error',
'handle-callback-err': 'error',
'no-use-before-define': ['error', 'nofunc'],
'no-shadow-restricted-names': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-unused-vars': ['error', { args: 'none' }],
// Possible Errors
'no-extra-parens': ['error', 'all', {
conditionalAssign: false,
returnAssign: false,
nestedBinaryExpressions: false
}],
// Best Practices
'array-callback-return': 'error',
'block-scoped-var': 'error',
'curly': ['error', 'multi-line'],
'dot-location': ['error', 'property'],
'dot-notation': 'error',
'eqeqeq': ['error', 'allow-null'],
'no-else-return': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-redeclare': 'error',
'no-return-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-unused-expressions': ['error', {
allowShortCircuit: true,
allowTernary: true
}],
'no-useless-call': 'error',
'no-useless-concat': 'error',
'no-useless-return': 'error',
'no-proto': 'error',
'no-return-assign': 'error',
'no-void': 'error',
'no-with': 'error',
'prefer-promise-reject-errors': 'error',
'radix': 'error',
'no-self-compare': 'error',
'no-unused-vars': ['error', {
vars: 'all',
args: 'none'
'wrap-iife': 'error',
'yoda': ['error', 'never'],
// Strict Mode
'strict': 'error',
// Variables
'no-label-var': 'error',
'no-shadow-restricted-names': 'error',
'no-undef-init': 'error',
'no-use-before-define': ['error', 'nofunc'],
// Node.js and CommonJS
'handle-callback-err': 'error',
'no-mixed-operators': 'error',
'no-path-concat': 'error',
// Stylistic Issues
'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error', {
before: false,
after: true
}],
'indent': ['error', 2, {
SwitchCase: 1
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'eol-last': 'error',
'func-call-spacing': 'error',
'indent': ['error', 2, { SwitchCase: 1 }],
'key-spacing': ['error', {
beforeColon: false,
afterColon: true
}],
'keyword-spacing': ['error', {}],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'no-empty': ['error', {
allowEmptyCatch: true
}],
'brace-style': ['error', '1tbs', {
allowSingleLine: true
}],
'no-mixed-spaces-and-tabs': 'error',
'lines-around-comment': ['error', { beforeBlockComment: true }],
'new-cap': 'error',
'new-parens': 'error',
'no-array-constructor': 'error',
'no-extra-label': 'error',
'no-multiple-empty-lines': 'error',
'no-multi-str': 'error',
'no-nested-ternary': 'error',
'no-new-object': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'no-whitespace-before-property': 'error',
'one-var': ['error', {
uninitialized: 'always',
initialized: 'never'
}],
'dot-location': ['error', 'property'],
'operator-linebreak': ['error', 'before'],
'key-spacing': ['error', {
beforeColon: false,
afterColon: true
}],
'space-unary-ops': ['error', {
words: false,
nonwords: false
}],
'comma-spacing': ['error', {
before: false,
after: true
}],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'semi-spacing': ['error', {
before: false,
after: true
}],
'func-call-spacing': 'error',
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'space-in-parens': ['error', 'never'],
'comma-dangle': ['error', 'never'],
'no-trailing-spaces': 'error',
'yoda': ['error', 'never'],
'comma-style': ['error', 'last'],
'dot-notation': 'error',
'eol-last': 'error',
'wrap-iife': 'error',
'space-infix-ops': 'error',
'keyword-spacing': ['error', {}],
'space-before-blocks': ['error', 'always'],
'no-extra-parens': ['error', 'all', {
conditionalAssign: false,
returnAssign: false,
nestedBinaryExpressions: false
}],
'no-unsafe-negation': 'error',
'array-callback-return': 'error',
'no-empty-pattern': 'error',
'no-eval': 'error',
'no-extra-label': 'error',
'no-implicit-globals': 'error',
'no-new-func': 'error',
'no-new': 'error',
'no-proto': 'error',
'no-sequences': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'no-void': 'error',
'prefer-promise-reject-errors': 'error',
'no-label-var': 'error',
'no-undef-init': 'error',
'array-bracket-spacing': ['error', 'never'],
'computed-property-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'lines-around-comment': ['error', {
beforeBlockComment: true
'space-unary-ops': ['error', {
words: false,
nonwords: false
}],
'new-cap': 'error',
'new-parens': 'error',
'no-array-constructor': 'error',
'no-nested-ternary': 'error',
'no-new-object': 'error',
'no-unneeded-ternary': 'error',
'no-whitespace-before-property': 'error',
'spaced-comment': ['error', 'always'],
'template-tag-spacing': ['error', 'never'],
'unicode-bom': ['error', 'never'],
// ECMAScript 6
'arrow-spacing': 'error',
'generator-star-spacing': ['error', 'after'],
'no-confusing-arrow': ['error', {
allowParens: true
}],
'no-confusing-arrow': ['error', { allowParens: true }],
'no-duplicate-imports': 'error',
'no-useless-computed-key': 'error',
'no-useless-constructor': 'error',
'no-useless-rename': 'error',
'rest-spread-spacing': ['error', 'never'],
'template-curly-spacing': ['error', 'never'],
'yield-star-spacing': ['error', 'after'],
'no-mixed-operators': 'error',
'strict': 'error'
'yield-star-spacing': ['error', 'after']
},
env: {
node: true,
Expand Down