0.2.11 • Published 3 years ago
eslint-config-afuh v0.2.11
eslint-config-afuh
These are my settings for ESlint.
Install
If using npm 5+, use this shortcut
npx install-peerdeps --dev eslint-config-afuh
if using npm < 5, install the correct versions of each package, which are listed by the command:
npm info "eslint-config-afuh@latest" peerDependencies
Usage
Create an .eslintrc
file with:
{
"extends": "afuh"
}
If you are using React
{
"extends": "afuh/react"
}
Settings
Add or overwrite ESlint rules.
{
"extends": "afuh",
"rules": {
"more-rules-here": 1
}
}
Prettier
If you want to use Prettier add the following packages:
npm i --save-dev prettier eslint-plugin-prettier eslint-config-prettier
Update the .eslintrc
file.
{
"extends": ["afuh", "plugin:prettier/recommended"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
Install everything
npx eslint-config-afuh
This is going to install eslint-config-afuh
, the peer dependencies and Prettier. It's going to also generate a couple of config files if they don't exist.