Symph's eslint-config
@symphco/eslint-config
lints your typescript projects with ease, based on the
popular javascript code style guide from Airbnb.
The config is built upon Airbnb's ESLint rules with additional rules and optimizations.
Features
- Based on the popular javascript code style guide from Airbnb
- With react, react-hooks, sonarjs, and prettier support
Installation
Install the package with
NPM:
npm install @symphco/eslint-config --save-dev
Yarn:
yarn add @symphco/eslint-config -D
@symphco/eslint-config
requires you to take care of it's peerDependencies
.
Install the correct version of each peerDependencies
package, which are listed
with the following command:
NPM:
npm info "@symphco/eslint-config@latest" peerDependencies
If using npm 5+, use this shortcut:
NPM:
npx install-peerdeps --dev @symphco/eslint-config
Yarn:
yarn add @symphco/eslint-config -D --peer
Usage
Now add @symphco/eslint-config
to either your package.json
:
{
"eslintConfig": {
"extends": "@symphco/eslint-config"
}
}
to your .eslintrc
:
{
"extends": "@symphco/eslint-config"
}
or .eslintrc.js
:
module.exports = {
extends: '@symphco/eslint-config',
}
Prettier Config
This is how you can use or extend the @symphco/eslint-config
prettier config in your
app:
// prettier.config.js
module.exports = require('@symphco/eslint-config/prettier.config')