Skip to content

Commit 6bd7356

Browse files
committed
[eslint config] [deps] update eslint v4, eslint-plugin-react, tape
1 parent b5e14dc commit 6bd7356

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

packages/eslint-config-airbnb/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@
5454
"babel-preset-airbnb": "^2.4.0",
5555
"babel-tape-runner": "^2.0.1",
5656
"editorconfig-tools": "^0.1.1",
57-
"eslint": "^3.19.0 || ^4.3.0",
57+
"eslint": "^3.19.0 || ^4.4.1",
5858
"eslint-find-rules": "^3.1.1",
5959
"eslint-plugin-import": "^2.7.0",
6060
"eslint-plugin-jsx-a11y": "^5.1.1",
61-
"eslint-plugin-react": "^7.1.0",
61+
"eslint-plugin-react": "^7.2.0",
6262
"in-publish": "^2.0.0",
6363
"react": ">= 0.13.0",
6464
"safe-publish-latest": "^1.1.1",
65-
"tape": "^4.7.0"
65+
"tape": "^4.8.0"
6666
},
6767
"peerDependencies": {
68-
"eslint": "^3.19.0 || ^4.3.0",
68+
"eslint": "^3.19.0 || ^4.4.1",
6969
"eslint-plugin-jsx-a11y": "^5.1.1",
7070
"eslint-plugin-import": "^2.7.0",
71-
"eslint-plugin-react": "^7.1.0"
71+
"eslint-plugin-react": "^7.2.0"
7272
},
7373
"engines": {
7474
"node": ">= 4"

packages/eslint-config-airbnb/rules/react.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242

4343
// Enforce boolean attributes notation in JSX
4444
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
45-
'react/jsx-boolean-value': ['error', 'never'],
45+
'react/jsx-boolean-value': ['error', 'never', { always: [] }],
4646

4747
// Validate closing bracket location in JSX
4848
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
@@ -90,7 +90,7 @@ module.exports = {
9090

9191
// Prevent usage of unwrapped JSX strings
9292
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
93-
'react/jsx-no-literals': 'off',
93+
'react/jsx-no-literals': ['off', { noStrings: true }],
9494

9595
// Disallow undeclared variables in JSX
9696
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
@@ -208,6 +208,8 @@ module.exports = {
208208
'static-methods',
209209
'lifecycle',
210210
'/^on.+$/',
211+
'getters',
212+
'setters',
211213
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
212214
'everything-else',
213215
'/^render.+$/',
@@ -330,6 +332,23 @@ module.exports = {
330332
// https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md
331333
// TODO: enable, semver-major
332334
'react/no-redundant-should-component-update': 'off',
335+
336+
// Prevent unused state values
337+
// https://github.com/yannickcr/eslint-plugin-react/pull/1103/files
338+
// TODO: enable? semver-major
339+
'react/no-unused-state': 'off',
340+
341+
// Enforces consistent naming for boolean props
342+
// https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/boolean-prop-naming.md
343+
'react/boolean-prop-naming': ['off', {
344+
propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],
345+
rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+',
346+
}],
347+
348+
// Prevents common casing typos
349+
// https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md
350+
// TODO: enable, semver-major
351+
'react/no-typos': 'off',
333352
},
334353

335354
settings: {

0 commit comments

Comments
 (0)