@fcv/eslint-config
v1.0.0-alpha.2
Published
ESLint configuration base for FCV projects
Downloads
4
Readme
ESLint config
ESLint configuration base for FCV projects.
Also includes the rules for Prettier.
Installation
npm:
$ npm i -D eslint prettier @fcv/eslint-config
yarn:
$ yarn add -D eslint prettier @fcv/eslint-config
Create
.eslintrc.js
in your project root and extend with one or more of the included configurations.module.exports = { extends: ['@fcv'], }
Configurations:
@fcv
or@fcv/eslint-config
- includesbase
andreact
@fcv/eslint-config/base
(required) - includes recommend rules for JS projects@fcv/eslint-config/react
- includes recommended rules for React projects@fcv/eslint-config/next
- includes recommended rules for Next.js projects (does not includereact
rules)
Create
prettier.config.js
module.exports = require('@fcv/eslint-config/prettier.config');
(optional) Add npm scripts to your
package.json
, for example:"scripts": { "lint": "eslint *.js src config", "fix": "npm run lint -- --fix" }
Note: You'll have to adjust the files you want to lint. In this example ESLint will process all
.js
files in the project directory as well as all files in thesrc
andconfig
folders with subfolders.