@magrathealabs/eslint-config-magrathealabs
v1.0.1
Published
ESLint shareable config for the Magrathea Labs style
Downloads
6
Readme
eslint-config-magrathealabs
This package includes our shareable ESLint configuration used by Magrathea Labs. This configuration is based in Airbnb Style Guide. One of our motivation to create this shareable configuration is that in all of our javascript projects we need to copy and paste the same ESLint configuration, only modifying piece of json/js in some cases, but using always the same dependencies. So now we only need to follow the installation and usage section and it's ready to use.
Installation
npm install --save-dev @magrathealabs/eslint-config-magrathealabs
# or
yarn add -D @magrathealabs/eslint-config-magrathealabs
Usage
Once the @magrathealabs/eslint-config-magrathealabs
package is installed, you can use it by specifying magrathealabs
in the [extends
] section at your .eslintrc.json
or .eslintrc.js
, ESLint will automatically insert the eslint-config-
.(http://eslint.org/docs/user-guide/configuring#extending-configuration-files) section of your ESLint configuration.
{
"extends": "@magrathealabs/eslint-config-magrathealabs",
"rules": {
// Additional, per-project rules...
}
}
After Configuration
After you've installed and configured the @magrathealabs/eslint-config-magrathealabs
in your package.json
you can add the script to run the linter:
"scripts": {
...
"lint": "eslint path/to/linter"
# or
"lint": "eslint ." #to check all files from source project
...
}
So you can just call this:
npm run lint
# or
yarn run lint
Linter will check your code style and return to you.