Skip to content

Commit

Permalink
[eslint config] [base] [deps] update to eslint v3.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb authored and hibearpanda committed Jan 22, 2017
1 parent 4fdff14 commit b61d16f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/eslint-config-airbnb-base/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
ecmaFeatures: {},
globals: {},
rules: {
'comma-dangle': ['error', 'never']
'comma-dangle': ['error', 'never'],
'prefer-numeric-literals': 'off',
}
};
4 changes: 2 additions & 2 deletions packages/eslint-config-airbnb-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
"devDependencies": {
"babel-preset-airbnb": "^2.0.0",
"babel-tape-runner": "^2.0.1",
"eslint": "^3.4.0",
"eslint": "^3.5.0",
"eslint-find-rules": "^1.13.1",
"eslint-plugin-import": "^1.14.0",
"in-publish": "^2.0.0",
"safe-publish-latest": "^1.0.1",
"tape": "^4.6.0"
},
"peerDependencies": {
"eslint": "^3.4.0",
"eslint": "^3.5.0",
"eslint-plugin-import": "^1.14.0"
},
"engines": {
Expand Down
16 changes: 14 additions & 2 deletions packages/eslint-config-airbnb-base/rules/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ module.exports = {
rules: {
// enforces no braces where they can be omitted
// http://eslint.org/docs/rules/arrow-body-style
'arrow-body-style': ['error', 'as-needed'],
// TODO: enable requireReturnForObjectLiteral?
'arrow-body-style': ['error', 'as-needed', {
requireReturnForObjectLiteral: false,
}],

// require parens in arrow function arguments
'arrow-parens': 'off',
// http://eslint.org/docs/rules/arrow-parens
// TODO: enable, semver-minor
'arrow-parens': ['off', 'as-needed', {
requireForBlockBody: true,
}],

// require space before/after arrow function's arrow
// http://eslint.org/docs/rules/arrow-spacing
Expand Down Expand Up @@ -101,6 +108,11 @@ module.exports = {
ignoreReadBeforeAssign: true,
}],

// disallow parseInt() in favor of binary, octal, and hexadecimal literals
// http://eslint.org/docs/rules/prefer-numeric-literals
// TODO: enable, semver-major
'prefer-numeric-literals': 'off',

// suggest using Reflect methods where applicable
// http://eslint.org/docs/rules/prefer-reflect
// TODO: enable?
Expand Down
9 changes: 9 additions & 0 deletions packages/eslint-config-airbnb-base/rules/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ module.exports = {
// restrict usage of specified node modules
'no-restricted-modules': 'off',

// disallow certain object properties
// http://eslint.org/docs/rules/no-restricted-properties
// TODO: enable, semver-major
'no-restricted-properties': ['off', {
object: 'arguments',
property: 'callee',
message: 'arguments.callee is deprecated,'
}],

// disallow use of synchronous methods (off by default)
'no-sync': 'off',
}
Expand Down
17 changes: 17 additions & 0 deletions packages/eslint-config-airbnb-base/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,30 @@ module.exports = {
}
}],

// enforce position of line comments
// http://eslint.org/docs/rules/line-comment-position
// TODO: enable?
'line-comment-position': ['off', {
position: 'above',
ignorePattern: '',
applyDefaultPatterns: true,
}],

// disallow mixed 'LF' and 'CRLF' as linebreaks
// http://eslint.org/docs/rules/linebreak-style
'linebreak-style': ['error', 'unix'],

// enforces empty lines around comments
'lines-around-comment': 'off',

// require or disallow newlines around directives
// http://eslint.org/docs/rules/lines-around-directive
// TODO: enable, semver-major
'lines-around-directive': ['off', {
before: 'always',
after: 'always',
}],

// specify the maximum depth that blocks can be nested
'max-depth': ['off', 4],

Expand Down

0 comments on commit b61d16f

Please sign in to comment.