JSPM

  • Created
  • Published
  • Downloads 305
  • Score
    100M100P100Q83024F
  • License MIT

A strict eslint config for better code quality.

Package Exports

  • @git-validator/eslint-config

Readme

@git-validator/eslint-config

A strict eslint config for better code quality. Based on standard.js without any stylistic opinions.

Feature

  • Based on standard.js, but introduced more powerful rules to forbid stupid codes.
  • One-line of config.
  • Work well with Prettier without conflicts.
  • Modern. ESM first.
  • Ignore files configured in .gitignore. So you don't need a .eslintignore.
  • Lint js / mjs / cjs / jsx / ts / mts / cts / tsx / package.json files only.
  • Designed to work with NestJS and React out-of-box.

Usage

Install

pnpm add -D eslint @git-validator/eslint-config

Config eslint.config.js

import config from "@git-validator/eslint-config";

export default config;

Config package.json

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Note: Typescript project is required a tsconfig.eslint.json or tsconfig.json file in the root of the project. Otherwise, ts files will be ignored and only js files will be linted.

License

MIT