2.0.0 • Published 2 months ago

@blole/node-setup-lint v2.0.0

Weekly downloads
-
License
-
Repository
github
Last release
2 months ago

@blole/node-setup-lint

Some default configs for linting react, typescript, javascript, json, markdown, etc. Uses the new eslint configuration file format

Installation

  1. Add the devDependency and a script

    {
      "scripts": {
        "lint": "eslint '**/*.{js,jsx,ts,tsx,json,md,html}' --max-warnings=0"
      },
      "devDependencies": {
        "@blole/node-setup-lint": "x.x.x"
      }
    }
  2. Create a eslint.config.js like

    import { eslintConfig } from '@blole/node-setup-lint';
    
    export default [
      eslintConfig.md,
      eslintConfig.json,
      eslintConfig.jsonc,
      eslintConfig.js,
      eslintConfig.ts,
      eslintConfig.tests,
      ...eslintConfig.editorconfig,
      eslintConfig.prettier,
    ];
  3. Create a prettier.config.js like

    import { prettierConfig } from '@blole/node-setup-lint';
    
    export default prettierConfig;

See apps/linted-example/ for an example.