Skip to content

Commit

Permalink
Update deps and add new ESLint rules (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclindner authored Oct 29, 2017
1 parent 83a2a08 commit ac0ee3c
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 19 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Removed

## [2.2.0] - 2017-10-29
### Added

Added one new rule from ESLint v4.9.0.
* [lines-between-class-members](http://eslint.org/docs/rules/lines-between-class-members)

Added one new rule from ESLint v4.6.0.
* [function-paren-newline](http://eslint.org/docs/rules/function-paren-newline)

Added one new rule from ESLint v4.2.0.
* [getter-return](http://eslint.org/docs/rules/getter-return)

Added four new rules from ESLint v4.0.0-beta.0
* [semi-style](https://eslint.org/docs/4.0.0/rules/semi-style)
* [padding-line-between-statements](https://eslint.org/docs/4.0.0/rules/padding-line-between-statements)
* [for-direction](https://eslint.org/docs/4.0.0/rules/for-direction)
* [switch-colon-spacing](https://eslint.org/docs/4.0.0/rules/switch-colon-spacing)

Added one new rule from ESLint v4.0.0-alpha.0
* [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)

Added one new rule from ESLint v3.17.0
* [no-compare-neg-zero](https://eslint.org/docs/rules/no-compare-neg-zero)

### Removed
* [lines-around-directive](https://eslint.org/docs/rules/lines-around-directive)
* [newline-after-var](https://eslint.org/docs/rules/newline-after-var)
* [newline-before-return](https://eslint.org/docs/rules/newline-before-return)

## [2.1.0] - 2017-07-30
### Added
* `object-curly-newline` to test file override
Expand Down
59 changes: 49 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* eslint id-length: 'off', max-lines: 'off' */
/* eslint id-length: 'off', max-lines: 'off', array-bracket-newline: 'off', array-element-newline: 'off' */

module.exports = {
parserOptions: {
Expand Down Expand Up @@ -142,8 +142,6 @@ module.exports = {
'max-statements-per-line': ['error', {max: 1}],
'new-cap': 'error',
'new-parens': 'error',
'newline-after-var': 'error',
'newline-before-return': 'error',
'newline-per-chained-call': ['error', {ignoreChainWithDepth: 4}],
'no-array-constructor': 'error',
'no-bitwise': 'error',
Expand Down Expand Up @@ -252,10 +250,6 @@ module.exports = {
'no-template-curly-in-string': 'error',
'symbol-description': 'error',
'line-comment-position': ['error', {position: 'above'}],
'lines-around-directive': ['error', {
before: 'never',
after: 'always'
}],
'no-useless-return': 'error',
'no-return-await': 'error',
'require-await': 'error',
Expand All @@ -270,7 +264,35 @@ module.exports = {
'no-else-return': 'error',
'no-new': 'error',
'no-unsafe-finally': 'error',
'no-unused-vars': ['error', {vars: 'local', args: 'after-used', ignoreRestSiblings: true}]
'no-unused-vars': ['error', {vars: 'local', args: 'after-used', ignoreRestSiblings: true}],
'no-buffer-constructor': 'error',
'lines-between-class-members': ['error', 'always'],
'no-compare-neg-zero': 'error',
'semi-style': ['error', 'last'],
'padding-line-between-statements': [
'error',
{blankLine: 'always', prev: '*', next: 'return'},
{blankLine: 'always', prev: ['const', 'let', 'var'], next: '*'},
{blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var']},
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'always', prev: ['for', 'do', 'while'], next: '*'},
{blankLine: 'always', prev: '*', next: 'for'},
{blankLine: 'always', prev: 'import', next: '*'},
{blankLine: 'any', prev: 'import', next: 'import'},
{blankLine: 'always', prev: 'if', next: '*'},
{blankLine: 'always', prev: 'function', next: '*'},
{blankLine: 'always', prev: '*', next: 'function'},
{blankLine: 'always', prev: '*', next: 'export'},
{blankLine: 'always', prev: '*', next: 'cjs-export'},
{blankLine: 'always', prev: 'cjs-import', next: '*'},
{blankLine: 'any', prev: 'cjs-import', next: 'cjs-import'}
],
'for-direction': 'error',
'switch-colon-spacing': 'error',
'getter-return': 'error',
'function-paren-newline': ['error', 'never'],
'array-element-newline': ['error', {minItems: 3}],
'array-bracket-newline': ['error', {multiline: true, minItems: 3}]
},
overrides: [
{
Expand All @@ -282,10 +304,27 @@ module.exports = {
rules: {
'max-nested-callbacks': 'off',
'max-statements': 'off',
'newline-after-var': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
'object-curly-newline': 'off'
'object-curly-newline': 'off',
'padding-line-between-statements': [
'error',
{blankLine: 'always', prev: '*', next: 'return'},
{blankLine: 'any', prev: ['const', 'let', 'var'], next: '*'},
{blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var']},
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'any', prev: ['for', 'do', 'while'], next: '*'},
{blankLine: 'any', prev: '*', next: 'for'},
{blankLine: 'always', prev: 'import', next: '*'},
{blankLine: 'any', prev: 'import', next: 'import'},
{blankLine: 'any', prev: 'if', next: '*'},
{blankLine: 'any', prev: 'function', next: '*'},
{blankLine: 'any', prev: '*', next: 'function'},
{blankLine: 'always', prev: '*', next: 'export'},
{blankLine: 'always', prev: '*', next: 'cjs-export'},
{blankLine: 'always', prev: 'cjs-import', next: '*'},
{blankLine: 'any', prev: 'cjs-import', next: 'cjs-import'}
]
}
}
]
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-tc",
"version": "2.1.0",
"version": "2.2.0",
"description": "ESLint shareable config for TC's projects",
"keywords": [
"eslintconfig",
Expand Down Expand Up @@ -29,17 +29,17 @@
"test": "mocha"
},
"devDependencies": {
"chai": "^4.1.0",
"eslint": "^4.3.0",
"eslint-formatter-pretty": "^1.1.0",
"chai": "^4.1.2",
"eslint": "^4.10.0",
"eslint-formatter-pretty": "^1.3.0",
"is-plain-obj": "^1.1.0",
"mocha": "^3.4.2",
"npm-package-json-lint": "^2.5.0",
"npm-package-json-lint-config-tc": "^1.0.0",
"temp-write": "^3.2.0"
"mocha": "^4.0.1",
"npm-package-json-lint": "^2.11.0",
"npm-package-json-lint-config-tc": "^1.1.0",
"temp-write": "^3.3.0"
},
"peerDependencies": {
"eslint": "^4.3.0"
"eslint": "^4.10.0"
},
"engines": {
"node": ">=4.2.0",
Expand Down

0 comments on commit ac0ee3c

Please sign in to comment.