eslint-config-airbnb
Advanced tools
Comparing version 3.1.0 to 4.0.0
module.exports = { | ||
'extends': [ | ||
extends: [ | ||
'eslint-config-airbnb/legacy', | ||
'eslint-config-airbnb/rules/es6', | ||
].map(require.resolve), | ||
'rules': {} | ||
rules: {} | ||
}; |
@@ -0,1 +1,9 @@ | ||
4.0.0 / 2016-01-22 | ||
================== | ||
- [breaking] require outer IIFE wrapping; flesh out guide section | ||
- [minor] Add missing `arrow-body-style`, `prefer-template` rules (#678) | ||
- [minor] Add `prefer-arrow-callback` to ES6 rules (to match the guide) (#677) | ||
- [Tests] run `npm run lint` as part of tests; fix errors | ||
- [Tests] use `parallelshell` to parallelize npm run-scripts | ||
3.1.0 / 2016-01-07 | ||
@@ -2,0 +10,0 @@ ================== |
module.exports = { | ||
'extends': [ | ||
extends: [ | ||
'eslint-config-airbnb/base', | ||
@@ -4,0 +4,0 @@ 'eslint-config-airbnb/rules/strict', |
module.exports = { | ||
'extends': [ | ||
extends: [ | ||
'eslint-config-airbnb/rules/best-practices', | ||
@@ -10,12 +10,12 @@ 'eslint-config-airbnb/rules/errors', | ||
].map(require.resolve), | ||
'env': { | ||
'browser': true, | ||
'node': true, | ||
'amd': false, | ||
'mocha': false, | ||
'jasmine': false | ||
env: { | ||
browser: true, | ||
node: true, | ||
amd: false, | ||
mocha: false, | ||
jasmine: false | ||
}, | ||
'ecmaFeatures': {}, | ||
'globals': {}, | ||
'rules': {} | ||
ecmaFeatures: {}, | ||
globals: {}, | ||
rules: {} | ||
}; |
{ | ||
"name": "eslint-config-airbnb", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"description": "Airbnb's ESLint config, following our styleguide", | ||
@@ -8,3 +8,4 @@ "main": "index.js", | ||
"lint": "eslint .", | ||
"test": "babel-tape-runner ./test/test-*.js" | ||
"tests-only": "babel-tape-runner ./test/test-*.js", | ||
"test": "parallelshell 'npm run lint' 'npm run tests-only'" | ||
}, | ||
@@ -45,3 +46,4 @@ "repository": { | ||
"react": "^0.13.3", | ||
"tape": "^4.2.2" | ||
"tape": "^4.2.2", | ||
"parallelshell": "^2.0.0" | ||
}, | ||
@@ -48,0 +50,0 @@ "peerDependencies": { |
module.exports = { | ||
'rules': { | ||
// Enforces getter/setter pairs in objects | ||
// enforces getter/setter pairs in objects | ||
'accessor-pairs': 0, | ||
@@ -16,3 +16,3 @@ // treat var statements as if they were block scoped | ||
// encourages use of dot notation whenever possible | ||
'dot-notation': [2, { 'allowKeywords': true}], | ||
'dot-notation': [2, { 'allowKeywords': true }], | ||
// enforces consistent newlines before or after dots | ||
@@ -112,3 +112,4 @@ 'dot-location': 0, | ||
// require immediate function invocation to be wrapped in parentheses | ||
'wrap-iife': [2, 'any'], | ||
// http://eslint.org/docs/rules/wrap-iife.html | ||
'wrap-iife': [2, 'outside'], | ||
// require or disallow Yoda conditions | ||
@@ -115,0 +116,0 @@ 'yoda': 2 |
@@ -25,2 +25,5 @@ module.exports = { | ||
'rules': { | ||
// enforces no braces where they can be omitted | ||
// http://eslint.org/docs/rules/arrow-body-style | ||
'arrow-body-style': [2, 'as-needed'], | ||
// require parens in arrow function arguments | ||
@@ -46,2 +49,4 @@ 'arrow-parens': 0, | ||
'object-shorthand': [2, 'always'], | ||
// suggest using arrow functions as callbacks | ||
'prefer-arrow-callback': 2, | ||
// suggest using of const declaration for variables that are never modified after declared | ||
@@ -53,2 +58,5 @@ 'prefer-const': 2, | ||
'prefer-reflect': 0, | ||
// suggest using template literals instead of string concatenation | ||
// http://eslint.org/docs/rules/prefer-template | ||
'prefer-template': 2, | ||
// disallow generator functions that do not have yield | ||
@@ -55,0 +63,0 @@ 'require-yield': 0 |
@@ -13,6 +13,6 @@ module.exports = { | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md | ||
'react/display-name': [0, {'acceptTranspilerName': false}], | ||
'react/display-name': [0, { 'acceptTranspilerName': false }], | ||
// Forbid certain propTypes (any, array, object) | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md | ||
'react/forbid-prop-types': [0, {'forbid': ['any', 'array', 'object']}], | ||
'react/forbid-prop-types': [0, { 'forbid': ['any', 'array', 'object'] }], | ||
// Enforce boolean attributes notation in JSX | ||
@@ -26,3 +26,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md | ||
'react/jsx-curly-spacing': [0, 'never', {'allowMultiline': true}], | ||
'react/jsx-curly-spacing': [0, 'never', { 'allowMultiline': true }], | ||
// Enforce event handler naming conventions in JSX | ||
@@ -42,3 +42,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md | ||
'react/jsx-max-props-per-line': [0, {'maximum': 1}], | ||
'react/jsx-max-props-per-line': [0, { 'maximum': 1 }], | ||
// Prevent usage of .bind() and arrow functions in JSX props | ||
@@ -49,3 +49,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md | ||
'react/jsx-no-duplicate-props': [0, {'ignoreCase': false}], | ||
'react/jsx-no-duplicate-props': [0, { 'ignoreCase': false }], | ||
// Prevent usage of unwrapped JSX strings | ||
@@ -74,3 +74,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md | ||
'react/jsx-uses-react': [2, {'pragma': 'React'}], | ||
'react/jsx-uses-react': [2, { 'pragma': 'React' }], | ||
// Prevent variables used in JSX to be incorrectly marked as unused | ||
@@ -84,3 +84,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md | ||
'react/no-deprecated': [1, {"react": "0.14.0"}], | ||
'react/no-deprecated': [1, { 'react': '0.14.0' }], | ||
// Prevent usage of setState in componentDidMount | ||
@@ -100,3 +100,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md | ||
'react/no-multi-comp': [2, {'ignoreStateless': true}], | ||
'react/no-multi-comp': [2, { 'ignoreStateless': true }], | ||
// Prevent usage of setState | ||
@@ -116,3 +116,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md | ||
'react/prop-types': [2, {'ignore': [], customValidators: []}], | ||
'react/prop-types': [2, { 'ignore': [], customValidators: [] }], | ||
// Prevent missing React when using JSX | ||
@@ -123,3 +123,3 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md | ||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-extension.md | ||
'react/require-extension': [0, {'extensions': ['.jsx']}], | ||
'react/require-extension': [0, { 'extensions': ['.jsx'] }], | ||
// Prevent extra closing tags for components without children | ||
@@ -126,0 +126,0 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md |
@@ -6,7 +6,7 @@ module.exports = { | ||
// enforce one true brace style | ||
'brace-style': [2, '1tbs', {'allowSingleLine': true }], | ||
'brace-style': [2, '1tbs', { 'allowSingleLine': true }], | ||
// require camel case names | ||
'camelcase': [2, {'properties': 'never'}], | ||
'camelcase': [2, { 'properties': 'never' }], | ||
// enforce spacing before and after comma | ||
'comma-spacing': [2, {'before': false, 'after': true}], | ||
'comma-spacing': [2, { 'before': false, 'after': true }], | ||
// enforce one true comma style | ||
@@ -24,7 +24,8 @@ 'comma-style': [2, 'last'], | ||
'func-style': 0, | ||
// this option enforces minimum and maximum identifier lengths (variable names, property names etc.) | ||
// this option enforces minimum and maximum identifier lengths | ||
// (variable names, property names etc.) | ||
'id-length': 0, | ||
// this option sets a specific tab width for your code | ||
// https://github.com/eslint/eslint/blob/master/docs/rules/indent.md | ||
'indent': [2, 2, { "SwitchCase": 1, "VariableDeclarator": 1 }], | ||
'indent': [2, 2, { 'SwitchCase': 1, 'VariableDeclarator': 1 }], | ||
// specify whether double or single quotes should be used in JSX attributes | ||
@@ -34,3 +35,3 @@ // http://eslint.org/docs/rules/jsx-quotes | ||
// enforces spacing between keys and values in object literal properties | ||
'key-spacing': [2, {'beforeColon': false, 'afterColon': true}], | ||
'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }], | ||
// enforces empty lines around comments | ||
@@ -49,3 +50,3 @@ 'lines-around-comment': 0, | ||
// require a capital letter for constructors | ||
'new-cap': [2, {'newIsCap': true}], | ||
'new-cap': [2, { 'newIsCap': true }], | ||
// disallow the omission of parentheses when invoking a constructor with no arguments | ||
@@ -66,3 +67,3 @@ 'new-parens': 0, | ||
// disallow multiple empty lines and only one newline at the end | ||
'no-multiple-empty-lines': [2, {'max': 2, 'maxEOF': 1}], | ||
'no-multiple-empty-lines': [2, { 'max': 2, 'maxEOF': 1 }], | ||
// disallow nested ternary expressions | ||
@@ -100,3 +101,3 @@ 'no-nested-ternary': 2, | ||
// enforce spacing before and after semicolons | ||
'semi-spacing': [2, {'before': false, 'after': true}], | ||
'semi-spacing': [2, { 'before': false, 'after': true }], | ||
// require or disallow use of semicolons instead of ASI | ||
@@ -103,0 +104,0 @@ 'semi': [2, 'always'], |
@@ -22,3 +22,3 @@ module.exports = { | ||
// disallow declaration of variables that are not used in the code | ||
'no-unused-vars': [2, {'vars': 'local', 'args': 'after-used'}], | ||
'no-unused-vars': [2, { 'vars': 'local', 'args': 'after-used' }], | ||
// disallow use of variables before they are defined | ||
@@ -25,0 +25,0 @@ 'no-use-before-define': 2 |
import test from 'tape'; | ||
import { CLIEngine } from 'eslint'; | ||
import eslintrc from '../'; | ||
import baseConfig from '../base'; | ||
import reactRules from '../rules/react'; | ||
@@ -12,3 +11,3 @@ | ||
// This rule fails when executing on text. | ||
rules: {indent: 0}, | ||
rules: { indent: 0 }, | ||
}); | ||
@@ -15,0 +14,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35317
20
710
6