Skip to content

Commit

Permalink
Add four new rules from 2.12.0 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclindner authored Jul 26, 2016
1 parent 7fe1df2 commit a47043f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 9 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Removed

## [1.1.0] - 2016-07-25
### Added
Added four new rules from ESLint v2.12.0.

* [max-lines](http://eslint.org/docs/rules/max-lines) - Adds `maximumNumberOfLines` compatibility from JSCS.
* [no-mixed-operators](http://eslint.org/docs/rules/no-mixed-operators) - Also required a change to `no-extra-parens`. Please see change section.
* [object-curly-newline](http://eslint.org/docs/rules/object-curly-newline) - Adds `requirePaddingNewLinesInObjects` and `disallowPaddingNewLinesInObjects` compatibility from JSCS.
* [rest-spread-spacing](http://eslint.org/docs/rules/rest-spread-spacing)

### Changed
* [no-extra-parens](http://eslint.org/docs/rules/no-extra-parens) - Turned the `conditionalAssign` option off.

## [1.0.0] - 2016-07-17
- First release
49 changes: 41 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ module.exports = {
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-parens': ['error', 'all', {'conditionalAssign': false}],
'no-extra-parens': ['error', 'all', {
'conditionalAssign': 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',
'no-negated-in-lhs': 'error',
'no-obj-calls': 'error',
Expand Down Expand Up @@ -137,19 +141,25 @@ module.exports = {
'max-nested-callbacks': ['error', 3],
'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',
'new-parens': 'error',
'newline-after-var': 'error',
'newline-before-return': 'error',
'newline-per-chained-call': ['error', {'ignoreChainWithDepth': 3}],
'newline-per-chained-call': ['error', {
'ignoreChainWithDepth': 3
}],
'no-array-constructor': 'error',
'no-bitwise': 'error',
'no-continue': 'error',
'no-inline-comments': 'error',
'no-lonely-if': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': ['error', {'max': 2}],
'no-multiple-empty-lines': ['error', {
'max': 2
}],
'no-negated-condition': 'error',
'no-nested-ternary': 'error',
'no-new-object': 'error',
Expand All @@ -160,7 +170,9 @@ module.exports = {
'object-curly-spacing': ['error', 'never'],
'one-var': ['error', 'never'],
'operator-assignment': ['error', 'always'],
'padded-blocks': ['error', {'classes': 'always'}],
'padded-blocks': ['error', {
'classes': 'always'
}],
'quote-props': ['error', 'consistent'],
'quotes': ['error', 'single'],
'require-jsdoc': ['error', {
Expand Down Expand Up @@ -210,7 +222,9 @@ module.exports = {
}],
'constructor-super': 'error',
'no-class-assign': 'error',
'no-confusing-arrow': ['error', {'allowParens': true}],
'no-confusing-arrow': ['error', {
'allowParens': true
}],
'no-const-assign': 'error',
'no-dupe-class-members': 'error',
'no-duplicate-imports': 'error',
Expand All @@ -224,6 +238,25 @@ module.exports = {
'prefer-template': 'error',
'template-curly-spacing': 'error',
'object-property-newline': 'error',
'no-useless-rename': 'error'
'no-useless-rename': 'error',
'rest-spread-spacing': ['error', 'never'],
'max-lines': ['error', {
'max': 300,
'skipComments': true,
'skipBlankLines': true
}],
'object-curly-newline': ['error', {
'minProperties': 1
}],
'no-mixed-operators': ['error', {
'groups': [
['+', '-', '*', '/', '%', '**'],
['&', '|', '^', '~', '<<', '>>', '>>>'],
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||'],
['in', 'instanceof']
],
'allowSamePrecedence': true
}]
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-tc",
"version": "1.0.0",
"version": "1.1.0",
"description": "ESLint shareable config for TC's projects",
"keywords": [
"eslintconfig",
Expand Down

0 comments on commit a47043f

Please sign in to comment.