1.5.1 • Published 8 months ago
@rubiin/eslint-config-ts v1.5.1
@rubiin/eslint-config
Usage
Install
pnpm add -D eslint @rubiin/eslint-config-ts
Config .eslintrc
{
"extends": "@rubiin/eslint-config-ts"
}
You don't need
.eslintignore
normally as it has been provided by the preset.
Add script for package.json
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
// .eslintrc.js
process.env.ESLINT_TSCONFIG = 'tsconfig.json'
module.exports = {
extends: '@rubiin/eslint-config-ts'
}
Lint Staged
If you want to apply lint and auto-fix before every commit, you can add the following to your package.json
:
{
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
and then
npm i -D lint-staged simple-git-hooks
FAQ
I prefer XXX...
Sure, you can override the rules in your .eslintrc
file.
{
"extends": "@rubiin/eslint-config-ts",
"rules": {
// your rules...
}
}
Or you can always fork this repo and make your own.
Check Also
- rubiin/dotfiles - My dotfiles
- rubiin/starter-ts - My starter template for TypeScript library
License
1.4.6
8 months ago
1.4.5
8 months ago
1.4.4
8 months ago
1.4.3
8 months ago
1.5.1
8 months ago
1.4.2
8 months ago
1.5.0
8 months ago
1.0.0-beta.0
9 months ago
0.0.1
9 months ago
0.0.2
9 months ago
0.0.2-beta.0
9 months ago
0.0.2-beta.1
9 months ago
0.0.2-beta.2
9 months ago
1.0.2
12 months ago
1.0.1
12 months ago
1.0.0
12 months ago