My Eslint Rules
- Base on Standard
- Provide Typescript / Vue / React Support
- Provide JSON Support
- Follow with eslint-config-standard
- Provide
JSON
file check
pnpm i -D eslint eslint-config-ted
Config .eslintrc
{
"extends": [
"ted"
]
}
- Follow with eslint-config-standard-with-typescript
pnpm i -D typescript
Config .eslintrc
{
"extends": [
"ted",
"ted/typescript"
],
"parserOptions": {
"project": [
'./tsconfig.json'
]
}
}
- Follow with eslint-config-vue/vue3-strongly-recommended rules
- Default open
vue/setup-compiler-macros
config
Config .eslintrc
{
"extends": [
"ted",
"ted/vue"
]
}
Config .eslintrc
{
"extends": [
"ted",
"ted/vue",
"ted/typescript"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"project": [
"./tsconfig.json"
],
"extraFileExtensions": [".vue"]
}
}
props
type cannot be infered in template expression when not import vue related api
- Follow with eslint-config-react/recommended rules
- Hooks follow with eslint-config-react-hooks/recommended rules
Config .eslintrc
{
"extends": [
"ted",
"ted/react"
]
}
Config .eslintrc
{
"extends": [
"ted",
"ted/react",
"ted/typescript"
]
}
this because lint conflict with js and ts, right now is not support use both of them.
MIT
Inspired by