自定义的一套 ESlint 规则,包括 Vue, React, TypeScript

eslint, eslintconfig, config, prettier, airbnb, javascript, styleguide, es2015, es2016, es2017, es2018
npm install eslint-plugin-hsl@1.0.4



Maintenance Status NPM version Build Status Dependency Status Coverage Status Code Climate Tidelift

自定义的一套 ESlint 规则,包括 Vue, React,TypeScript,完善中...

🔨 Installation

Install ESLint either locally or globally. (Note that locally, per project, is strongly preferred)

$ npm install eslint --save-dev

If you installed ESLint globally, you have to install React plugin globally too. Otherwise, install it locally.

$ npm install eslint-plugin-hsl --save-dev

⚙️ Configuration

Configure in the Vue project:

  "extends": [

Configure in the React project:

  "extends": [

Configure in the TypeScript project:

  "extends": [

If you do not use a preset you will need to specify individual rules and add extra configuration.

Add "hsl" to the plugins section.

  "plugins": [


What is the "Use the latest vue-eslint-parser" error?

The most rules of eslint-plugin-vue require vue-eslint-parser to check <template> ASTs.

Make sure you have one of the following settings in your .eslintrc:

  • "extends": ["plugin:vue/recommended"]
  • "extends": ["plugin:vue/base"]

If you already use other parser (e.g. "parser": "babel-eslint"), please move it into parserOptions, so it doesn't collide with the vue-eslint-parser used by this plugin's configuration:

- "parser": "babel-eslint",
  "parserOptions": {
+     "parser": "babel-eslint",
      "ecmaVersion": 2017,
      "sourceType": "module"

🔑 License

ESLint-plugin-Hsl is licensed under the MIT License.