eslint-config-tc
Advanced tools
Comparing version 1.5.0 to 2.0.0
@@ -14,2 +14,31 @@ # Change Log | ||
## [2.0.0] - 2017-07-30 | ||
### Added | ||
* [class-methods-use-this](http://eslint.org/docs/rules/class-methods-use-this) | ||
* [func-call-spacing](http://eslint.org/docs/rules/func-call-spacing) | ||
* [jsx-quotes](http://eslint.org/docs/rules/jsx-quotes) | ||
* [no-console](http://eslint.org/docs/rules/no-console) | ||
* [no-debugger](http://eslint.org/docs/rules/no-debugger) | ||
* [no-else-return](http://eslint.org/docs/rules/no-else-return) | ||
* [no-new](http://eslint.org/docs/rules/no-new) | ||
* [no-unsafe-finally](http://eslint.org/docs/rules/no-unsafe-finally) | ||
* [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars) | ||
* Add override support for test files | ||
### Changed | ||
* `arrow-body-style` to `as-needed` | ||
* `dot-notation` to allow keywords. | ||
* `max-nested-callbacks` to 4 | ||
* `newline-per-chained-call` to 4 | ||
* `no-extra-parens` to allow exceptions for nested binary expressions and returns | ||
* `no-multiple-empty-lines` with EOF settings for 1 line | ||
* `object-curly-newline` to account for destructuring and add multiline support | ||
* `object-property-newline` with multiline support | ||
* `quote-props` to be consistent only when needed | ||
* `quote` to avoid escaping | ||
* `valid-typeof` so it requires string literals | ||
### Removed | ||
* [sort-imports](http://eslint.org/docs/rules/sort-imports) | ||
## [1.5.0] - 2017-02-18 | ||
@@ -16,0 +45,0 @@ ### Added |
173
index.js
'use strict'; | ||
/* eslint id-length: 'off', max-lines: 'off' */ | ||
module.exports = { | ||
'parserOptions': { | ||
'ecmaVersion': 6, | ||
'sourceType': 'module' | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: 'module' | ||
}, | ||
'env': { | ||
'node': true, | ||
'es6': true, | ||
'mocha': true, | ||
'jquery': true | ||
env: { | ||
node: true, | ||
es6: true | ||
}, | ||
'rules': { | ||
rules: { | ||
'comma-dangle': ['error', 'never'], | ||
@@ -26,9 +26,9 @@ 'no-cond-assign': ['error', 'always'], | ||
'no-extra-parens': ['error', 'all', { | ||
'conditionalAssign': false | ||
conditionalAssign: true, | ||
nestedBinaryExpressions: false, | ||
returnAssign: false | ||
}], | ||
'no-extra-semi': 'error', | ||
'no-func-assign': 'error', | ||
'no-invalid-regexp': ['error', { | ||
'allowConstructorFlags': ['u', 'y'] | ||
}], | ||
'no-invalid-regexp': ['error', {allowConstructorFlags: ['u', 'y']}], | ||
'no-irregular-whitespace': 'error', | ||
@@ -43,3 +43,3 @@ 'no-unsafe-negation': 'error', | ||
'no-unexpected-multiline': 'error', | ||
'valid-typeof': 'error', | ||
'valid-typeof': ['error', {requireStringLiterals: true}], | ||
'accessor-pairs': 'error', | ||
@@ -53,3 +53,3 @@ 'array-callback-return': 'error', | ||
'dot-location': ['error', 'property'], | ||
'dot-notation': 'error', | ||
'dot-notation': ['error', {allowKeywords: true}], | ||
'eqeqeq': 'error', | ||
@@ -75,5 +75,3 @@ 'no-caller': 'error', | ||
'no-loop-func': 'error', | ||
'no-magic-numbers': ['error', { | ||
'ignoreArrayIndexes': true | ||
}], | ||
'no-magic-numbers': ['error', {ignoreArrayIndexes: true}], | ||
'no-multi-spaces': 'error', | ||
@@ -126,4 +124,4 @@ 'no-multi-str': 'error', | ||
'comma-spacing': ['error', { | ||
'before': false, | ||
'after': true | ||
before: false, | ||
after: true | ||
}], | ||
@@ -135,9 +133,9 @@ 'comma-style': ['error', 'last'], | ||
'id-length': ['error', { | ||
'min': 1, | ||
'max': 25 | ||
min: 1, | ||
max: 25 | ||
}], | ||
'indent': ['error', 2], | ||
'key-spacing': ['error', { | ||
'beforeColon': false, | ||
'afterColon': true | ||
beforeColon: false, | ||
afterColon: true | ||
}], | ||
@@ -147,8 +145,6 @@ 'keyword-spacing': 'error', | ||
'max-depth': ['error', 4], | ||
'max-nested-callbacks': ['error', 3], | ||
'max-nested-callbacks': ['error', 4], | ||
'max-params': ['error', 4], | ||
'max-statements': ['error', 12], | ||
'max-statements-per-line': ['error', { | ||
'max': 1 | ||
}], | ||
'max-statements-per-line': ['error', {max: 1}], | ||
'new-cap': 'error', | ||
@@ -158,5 +154,3 @@ 'new-parens': 'error', | ||
'newline-before-return': 'error', | ||
'newline-per-chained-call': ['error', { | ||
'ignoreChainWithDepth': 3 | ||
}], | ||
'newline-per-chained-call': ['error', {ignoreChainWithDepth: 4}], | ||
'no-array-constructor': 'error', | ||
@@ -169,3 +163,4 @@ 'no-bitwise': 'error', | ||
'no-multiple-empty-lines': ['error', { | ||
'max': 2 | ||
max: 2, | ||
maxEOF: 1 | ||
}], | ||
@@ -182,12 +177,10 @@ 'no-negated-condition': 'error', | ||
'operator-assignment': ['error', 'always'], | ||
'padded-blocks': ['error', { | ||
'classes': 'always' | ||
}], | ||
'quote-props': ['error', 'consistent'], | ||
'quotes': ['error', 'single'], | ||
'padded-blocks': ['error', {classes: 'always'}], | ||
'quote-props': ['error', 'consistent-as-needed', {keywords: true}], | ||
'quotes': ['error', 'single', {avoidEscape: true}], | ||
'require-jsdoc': ['error', { | ||
'require': { | ||
'FunctionDeclaration': true, | ||
'MethodDefinition': true, | ||
'ClassDeclaration': false | ||
require: { | ||
FunctionDeclaration: true, | ||
MethodDefinition: true, | ||
ClassDeclaration: false | ||
} | ||
@@ -197,11 +190,10 @@ }], | ||
'semi-spacing': ['error', { | ||
'before': false, | ||
'after': false | ||
before: false, | ||
after: false | ||
}], | ||
'sort-imports': 'error', | ||
'sort-vars': 'error', | ||
'space-before-blocks': ['error', { | ||
'functions': 'always', | ||
'keywords': 'always', | ||
'classes': 'always' | ||
functions: 'always', | ||
keywords: 'always', | ||
classes: 'always' | ||
}], | ||
@@ -211,4 +203,4 @@ 'space-before-function-paren': ['error', 'never'], | ||
'space-unary-ops': [2, { | ||
'words': true, | ||
'nonwords': false | ||
words: true, | ||
nonwords: false | ||
}], | ||
@@ -218,24 +210,22 @@ 'spaced-comment': ['error', 'always'], | ||
'lines-around-comment': ['error', { | ||
'allowArrayStart': false, | ||
'allowArrayEnd': false, | ||
'allowBlockStart': true, | ||
'allowBlockEnd': false, | ||
'allowObjectStart': false, | ||
'allowObjectEnd': false, | ||
'afterBlockComment': false, | ||
'afterLineComment': false, | ||
'beforeBlockComment': true, | ||
'beforeLineComment': true | ||
allowArrayStart: false, | ||
allowArrayEnd: false, | ||
allowBlockStart: true, | ||
allowBlockEnd: false, | ||
allowObjectStart: false, | ||
allowObjectEnd: false, | ||
afterBlockComment: false, | ||
afterLineComment: false, | ||
beforeBlockComment: true, | ||
beforeLineComment: true | ||
}], | ||
'arrow-body-style': ['error', 'always'], | ||
'arrow-body-style': ['error', 'as-needed'], | ||
'arrow-parens': ['error', 'always'], | ||
'arrow-spacing': ['error', { | ||
'before': true, | ||
'after': true | ||
before: true, | ||
after: true | ||
}], | ||
'constructor-super': 'error', | ||
'no-class-assign': 'error', | ||
'no-confusing-arrow': ['error', { | ||
'allowParens': true | ||
}], | ||
'no-confusing-arrow': ['error', {allowParens: true}], | ||
'no-const-assign': 'error', | ||
@@ -248,3 +238,2 @@ 'no-dupe-class-members': 'error', | ||
'no-var': 'error', | ||
'object-shorthand': 'error', | ||
'prefer-const': 'error', | ||
@@ -254,15 +243,16 @@ 'prefer-rest-params': 'error', | ||
'template-curly-spacing': 'error', | ||
'object-property-newline': 'error', | ||
'object-property-newline': ['error', {allowMultiplePropertiesPerLine: true}], | ||
'no-useless-rename': 'error', | ||
'rest-spread-spacing': ['error', 'never'], | ||
'max-lines': ['error', { | ||
'max': 300, | ||
'skipComments': true, | ||
'skipBlankLines': true | ||
max: 300, | ||
skipComments: true, | ||
skipBlankLines: true | ||
}], | ||
'object-curly-newline': ['error', { | ||
'minProperties': 1 | ||
ObjectExpression: {minProperties: 0, multiline: true}, | ||
ObjectPattern: 'never' | ||
}], | ||
'no-mixed-operators': ['error', { | ||
'groups': [ | ||
groups: [ | ||
['+', '-', '*', '/', '%', '**'], | ||
@@ -274,3 +264,3 @@ ['&', '|', '^', '~', '<<', '>>', '>>>'], | ||
], | ||
'allowSamePrecedence': true | ||
allowSamePrecedence: true | ||
}], | ||
@@ -280,8 +270,6 @@ 'no-tabs': 'error', | ||
'symbol-description': 'error', | ||
'line-comment-position': ['error', { | ||
'position': 'above' | ||
}], | ||
'line-comment-position': ['error', {position: 'above'}], | ||
'lines-around-directive': ['error', { | ||
'before': 'never', | ||
'after': 'always' | ||
before: 'never', | ||
after: 'always' | ||
}], | ||
@@ -293,4 +281,29 @@ 'no-useless-return': 'error', | ||
'prefer-promise-reject-errors': 'error', | ||
'no-multi-assign': 'error' | ||
} | ||
'no-multi-assign': 'error', | ||
'class-methods-use-this': 'error', | ||
'func-call-spacing': ['error', 'never'], | ||
'jsx-quotes': ['error', 'prefer-double'], | ||
'no-console': 'warn', | ||
'no-debugger': 'error', | ||
'no-else-return': 'error', | ||
'no-new': 'error', | ||
'no-unsafe-finally': 'error', | ||
'no-unused-vars': ['error', {vars: 'local', args: 'after-used', ignoreRestSiblings: true}] | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/*.spec.js', | ||
'**/*.test.js' | ||
], | ||
env: {mocha: true}, | ||
rules: { | ||
'max-nested-callbacks': 'off', | ||
'max-statements': 'off', | ||
'newline-after-var': 'off', | ||
'no-unused-expressions': 'off', | ||
'no-unused-vars': 'off' | ||
} | ||
} | ||
] | ||
}; |
{ | ||
"name": "eslint-config-tc", | ||
"version": "1.5.0", | ||
"version": "2.0.0", | ||
"description": "ESLint shareable config for TC's projects", | ||
@@ -26,23 +26,19 @@ "keywords": [ | ||
"scripts": { | ||
"eslint": "eslint *.js --format=node_modules/eslint-formatter-pretty", | ||
"jscs": "jscs *.js", | ||
"jsonlint": "jsonlint *.json", | ||
"lint": "npm run npmpackagejsonlint && npm run eslint && npm run jscs && npm run jsonlint", | ||
"eslint": "eslint . --format=node_modules/eslint-formatter-pretty", | ||
"lint": "npm run npmpackagejsonlint && npm run eslint", | ||
"npmpackagejsonlint": "pjl-cli -c ./.npmpackagejsonlintrc.json", | ||
"test": "mocha test" | ||
"test": "mocha" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.15.0", | ||
"chai": "^4.1.0", | ||
"eslint": "^4.3.0", | ||
"eslint-formatter-pretty": "^1.1.0", | ||
"is-plain-obj": "^1.1.0", | ||
"jscs": "^3.0.7", | ||
"jsonlint": "^1.6.2", | ||
"mocha": "^3.1.2", | ||
"npm-package-json-lint": "^2.0.2", | ||
"mocha": "^3.4.2", | ||
"npm-package-json-lint": "^2.5.0", | ||
"npm-package-json-lint-config-tc": "^1.0.0", | ||
"should": "^11.2.0", | ||
"temp-write": "^3.1.0" | ||
"temp-write": "^3.2.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^3.15.0" | ||
"eslint": "^4.3.0" | ||
}, | ||
@@ -49,0 +45,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
8
349
22800
14