eslint-config-xo
Advanced tools
Comparing version 0.25.0 to 0.25.1
@@ -8,4 +8,12 @@ 'use strict'; | ||
'no-var': 'error', | ||
'object-shorthand': ['error', 'always'], | ||
'prefer-arrow-callback': ['error', {allowNamedFunctions: true}], | ||
'object-shorthand': [ | ||
'error', | ||
'always' | ||
], | ||
'prefer-arrow-callback': [ | ||
'error', | ||
{ | ||
allowNamedFunctions: true | ||
} | ||
], | ||
'prefer-const': [ | ||
@@ -12,0 +20,0 @@ 'error', |
460
index.js
@@ -5,3 +5,3 @@ 'use strict'; | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
ecmaVersion: 2019, | ||
sourceType: 'module', | ||
@@ -17,3 +17,6 @@ ecmaFeatures: { | ||
rules: { | ||
'comma-dangle': ['error', 'never'], | ||
'comma-dangle': [ | ||
'error', | ||
'never' | ||
], | ||
'for-direction': 'error', | ||
@@ -32,5 +35,8 @@ 'getter-return': 'error', | ||
'no-empty-character-class': 'error', | ||
'no-empty': ['error', { | ||
allowEmptyCatch: true | ||
}], | ||
'no-empty': [ | ||
'error', | ||
{ | ||
allowEmptyCatch: true | ||
} | ||
], | ||
'no-ex-assign': 'error', | ||
@@ -59,3 +65,8 @@ 'no-extra-boolean-cast': 'error', | ||
'use-isnan': 'error', | ||
'valid-typeof': ['error', {requireStringLiterals: false}], | ||
'valid-typeof': [ | ||
'error', | ||
{ | ||
requireStringLiterals: false | ||
} | ||
], | ||
'no-unexpected-multiline': 'error', | ||
@@ -69,3 +80,6 @@ 'accessor-pairs': 'error', | ||
'dot-notation': 'error', | ||
'dot-location': ['error', 'property'], | ||
'dot-location': [ | ||
'error', | ||
'property' | ||
], | ||
eqeqeq: 'error', | ||
@@ -77,5 +91,8 @@ 'guard-for-in': 'error', | ||
'no-div-regex': 'error', | ||
'no-else-return': ['error', { | ||
allowElseIf: false | ||
}], | ||
'no-else-return': [ | ||
'error', | ||
{ | ||
allowElseIf: false | ||
} | ||
], | ||
'no-empty-pattern': 'error', | ||
@@ -105,6 +122,14 @@ 'no-eq-null': 'error', | ||
'no-redeclare': 'error', | ||
'no-return-assign': ['error', 'always'], | ||
'no-return-assign': [ | ||
'error', | ||
'always' | ||
], | ||
'no-return-await': 'error', | ||
'no-script-url': 'error', | ||
'no-self-assign': ['error', {props: true}], | ||
'no-self-assign': [ | ||
'error', | ||
{ | ||
props: true | ||
} | ||
], | ||
'no-self-compare': 'error', | ||
@@ -123,5 +148,9 @@ 'no-sequences': 'error', | ||
'no-with': 'error', | ||
'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}], | ||
'prefer-promise-reject-errors': [ | ||
'error', | ||
{ | ||
allowEmptyReject: true | ||
} | ||
], | ||
radix: 'error', | ||
'require-await': 'error', | ||
@@ -133,16 +162,31 @@ // Disabled for now as it causes too much churn | ||
'wrap-iife': ['error', 'inside', {functionPrototypeMethods: true}], | ||
'wrap-iife': [ | ||
'error', | ||
'inside', | ||
{ | ||
functionPrototypeMethods: true | ||
} | ||
], | ||
yoda: 'error', | ||
'no-delete-var': 'error', | ||
'no-label-var': 'error', | ||
'no-restricted-globals': ['error', 'event'], | ||
'no-restricted-globals': [ | ||
'error', | ||
'event' | ||
], | ||
'no-shadow-restricted-names': 'error', | ||
'no-undef-init': 'error', | ||
'no-undef': ['error', { | ||
typeof: true | ||
}], | ||
'no-unused-vars': ['error', { | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_$' | ||
}], | ||
'no-undef': [ | ||
'error', | ||
{ | ||
typeof: true | ||
} | ||
], | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_$' | ||
} | ||
], | ||
// Disabled because of https://github.com/eslint/eslint/issues/3420 | ||
@@ -152,56 +196,135 @@ // 'callback-return': ['warn', ['cb', 'callback', 'next', 'done']], | ||
'no-buffer-constructor': 'error', | ||
'no-mixed-requires': ['error', { | ||
grouping: true, | ||
allowCall: true | ||
}], | ||
'no-mixed-requires': [ | ||
'error', | ||
{ | ||
grouping: true, | ||
allowCall: true | ||
} | ||
], | ||
'no-new-require': 'error', | ||
'no-path-concat': 'error', | ||
'no-restricted-imports': ['error', 'domain', 'freelist', 'smalloc', 'sys', 'colors'], | ||
'no-restricted-modules': ['error', 'domain', 'freelist', 'smalloc', 'sys', 'colors'], | ||
'array-bracket-newline': ['error', 'consistent'], | ||
'array-bracket-spacing': ['error', 'never'], | ||
'array-element-newline': ['error', 'consistent'], | ||
'brace-style': ['error', '1tbs', { | ||
allowSingleLine: false | ||
}], | ||
camelcase: ['error', { | ||
properties: 'always' | ||
}], | ||
'capitalized-comments': ['error', 'always', { | ||
// You can also ignore this rule by wrapping the first word in quotes | ||
ignorePattern: 'pragma|ignore|prettier-ignore', | ||
ignoreInlineComments: true, | ||
ignoreConsecutiveComments: true | ||
}], | ||
'comma-spacing': ['error', { | ||
before: false, | ||
after: true | ||
}], | ||
'comma-style': ['error', 'last'], | ||
'computed-property-spacing': ['error', 'never'], | ||
'no-restricted-imports': [ | ||
'error', | ||
'domain', | ||
'freelist', | ||
'smalloc', | ||
'sys', | ||
'colors' | ||
], | ||
'no-restricted-modules': [ | ||
'error', | ||
'domain', | ||
'freelist', | ||
'smalloc', | ||
'sys', | ||
'colors' | ||
], | ||
'array-bracket-newline': [ | ||
'error', | ||
'consistent' | ||
], | ||
'array-bracket-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
'array-element-newline': [ | ||
'error', | ||
'consistent' | ||
], | ||
'brace-style': [ | ||
'error', | ||
'1tbs', | ||
{ | ||
allowSingleLine: false | ||
} | ||
], | ||
camelcase: [ | ||
'error', | ||
{ | ||
properties: 'always' | ||
} | ||
], | ||
'capitalized-comments': [ | ||
'error', | ||
'always', | ||
{ | ||
// You can also ignore this rule by wrapping the first word in quotes | ||
ignorePattern: 'pragma|ignore|prettier-ignore', | ||
ignoreInlineComments: true, | ||
ignoreConsecutiveComments: true | ||
} | ||
], | ||
'comma-spacing': [ | ||
'error', | ||
{ | ||
before: false, | ||
after: true | ||
} | ||
], | ||
'comma-style': [ | ||
'error', | ||
'last' | ||
], | ||
'computed-property-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
'eol-last': 'error', | ||
'func-call-spacing': ['error', 'never'], | ||
'func-name-matching': ['error', {considerPropertyDescriptor: true}], | ||
'func-names': ['error', 'never'], | ||
indent: ['error', 'tab', { | ||
SwitchCase: 1 | ||
}], | ||
'func-call-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
'func-name-matching': [ | ||
'error', | ||
{ | ||
considerPropertyDescriptor: true | ||
} | ||
], | ||
'func-names': [ | ||
'error', | ||
'never' | ||
], | ||
indent: [ | ||
'error', | ||
'tab', | ||
{ | ||
SwitchCase: 1 | ||
} | ||
], | ||
'jsx-quotes': 'error', | ||
'key-spacing': ['error', { | ||
beforeColon: false, | ||
afterColon: true | ||
}], | ||
'key-spacing': [ | ||
'error', | ||
{ | ||
beforeColon: false, | ||
afterColon: true | ||
} | ||
], | ||
'keyword-spacing': 'error', | ||
'linebreak-style': [(process.platform === 'win32' ? 'off' : 'error'), 'unix'], | ||
'lines-between-class-members': ['error', 'always'], | ||
'linebreak-style': [ | ||
process.platform === 'win32' ? 'off' : 'error', | ||
'unix' | ||
], | ||
'lines-between-class-members': [ | ||
'error', | ||
'always' | ||
], | ||
'max-depth': 'warn', | ||
'max-nested-callbacks': ['warn', 4], | ||
'max-params': ['warn', { | ||
max: 4 | ||
}], | ||
'max-nested-callbacks': [ | ||
'warn', | ||
4 | ||
], | ||
'max-params': [ | ||
'warn', | ||
{ | ||
max: 4 | ||
} | ||
], | ||
'max-statements-per-line': 'error', | ||
'new-cap': ['error', { | ||
newIsCap: true, | ||
capIsNew: true | ||
}], | ||
'new-cap': [ | ||
'error', | ||
{ | ||
newIsCap: true, | ||
capIsNew: true | ||
} | ||
], | ||
'new-parens': 'error', | ||
@@ -213,60 +336,142 @@ 'no-array-constructor': 'error', | ||
'no-multi-assign': 'error', | ||
'no-multiple-empty-lines': ['error', { | ||
max: 1 | ||
}], | ||
'no-multiple-empty-lines': [ | ||
'error', | ||
{ | ||
max: 1 | ||
} | ||
], | ||
'no-negated-condition': 'error', | ||
'no-new-object': 'error', | ||
'no-restricted-syntax': ['error', 'WithStatement'], | ||
'no-restricted-syntax': [ | ||
'error', | ||
'WithStatement' | ||
], | ||
'no-whitespace-before-property': 'error', | ||
'no-trailing-spaces': 'error', | ||
'no-unneeded-ternary': 'error', | ||
'object-curly-spacing': ['error', 'never'], | ||
'object-curly-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
// Disabled because of https://github.com/xojs/eslint-config-xo/issues/27 | ||
// 'object-property-newline': 'error', | ||
'one-var': ['error', 'never'], | ||
'one-var': [ | ||
'error', | ||
'never' | ||
], | ||
'one-var-declaration-per-line': 'error', | ||
'operator-assignment': ['error', 'always'], | ||
'operator-linebreak': ['error', 'after'], | ||
'padded-blocks': ['error', 'never'], | ||
'quote-props': ['error', 'as-needed'], | ||
quotes: ['error', 'single'], | ||
'semi-spacing': ['error', { | ||
before: false, | ||
after: true | ||
}], | ||
'semi-style': ['error', 'last'], | ||
semi: ['error', 'always'], | ||
'space-before-blocks': ['error', 'always'], | ||
'space-before-function-paren': ['error', { | ||
anonymous: 'always', | ||
named: 'never', | ||
asyncArrow: 'always' | ||
}], | ||
'space-in-parens': ['error', 'never'], | ||
'operator-assignment': [ | ||
'error', | ||
'always' | ||
], | ||
'operator-linebreak': [ | ||
'error', | ||
'after' | ||
], | ||
'padded-blocks': [ | ||
'error', | ||
'never' | ||
], | ||
'quote-props': [ | ||
'error', | ||
'as-needed' | ||
], | ||
quotes: [ | ||
'error', | ||
'single' | ||
], | ||
'semi-spacing': [ | ||
'error', | ||
{ | ||
before: false, | ||
after: true | ||
} | ||
], | ||
'semi-style': [ | ||
'error', | ||
'last' | ||
], | ||
semi: [ | ||
'error', | ||
'always' | ||
], | ||
'space-before-blocks': [ | ||
'error', | ||
'always' | ||
], | ||
'space-before-function-paren': [ | ||
'error', | ||
{ | ||
anonymous: 'always', | ||
named: 'never', | ||
asyncArrow: 'always' | ||
} | ||
], | ||
'space-in-parens': [ | ||
'error', | ||
'never' | ||
], | ||
'space-infix-ops': 'error', | ||
'space-unary-ops': 'error', | ||
'spaced-comment': ['error', 'always', { | ||
line: { | ||
exceptions: ['-', '+', '*'], | ||
markers: ['!', '/'] | ||
}, | ||
block: { | ||
exceptions: ['-', '+', '*'], | ||
markers: ['!', '*'], | ||
balanced: true | ||
'spaced-comment': [ | ||
'error', | ||
'always', | ||
{ | ||
line: { | ||
exceptions: [ | ||
'-', | ||
'+', | ||
'*' | ||
], | ||
markers: [ | ||
'!', | ||
'/', | ||
'=>' | ||
] | ||
}, | ||
block: { | ||
exceptions: [ | ||
'-', | ||
'+', | ||
'*' | ||
], | ||
markers: [ | ||
'!', | ||
'*' | ||
], | ||
balanced: true | ||
} | ||
} | ||
}], | ||
'switch-colon-spacing': ['error', { | ||
after: true, | ||
before: false | ||
}], | ||
'template-tag-spacing': ['error', 'never'], | ||
'unicode-bom': ['error', 'never'], | ||
'arrow-parens': ['error', 'as-needed'], | ||
'arrow-spacing': ['error', { | ||
before: true, | ||
after: true | ||
}], | ||
], | ||
'switch-colon-spacing': [ | ||
'error', | ||
{ | ||
after: true, | ||
before: false | ||
} | ||
], | ||
'template-tag-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
'unicode-bom': [ | ||
'error', | ||
'never' | ||
], | ||
'arrow-parens': [ | ||
'error', | ||
'as-needed' | ||
], | ||
'arrow-spacing': [ | ||
'error', | ||
{ | ||
before: true, | ||
after: true | ||
} | ||
], | ||
'constructor-super': 'error', | ||
'generator-star-spacing': ['error', 'both'], | ||
'generator-star-spacing': [ | ||
'error', | ||
'both' | ||
], | ||
'no-class-assign': 'error', | ||
@@ -281,12 +486,21 @@ 'no-const-assign': 'error', | ||
'require-yield': 'error', | ||
'rest-spread-spacing': ['error', 'never'], | ||
'rest-spread-spacing': [ | ||
'error', | ||
'never' | ||
], | ||
'symbol-description': 'error', | ||
'template-curly-spacing': 'error', | ||
'yield-star-spacing': ['error', 'both'], | ||
'valid-jsdoc': ['warn', { | ||
'requireReturn': false, | ||
'requireParamDescription': true, | ||
'requireReturnDescription': true | ||
}] | ||
'yield-star-spacing': [ | ||
'error', | ||
'both' | ||
], | ||
'valid-jsdoc': [ | ||
'warn', | ||
{ | ||
requireReturn: false, | ||
requireParamDescription: true, | ||
requireReturnDescription: true | ||
} | ||
] | ||
} | ||
}; |
{ | ||
"name": "eslint-config-xo", | ||
"version": "0.25.0", | ||
"version": "0.25.1", | ||
"description": "ESLint shareable config for XO", | ||
@@ -53,3 +53,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"ava": "*", | ||
"ava": "^0.25.0", | ||
"eslint": "^5.3.0", | ||
@@ -56,0 +56,0 @@ "is-plain-obj": "^1.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14953
550