eslint-config-cdrainxv
v0.1.0
Published
eslint linter saddled with prettier formatter
Downloads
3
Readme
ESLINT-CONFIG-CDRAINXV
eslint-config-cdrainxv
is a very opinionated eslint config (or will be as
it is incrementally updated it stricter rules). This config is coupled with
prettier for easy formatting.
Usage
npm i eslint-config-cdrainxv
Add peer dependencies:
npm i eslint eslint-config-prettier eslint-plugin-prettier prettier prettier-eslint prettier-eslint-cli -D
Create
.eslintrc*
configuration fileinclude
cdrainxv
as an extention:.eslintrc.js
module.exports = { extends: ['cdrainxv'] }
.eslintrc.json
{ "extends": ["cdrainxv"] }
Add lint scripts to package.json:
"scripts": {
"lint": "prettier-eslint .",
"eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check"
}
Configure further with your own rules and/or plugins.
Check that your rules don't conflict with Prettier's own rules:
npm run eslint-check
Run linter:
npm run lint
References:
prettier/prettier prettier/eslint-plugin-prettier prettier/prettier-eslint prettier/prettier-eslint-cli eslint