@fcv/eslint-config

1.0.0-alpha.2 • Public • Published

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
  1. 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 - includes base and react
    • @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 include react rules)
  2. Create prettier.config.js

    module.exports = require('@fcv/eslint-config/prettier.config');
  3. (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 the src and config folders with subfolders.

Readme

Keywords

none

Package Sidebar

Install

npm i @fcv/eslint-config

Weekly Downloads

1

Version

1.0.0-alpha.2

License

MIT

Unpacked Size

3.9 kB

Total Files

8

Last publish

Collaborators

  • novascreen