@leohxj/eslint-config-dawn-base
v1.0.5
Published
my own base JS ESLint/TSLint config
Downloads
14
Readme
eslint-config-dawn-base
基于 ES6 和 TS 的 eslint config.
按环境区分使用
Node
npm i -D @leohxj/eslint-config-dawn-base eslint eslint-plugin-node
配置:
{
"extends": [
"@leohxj/eslint-config-dawn-base/node"
]
}
Browser(es6)
npm i -D @leohxj/eslint-config-dawn-base eslint eslint-plugin-import
{
"extends": [
"@leohxj/eslint-config-dawn-base"
]
}
ES(babel)
npm i -D @leohxj/eslint-config-dawn-base eslint eslint-plugin-import babel-eslint eslint-plugin-babel
{
"extends": [
"@leohxj/eslint-config-dawn-base/babel"
]
}
Typescript
npm i -D @leohxj/eslint-config-dawn-base eslint eslint-plugin-import @typescript-eslint/parser @typescript-eslint/eslint-plugin
{
"extends": [
"@leohxj/eslint-config-dawn-base/typescript",
]
}
Prettier
npm i -D prettier, eslint-plugin-prettier, eslint-config-prettier
ES 版本配置:
{
"extends": [
"@leohxj/eslint-config-dawn-base",
"plugin:prettier/recommended"
]
}
Babel 版本配置:
{
"extends": [
"@leohxj/eslint-config-dawn-base/babel",
"plugin:prettier/recommended",
"prettier/babel"
]
}
TS 版本配置:
{
"extends": [
"@leohxj/eslint-config-dawn-base/typescript",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
]
}