Socket
Socket
Sign inDemoInstall

eslint-config-airbnb

Package Overview
Dependencies
88
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.1 to 3.0.0

13

CHANGELOG.md

@@ -0,1 +1,14 @@

3.0.0 / 2016-01-04
==================
- [breaking] enable `quote-props` rule (#632)
- [breaking] Define a max line length of 100 characters (#639)
- [breaking] [react] Minor cleanup for the React styleguide, add `react/jsx-no-bind` (#619)
- [breaking] update best-practices config to prevent parameter object manipulation (#627)
- [minor] Enable react/no-is-mounted rule (#635, #633)
- [minor] Sort react/prefer-es6-class alphabetically (#634)
- [minor] enable react/prefer-es6-class rule
- Permit strict mode in "legacy" config
- [react] add missing rules from eslint-plugin-react (enforcing where necessary) (#581)
- [dev deps] update `eslint-plugin-react`
2.1.1 / 2015-12-15

@@ -2,0 +15,0 @@ ==================

1

index.js
module.exports = {
'extends': [
'eslint-config-airbnb/base',
'eslint-config-airbnb/rules/strict',
'eslint-config-airbnb/rules/react',

@@ -5,0 +6,0 @@ ].map(require.resolve),

1

legacy.js

@@ -7,3 +7,2 @@ module.exports = {

'eslint-config-airbnb/rules/node',
'eslint-config-airbnb/rules/strict',
'eslint-config-airbnb/rules/style',

@@ -10,0 +9,0 @@ 'eslint-config-airbnb/rules/variables'

{
"name": "eslint-config-airbnb",
"version": "2.1.1",
"version": "3.0.0",
"description": "Airbnb's ESLint config, following our styleguide",

@@ -42,3 +42,3 @@ "main": "index.js",

"eslint": "^1.10.3",
"eslint-plugin-react": "^3.11.3",
"eslint-plugin-react": "^3.12.0",
"react": "^0.13.3",

@@ -45,0 +45,0 @@ "tape": "^4.2.2"

# eslint-config-airbnb
[![npm version](https://badge.fury.io/js/eslint-config-airbnb.svg)](http://badge.fury.io/js/eslint-config-airbnb)
This package provides Airbnb's .eslintrc as an extensible shared config.

@@ -4,0 +6,0 @@

@@ -77,3 +77,5 @@ module.exports = {

// disallow reassignment of function parameters
'no-param-reassign': 2,
// disallow parameter object manipulation
// rule: http://eslint.org/docs/rules/no-param-reassign.html
'no-param-reassign': [2, { 'props': true }],
// disallow use of process.env

@@ -80,0 +82,0 @@ 'no-process-env': 0,

@@ -5,4 +5,2 @@ module.exports = {

'max-depth': [0, 4],
// specify the maximum length of a line in your program
'max-len': [0, 80, 4],
// limits the number of parameters that can be used in the function declaration.

@@ -9,0 +7,0 @@ 'max-params': [0, 3],

@@ -8,6 +8,11 @@ module.exports = {

},
// View link below for react rules documentation
// https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules
'rules': {
// Prevent missing displayName in a React component definition
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
'react/display-name': 0,
'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']}],
// Enforce boolean attributes notation in JSX

@@ -21,21 +26,48 @@ // 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,
'react/jsx-curly-spacing': [0, 'never', {'allowMultiline': true}],
// Enforce event handler naming conventions in JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
'react/jsx-handler-names': [0, {
'eventHandlerPrefix': 'handle',
'eventHandlerPropPrefix': 'on',
}],
// Validate props indentation in JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
'react/jsx-indent-props': [2, 2],
// Validate JSX has key prop when in array or iterator
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
'react/jsx-key': 0,
// Limit maximum of props on a single line in JSX
// 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}],
// Prevent usage of .bind() and arrow functions in JSX props
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
'react/jsx-no-bind': 2,
// Prevent duplicate props in JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
'react/jsx-no-duplicate-props': 0,
'react/jsx-no-duplicate-props': [0, {'ignoreCase': false}],
// Prevent usage of unwrapped JSX strings
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
'react/jsx-no-literals': 0,
// Disallow undeclared variables in JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
'react/jsx-no-undef': 2,
// Enforce PascalCase for user-defined JSX components
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
'react/jsx-pascal-case': 0,
// Enforce propTypes declarations alphabetical sorting
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-prop-types.md
'react/jsx-sort-prop-types': 0,
'react/jsx-sort-prop-types': [0, {
'ignoreCase': false,
'callbacksLast': false,
}],
// Enforce props alphabetical sorting
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
'react/jsx-sort-props': 0,
'react/jsx-sort-props': [0, {
'ignoreCase': false,
'callbacksLast': false,
}],
// Prevent React to be incorrectly marked as unused
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
'react/jsx-uses-react': 2,
'react/jsx-uses-react': [2, {'pragma': 'React'}],
// Prevent variables used in JSX to be incorrectly marked as unused

@@ -47,2 +79,5 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md

'react/no-danger': 0,
// Prevent usage of deprecated methods
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
'react/no-deprecated': [1, {"react": "0.14.0"}],
// Prevent usage of setState in componentDidMount

@@ -54,11 +89,26 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md

'react/no-did-update-set-state': [2, 'allow-in-func'],
// Prevent direct mutation of this.state
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
'react/no-direct-mutation-state': 0,
// Prevent usage of isMounted
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
'react/no-is-mounted': 2,
// Prevent multiple component definition per file
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
'react/no-multi-comp': 2,
'react/no-multi-comp': [2, {'ignoreStateless': false}],
// Prevent usage of setState
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
'react/no-set-state': 0,
// Prevent using string references
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
'react/no-string-refs': 0,
// Prevent usage of unknown DOM property
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
'react/no-unknown-property': 2,
// Require ES6 class declarations over React.createClass
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
'react/prefer-es6-class': [2, 'always'],
// Prevent missing props validation in a React component definition
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
'react/prop-types': 2,
'react/prop-types': [2, {'ignore': [], customValidators: []}],
// Prevent missing React when using JSX

@@ -69,3 +119,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,
'react/require-extension': [0, {'extensions': ['.jsx']}],
// Prevent extra closing tags for components without children

@@ -92,4 +142,4 @@ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md

return: true
}]
}],
}
};

@@ -37,2 +37,8 @@ module.exports = {

'linebreak-style': 0,
// specify the maximum length of a line in your program
// https://github.com/eslint/eslint/blob/master/docs/rules/max-len.md
'max-len': [2, 100, 2, {
'ignoreUrls': false,
'ignoreComments': false
}],
// specify the maximum depth callbacks can be nested

@@ -83,3 +89,4 @@ 'max-nested-callbacks': 0,

// require quotes around object literal property names
'quote-props': 0,
// http://eslint.org/docs/rules/quote-props.html
'quote-props': [2, 'as-needed', { 'keywords': true, 'unnecessary': true, 'numbers': false }],
// specify whether double or single quotes should be used

@@ -86,0 +93,0 @@ 'quotes': [2, 'single', 'avoid-escape'],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc