eslint-config-airbnb
Advanced tools
Comparing version 6.2.0 to 7.0.0
@@ -0,1 +1,13 @@ | ||
7.0.0 / 2016-04-11 | ||
================== | ||
- [react] [breaking] Add accessibility rules to the React style guide + `eslint-plugin-a11y` | ||
- [breaking] enable `react/require-render-return` | ||
- [breaking] Add `no-dupe-class-members` rule + section ([#785](https://github.com/airbnb/javascript/issues/785)) | ||
- [breaking] error on debugger statements | ||
- [breaking] add `no-useless-escape` rule | ||
- [breaking] add `no-duplicate-imports` rule | ||
- [semver-minor] enable `jsx-pascal-case` rule | ||
- [deps] update `eslint`, `react` | ||
- [dev deps] update `eslint`, `eslint-plugin-react` | ||
6.2.0 / 2016-03-22 | ||
@@ -2,0 +14,0 @@ ================== |
{ | ||
"name": "eslint-config-airbnb", | ||
"version": "6.2.0", | ||
"version": "7.0.0", | ||
"description": "Airbnb's ESLint config, following our styleguide", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"tests-only": "babel-tape-runner ./test/test-*.js", | ||
"test": "parallelshell 'npm run lint' 'npm run tests-only'" | ||
"test": "parallelshell 'npm run --silent lint' 'npm run --silent tests-only'" | ||
}, | ||
@@ -47,5 +47,6 @@ "repository": { | ||
"babel-tape-runner": "^1.3.1", | ||
"eslint": "^2.4.0", | ||
"eslint-plugin-react": "^4.2.1", | ||
"react": "^0.14.7", | ||
"eslint": "^2.7.0", | ||
"eslint-plugin-jsx-a11y": "^0.6.2", | ||
"eslint-plugin-react": "^4.3.0", | ||
"react": "^0.14.8", | ||
"tape": "^4.5.1", | ||
@@ -55,5 +56,6 @@ "parallelshell": "^2.0.0" | ||
"peerDependencies": { | ||
"eslint": "^2.4.0", | ||
"eslint-plugin-react": "^4.2.3" | ||
"eslint": "^2.7.0", | ||
"eslint-plugin-jsx-a11y": "^0.6.2", | ||
"eslint-plugin-react": "^4.3.0" | ||
} | ||
} |
@@ -116,2 +116,5 @@ module.exports = { | ||
'no-useless-call': 0, | ||
// disallow unnecessary string escaping | ||
// http://eslint.org/docs/rules/no-useless-escape | ||
'no-useless-escape': 2, | ||
// disallow use of void operator | ||
@@ -118,0 +121,0 @@ 'no-void': 0, |
@@ -12,3 +12,3 @@ module.exports = { | ||
// disallow use of debugger | ||
'no-debugger': 1, | ||
'no-debugger': 2, | ||
// disallow duplicate arguments in functions | ||
@@ -15,0 +15,0 @@ 'no-dupe-args': 2, |
@@ -38,2 +38,8 @@ module.exports = { | ||
'no-const-assign': 2, | ||
// disallow duplicate class members | ||
// http://eslint.org/docs/rules/no-dupe-class-members | ||
'no-dupe-class-members': 2, | ||
// disallow importing from the same path more than once | ||
// http://eslint.org/docs/rules/no-duplicate-imports | ||
'no-duplicate-imports': 2, | ||
// disallow symbol constructor | ||
@@ -40,0 +46,0 @@ // http://eslint.org/docs/rules/no-new-symbol |
module.exports = { | ||
'plugins': [ | ||
'jsx-a11y', | ||
'react' | ||
@@ -11,2 +12,18 @@ ], | ||
'rules': { | ||
// Prevent use of `accessKey` | ||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md | ||
'jsx-a11y/no-access-key': 2, | ||
// Require <img> to have a non-empty `alt` prop, or role="presentation" | ||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-uses-alt.md | ||
'jsx-a11y/img-uses-alt': 2, | ||
// Prevent img alt text from containing redundant words like "image", "picture", or "photo" | ||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/redundant-alt.md | ||
'jsx-a11y/redundant-alt': 2, | ||
// Require ARIA roles to be valid and non-abstract | ||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/valid-aria-role.md | ||
'jsx-a11y/valid-aria-role': 2, | ||
// Prevent missing displayName in a React component definition | ||
@@ -60,3 +77,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md | ||
'react/jsx-pascal-case': 0, | ||
'react/jsx-pascal-case': 2, | ||
// Enforce propTypes declarations alphabetical sorting | ||
@@ -125,2 +142,5 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md | ||
'react/require-extension': [0, { 'extensions': ['.jsx'] }], | ||
// Require render() methods to return something | ||
// https://github.com/yannickcr/eslint-plugin-react/pull/502 | ||
'react/require-render-return': 2, | ||
// Prevent extra closing tags for components without children | ||
@@ -127,0 +147,0 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md |
@@ -31,5 +31,5 @@ import test from 'tape'; | ||
test('validate react prop order', t => { | ||
t.test('make sure our eslintrc has React linting dependencies', t => { | ||
t.test('make sure our eslintrc has React and JSX linting dependencies', t => { | ||
t.plan(1); | ||
t.equal(reactRules.plugins[0], 'react', 'uses eslint-plugin-react'); | ||
t.deepEqual(reactRules.plugins, ['jsx-a11y', 'react']); | ||
}); | ||
@@ -36,0 +36,0 @@ |
48139
807
3
7