@blole/node-setup-lint
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@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.

Readme

Keywords

none

Package Sidebar

Install

npm i @blole/node-setup-lint

Weekly Downloads

1

Version

2.0.0

License

none

Unpacked Size

30.1 kB

Total Files

8

Last publish

Collaborators

  • blole