This package provides Just Eat's base JS .eslintrc as an extensible shared config.
It extends the eslint-config-airbnb-base ruleset with our own set of JS linting rules.
Many thanks to the work that the Airbnb team have put in on creating their template for extension rules – we have liberally borrowed from their structure and documentation in creating this ruleset.
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint
and eslint-plugin-import
.
- Install the correct versions of each package, which are listed by the command:
npm info "@justeat/eslint-config-fozzie@latest" peerDependencies
Linux/OSX users can simply run
(
export PKG=@justeat/eslint-config-fozzie;
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 @justeat/eslint-config-fozzie 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 @justeat/eslint-config-fozzie
The cli will produce and run a command like:
npm install --save-dev @justeat/eslint-config-fozzie eslint@^#.#.# eslint-plugin-import@^#.#.#
- Add
"extends": "@justeat/eslint-config-fozzie"
to your .eslintrc
You can run tests on this ruleset with npm test
.
You can make sure this module lints with itself using npm run lint
.