Détail du package

@ndelangen/eslint-config-airbnb

airbnb26MIT14.1.0

Airbnb's ESLint config, following our styleguide

eslint, eslintconfig, config, airbnb

readme

eslint-config-airbnb

npm version

This package provides Airbnb's .eslintrc as an extensible shared config.

Usage

We export three ESLint configurations for your usage.

eslint-config-airbnb

Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires eslint, eslint-plugin-import, eslint-plugin-react, and eslint-plugin-jsx-a11y.

  1. Install the correct versions of each package, which are listed by the command:

    npm info "eslint-config-airbnb@latest" peerDependencies

    Linux/OSX users can run

    (
     export PKG=eslint-config-airbnb;
     npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
    )

    Which produces and runs a command like:

    npm install --save-dev eslint-config-airbnb eslint@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-react@^#.#.#

    Windows users can either install all the peer dependencies manually, or use the install-peerdeps cli tool.

    npm install -g install-peerdeps
    install-peerdeps --dev eslint-config-airbnb

    The cli will produce and run a command like:

    npm install --save-dev eslint-config-airbnb eslint@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-react@^#.#.#
  2. Add "extends": "airbnb" to your .eslintrc

eslint-config-airbnb/base

This entry point is deprecated. See eslint-config-airbnb-base.

eslint-config-airbnb/legacy

This entry point is deprecated. See eslint-config-airbnb-base.

See Airbnb's Javascript styleguide and the ESlint config docs for more information.

Improving this config

Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Perhaps in a distant future, we could use literate programming to structure our README as test cases for our .eslintrc?

You can run tests with npm test.

You can make sure this module lints with itself using npm run lint.

changelog

14.1.0 / 2017-02-05

  • [patch] allow eslint-plugin-jsx-a11y to be v3 or v4. Remove no-marquee rule temporarily.
  • [deps] update eslint-config-airbnb-base, babel-preset-airbnb, eslint

