@evojs/eslint-plugin

7.1.0 • Public • Published

@evojs/eslint-plugin

Plugin for eslint.

Setup

ECMAScript

{
  "ignorePatterns": ["public/", "dist/", "node_modules/"],
  "root": true,
  "env": {
    "node": true
  },
  "plugins": ["@evojs"],
  "extends": ["plugin:@evojs/ecmascript"],
  "parserOptions": {
    "ecmaVersion": 2021
  },
  "rules": {},
  "overrides": []
}

TypeScript

You also need to install @typescript-eslint/parser, @typescript-eslint/eslint-plugin:

npm install --save-dev \
  @typescript-eslint/parser \
  @typescript-eslint/eslint-plugin
{
  "ignorePatterns": ["public/", "dist/", "node_modules/"],
  "root": true,
  "env": {
    "node": true
  },
  "plugins": ["@evojs"],
  "extends": ["plugin:@evojs/ecmascript"],
  "parserOptions": {
    "ecmaVersion": 2021
  },
  "rules": {},
  "overrides": [
    {
      "files": ["**/*.{ts,tsx}"],
      "plugins": ["@evojs"],
      "extends": ["plugin:@evojs/typescript"],
      "parserOptions": {
        "project": "tsconfig.json",
        "sourceType": "module"
      },
      "rules": {}
    }
  ]
}

React + TypeScript

You also need to install @typescript-eslint/parser, @typescript-eslint/eslint-plugin, eslint-plugin-react, eslint-plugin-react-hooks:

npm install --save-dev \
  @typescript-eslint/parser \
  @typescript-eslint/eslint-plugin \
  eslint-plugin-react \
  eslint-plugin-react-hooks
{
  "ignorePatterns": ["public/", "dist/", "node_modules/"],
  "root": true,
  "env": {
    "node": true
  },
  "plugins": ["@evojs"],
  "extends": ["plugin:@evojs/ecmascript", "plugin:@evojs/react"],
  "parserOptions": {
    "ecmaVersion": 2021
  },
  "rules": {},
  "overrides": [
    {
      "files": ["**/*.{ts,tsx}"],
      "plugins": ["@evojs"],
      "extends": ["plugin:@evojs/typescript"],
      "parserOptions": {
        "project": "tsconfig.json",
        "sourceType": "module"
      },
      "rules": {}
    }
  ],
  "settings": {
    "react": {
      "version": "detect"
    }
  }
}

Features

  1. All in one (ecmascript, react, typescript)
  2. Very convenient and strict linter configuration

License

Licensed under MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @evojs/eslint-plugin

Weekly Downloads

298

Version

7.1.0

License

MIT

Unpacked Size

36.4 kB

Total Files

6

Last publish

Collaborators

  • aristocr2t