1.0.0-alpha.2 • Published 7 years ago
@fcv/eslint-config v1.0.0-alpha.2
ESLint config
ESLint configuration base for FCV projects.
Also includes the rules for Prettier.
Installation
npm:
$ npm i -D eslint prettier @fcv/eslint-configyarn:
$ yarn add -D eslint prettier @fcv/eslint-configCreate
.eslintrc.jsin your project root and extend with one or more of the included configurations.module.exports = { extends: ['@fcv'], }Configurations:
@fcvor@fcv/eslint-config- includesbaseandreact@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 includereactrules)
Create
prettier.config.jsmodule.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
.jsfiles in the project directory as well as all files in thesrcandconfigfolders with subfolders.
1.0.0-alpha.2
7 years ago