14.0.0 / 2017-01-08

  • [breaking] enable react/no-array-index-key, react/require-default-props
  • [breaking] [deps] update eslint, eslint-plugin-import, eslint-plugin-react, eslint-config-airbnb-base
  • [breaking] [deps] update eslint-plugin-jsx-a11y to v3 (#1166)
  • [docs] add note about install-peerdeps (#1234)
  • [docs] Updated instructions to support non-bash users (#1214)

13.0.0 / 2016-11-06

  • [breaking] Enable import/no-webpack-loader-syntax rule (#1123)
  • [patch] class-methods-use-this: exempt React getChildContext (#1094)
  • [patch] set react/no-unused-prop-types skipShapeProps (#1099)
  • [deps] [breaking] update eslint, eslint-config-airbnb-base, eslint-plugin-jsx-a11y, eslint-plugin-react, eslint-plugin-import
  • [dev deps] update babel-preset-airbnb, eslint, eslint-find-rules, tape, safe-publish-latest
  • [Tests] on node v7
  • [docs] ensure latest version of config is installed (#1121)

12.0.0 / 2016-09-24

  • [breaking] Enable react rules: react/no-unescaped-entities, react/no-children-prop
  • [breaking] [deps] update eslint-config-airbnb-base
  • [patch] disable deprecated and redundant react/require-extension rule (#978)

11.2.0 / 2016-09-23

  • [new] set ecmaVersion to 2017; enable object rest/spread; update babel-preset-airbnb
  • [deps] update eslint, eslint-config-airbnb-base, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react, eslint-find-rules, safe-publish-latest

11.1.0 / 2016-09-11

  • [deps] update eslint-config-airbnb-base, eslint

11.0.0 / 2016-09-08

  • [breaking] enable react rules: react/no-danger-with-children, react/no-unused-prop-types, react/style-prop-object, react/forbid-prop-types, react/jsx-no-duplicate-props; set react/no-danger to “warn”
  • [breaking] enable jsx-a11y rules: jsx-a11y/anchor-has-content, jsx-a11y/tabindex-no-positive, jsx-a11y/no-static-element-interactions
  • [deps] update eslint, eslint-plugin-react, eslint-config-airbnb-base, eslint-find-rules, eslint-plugin-import, eslint-plugin-jsx-a11y
  • [patch] set ignoreCase to true in disabled rules.
  • [docs] use “#” in example command rather than version numbers (#984)

10.0.1 / 2016-08-12

  • [deps] update eslint, eslint-find-rules, eslint-plugin-jsx-a11y, eslint-plugin-import, eslint-config-airbnb-base

10.0.0 / 2016-08-01

  • [breaking] enable jsx-a11y rules:
    • jsx-a11y/heading-has-content
    • jsx-a11y/html-has-lang
    • jsx-a11y/lang
    • jsx-a11y/no-marquee
    • jsx-a11y/scope
    • jsx-a11y/href-no-hash
    • jsx-a11y/label-has-for
  • [breaking] enable aria rules:
    • jsx-a11y/aria-props
    • jsx-a11y/aria-proptypes
    • jsx-a11y/aria-unsupported-elements
    • jsx-a11y/role-has-required-aria-props
    • jsx-a11y/role-supports-aria-props
  • [breaking] enable react rules:
    • react/jsx-filename-extension
    • react/jsx-no-comment-textnodes
    • react/jsx-no-target-blank
    • react/require-extension
    • react/no-render-return-value
    • react/no-find-dom-node
    • react/no-deprecated
  • [deps] [breaking] update eslint to v3, eslint-config-airbnb-base to v5, eslint-find-rules, eslint-plugin-import, eslint-plugin-jsx-a11y to v2, eslint-plugin-react to v6, tape. drop node < 4 support.
  • [deps] update eslint-config-airbnb-base, eslint-plugin-react, eslint-plugin-import, eslint-plugin-jsx-a11y, babel-tape-runner, add babel-preset-airbnb. ensure react is >= 0.13.0
  • [patch] loosen jsx-pascal-case rule to allow all caps component names
  • [tests] stop testing < node 4
  • [tests] use in-publish because coffeescript screwed up the prepublish script for everyone
  • [tests] Only run eslint-find-rules on prepublish, not in tests
  • [tests] Even though the base config may not be up to date in the main package, let’s npm link the base package into the main one for the sake of travis-ci tests
  • [docs] update the peer dep install command to dynamically look up the right version numbers when installing peer deps
  • add safe-publish-latest to prepublish

9.0.1 / 2016-05-08

  • [patch] update eslint-config-airbnb-base to v3.0.1

9.0.0 / 2016-05-07

  • [breaking] update eslint-config-airbnb-base to v3
  • [deps] update eslint-find-rules, eslint-plugin-import, eslint-plugin-jsx-a11y

8.0.0 / 2016-04-21

  • [breaking] Migrate non-React rules to a separate linter config (eslint-config-airbnb-base)
  • [breaking] disallow empty methods
  • [breaking] disallow empty restructuring patterns
  • [breaking] enable no-restricted-syntax rule
  • [breaking] enable global-require rule
  • [breaking] [react] enable react/jsx-curly-spacing rule (#693)
  • [semver-minor] [react] Add react/jsx-first-prop-new-line rule
  • [semver-minor] [react] enable jsx-equals-spacing rule
  • [semver-minor] [react] enable jsx-indent rule
  • [semver-minor] enforce spacing inside single-line blocks
  • [semver-minor] enforce no-underscore-dangle
  • [semver-minor] Enable import/no-unresolved and import/export rules (#825)
  • [semver-patch] Enable no-useless-concat rule which prefer-template already covers
  • [semver-patch] Allow == null (#542)
  • [dev deps / peer deps] update eslint, eslint-plugin-react, eslint-plugin-import
  • [dev deps / peer deps] update eslint-plugin-jsx-a11y and rename rules (#838)
  • [refactor] [react] separate a11y rules to their own file
  • [refactor] Add missing disabled rules.
  • [tests] Add eslint-find-rules to prevent missing rules

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)
  • [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

  • [new] Allow arrow functions in JSX props
  • [fix] re-enable no-confusing-arrow rule, with allowParens option enabled (#752, #791)
  • [dev deps] update tape, eslint, eslint-plugin-react
  • [peer deps] update eslint, eslint-plugin-react

6.1.0 / 2016-02-22

6.0.2 / 2016-02-22

6.0.1 / 2016-02-21

6.0.0 / 2016-02-21

5.0.1 / 2016-02-13

  • [fix] eslint peerDep should not include breaking changes

5.0.0 / 2016-02-03

  • [breaking] disallow unneeded ternary expressions
  • [breaking] Avoid lexical declarations in case/default clauses
  • [dev deps] update babel-tape-runner, eslint-plugin-react, react, tape

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

  • [minor] Allow multiple stateless components in a single file

3.0.2 / 2016-01-06

3.0.1 / 2016-01-06

  • [fix] because we use babel, keywords should not be quoted

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.1.0 / 2015-12-15

2.0.0 / 2015-12-03

1.0.2 / 2015-11-25

1.0.1 / 2015-11-25

  • erroneous publish

1.0.0 / 2015-11-08

  • require eslint v1.0.0 or higher
  • remove babel-eslint dependency

0.1.1 / 2015-11-05

0.1.0 / 2015-11-05

  • switch to modular rules files courtesy the eslint-config-default project and @taion. PR
  • export eslint-config-airbnb/legacy for ES5-only users. eslint-config-airbnb/legacy does not require the babel-eslint parser. PR

0.0.9 / 2015-09-24

0.0.8 / 2015-08-21

  • now has a changelog
  • now is modular (see instructions above for with react and without react versions)

0.0.7 / 2015-07-30

  • TODO: fill in