Skip to content

Commit 7412641

Browse files
committed
[eslint config] [base] [deps] update to eslint v3.5.0.
1 parent ff69c8c commit 7412641

File tree

5 files changed

+44
-5
lines changed

5 files changed

+44
-5
lines changed

packages/eslint-config-airbnb-base/legacy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = {
1616
ecmaFeatures: {},
1717
globals: {},
1818
rules: {
19-
'comma-dangle': ['error', 'never']
19+
'comma-dangle': ['error', 'never'],
20+
'prefer-numeric-literals': 'off',
2021
}
2122
};

packages/eslint-config-airbnb-base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
"devDependencies": {
4848
"babel-preset-airbnb": "^2.0.0",
4949
"babel-tape-runner": "^2.0.1",
50-
"eslint": "^3.4.0",
50+
"eslint": "^3.5.0",
5151
"eslint-find-rules": "^1.13.1",
5252
"eslint-plugin-import": "^1.14.0",
5353
"in-publish": "^2.0.0",
5454
"safe-publish-latest": "^1.0.1",
5555
"tape": "^4.6.0"
5656
},
5757
"peerDependencies": {
58-
"eslint": "^3.4.0",
58+
"eslint": "^3.5.0",
5959
"eslint-plugin-import": "^1.14.0"
6060
},
6161
"engines": {

packages/eslint-config-airbnb-base/rules/es6.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ module.exports = {
1414
rules: {
1515
// enforces no braces where they can be omitted
1616
// http://eslint.org/docs/rules/arrow-body-style
17-
'arrow-body-style': ['error', 'as-needed'],
17+
// TODO: enable requireReturnForObjectLiteral?
18+
'arrow-body-style': ['error', 'as-needed', {
19+
requireReturnForObjectLiteral: false,
20+
}],
1821

1922
// require parens in arrow function arguments
20-
'arrow-parens': 'off',
23+
// http://eslint.org/docs/rules/arrow-parens
24+
// TODO: enable, semver-minor
25+
'arrow-parens': ['off', 'as-needed', {
26+
requireForBlockBody: true,
27+
}],
2128

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

111+
// disallow parseInt() in favor of binary, octal, and hexadecimal literals
112+
// http://eslint.org/docs/rules/prefer-numeric-literals
113+
// TODO: enable, semver-major
114+
'prefer-numeric-literals': 'off',
115+
104116
// suggest using Reflect methods where applicable
105117
// http://eslint.org/docs/rules/prefer-reflect
106118
// TODO: enable?

packages/eslint-config-airbnb-base/rules/node.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ module.exports = {
3333
// restrict usage of specified node modules
3434
'no-restricted-modules': 'off',
3535

36+
// disallow certain object properties
37+
// http://eslint.org/docs/rules/no-restricted-properties
38+
// TODO: enable, semver-major
39+
'no-restricted-properties': ['off', {
40+
object: 'arguments',
41+
property: 'callee',
42+
message: 'arguments.callee is deprecated,'
43+
}],
44+
3645
// disallow use of synchronous methods (off by default)
3746
'no-sync': 'off',
3847
}

packages/eslint-config-airbnb-base/rules/style.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,30 @@ module.exports = {
7373
}
7474
}],
7575

76+
// enforce position of line comments
77+
// http://eslint.org/docs/rules/line-comment-position
78+
// TODO: enable?
79+
'line-comment-position': ['off', {
80+
position: 'above',
81+
ignorePattern: '',
82+
applyDefaultPatterns: true,
83+
}],
84+
7685
// disallow mixed 'LF' and 'CRLF' as linebreaks
7786
// http://eslint.org/docs/rules/linebreak-style
7887
'linebreak-style': ['error', 'unix'],
7988

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

92+
// require or disallow newlines around directives
93+
// http://eslint.org/docs/rules/lines-around-directive
94+
// TODO: enable, semver-major
95+
'lines-around-directive': ['off', {
96+
before: 'always',
97+
after: 'always',
98+
}],
99+
83100
// specify the maximum depth that blocks can be nested
84101
'max-depth': ['off', 4],
85102

0 commit comments

Comments
 (0)