@luoxiao123/eslint-config
v5.2.5
Published
ESLint Shareable Configuration for Typescrpt
Downloads
7
Maintainers
Readme
eslint-config
A strict TypeScript ESLint Shareable Config for instead of TSlint
说明
- 规则根据
@waiting/eslint-config
fork,并根据自己项目进行修改
Features
@waiting/eslint-config/recommended
extends and customize fromeslint-plugin-import
eslint-plugin-node
eslint-plugin-unicorn
eslint:recommended
@typescript-eslint/recommended
@typescript-eslint/recommended-requiring-type-checking
@waiting/eslint-config
extends@waiting/eslint-config/strict
and more strict rules enabled
Install
npm i -D @waiting/eslint-config eslint
Usage
Shareable configs are designed to work with the extends
feature of .eslintrc.*
files.
You can learn more about
Shareable Configs on the
official ESLint website.
Add this to your .eslintrc.*
file:
.eslintrc.yml
extends: '@waiting/eslint-config'
.eslintrc.json
{ "extends": "@waiting/eslint-config" }
You can override settings from the shareable config by adding them directly into your
.eslintrc.*
file.
And add file .eslintrc.yml
under the folder such as ./test
for fast linting with less strict rules:
# .eslintrc.yml
extends: '@waiting/eslint-config/recommended'
Linting
eslint --fix src/**/*.ts
eslint src/**/*.{ts,js}