This package includes the shareable ESLint configuration used by Skyscanner. It requires eslint
, babel-eslint
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-react
, eslint-plugin-jsx-a11y
and eslint-plugin-backpack
.
-
Ensure packages are installed with correct version numbers by running:
npx install-peerdeps --dev eslint-config-skyscanner
If using npm < 5, Linux/OSX users can run
( export PKG=eslint-config-skyscanner; 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-skyscanner eslint@^#.#.# babel-eslint@^#.#.# eslint-config-airbnb@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-react@^#.#.# eslint-plugin-backpack@^#.#.#
If using npm < 5, 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-skyscanner
The cli will produce and run a command like:
npm install --save-dev eslint-config-skyscanner eslint@^#.#.# babel-eslint@^#.#.# eslint-config-airbnb@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-react@^#.#.# eslint-plugin-backpack@^#.#.#
-
Add
"extends": "skyscanner"
to your .eslintrc