This package provides u+i's base JS .eslintrc as an extensible shared config.
Install via npm:
Install the correct versions of each package, which are listed by the command:
npm info "@uandi/eslint-config@latest" peerDependencies
Linux/OSX users can run
(
export PKG="@uandi/eslint-config";
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 @uandi/eslint-config eslint@^#.#.# eslint-plugin-import@^#.#.#
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 @uandi/eslint-config
Our configuration contains all of our ESLint rules, including ECMAScript 6+. It requires eslint
and eslint-plugin-import
.
Add "extends": "@uandi/eslint-config"
to your .eslintrc
Lints ES5 and below. Requires eslint
and eslint-plugin-import
.
Add "extends": "@uandi/eslint-config/legacy"
to your .eslintrc