$ npm i --save-dev @trbl/eslint-config
$ npm info @trbl/eslint-config peerDependencies
$ npm i --save-dev <dependency>@<version> # for each dependency in the above output
$ # or
$ yarn add --dev @trbl/eslint-config
$ yarn info @trbl/eslint-config peerDependencies
$ yarn add --dev <dependency>@<version> # for each dependency in the above output
There are a number of configurations for consumption, all of which are packaged together as the default export — or they can be selectively extended, which prevents the path names from being written shorthand.
{
"extends": "@trbl"
// or selectively extend any config(s)
// "extends": [
// "@trbl/eslint-config/configs/base",
// "@trbl/eslint-config/configs/jest",
// "@trbl/eslint-config/configs/react",
// ]
}
If using Webpack, install and configure eslint-loader
to have loaded files automatically linted.
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
fix: true,
emitWarning: true,
},
}
For working examples, see the demo app.
$ git clone git@github.com:trouble/eslint-config.git
$ yarn
$ yarn demo
$ open http://localhost:3000
Help us, or let us help you help us.
MIT Copyright (c) TRBL, LLC