1.3.0 • Published 1 year ago
@neuledge/eslint-config v1.3.0
ESLint Default Config
Initial Setup
- Install the package:
pnpm add -D eslint husky lint-staged prettier @neuledge/eslint-config
- Create a
.eslintrc.json
file with the following content:
{
"extends": "@neuledge",
"parserOptions": {
"project": ["./tsconfig.eslint.json", "./packages/*/tsconfig.json"]
}
}
- Create a
.prettierrc.json
file with the following content:
{
"singleQuote": true
}
- Add the following scripts to your
package.json
:
{
"scripts": {
"fix": "pnpm lint:fix",
"lint": "eslint . --ext \"js,ts,mjs,cjs\"",
"lint:fix": "pnpm lint --fix",
"lint:strict": "pnpm lint --max-warnings 0"
}
}
- Add
lint-state
to the end of yourpackage.json
file:
{
"lint-staged": {
"*.{js,ts,mjs,cjs}": "eslint"
}
}
- Install and configure husky:
pnpm husky init
echo 'NODE_OPTIONS="--max_old_space_size=4096" npx --no-save lint-staged' > .husky/pre-commit
Usage
Linting
pnpm lint
Fixing Linting Errors
pnpm fix
Strict Linting
(Best used in CI)
pnpm lint:strict
2.0.0-type-check.0
1 year ago
1.3.0
1 year ago
1.2.0
2 years ago
1.1.1
2 years ago
1.0.2
2 years ago
1.1.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.0.0-alpha.20
2 years ago
1.0.0-alpha.18
3 years ago
1.0.0-alpha.14
3 years ago
1.0.0-alpha.9
3 years ago
1.0.0-alpha.13
3 years ago
1.0.0-alpha.8
3 years ago
1.0.0-alpha.7
3 years ago
1.0.0-alpha.6
3 years ago
1.0.0-alpha.5
3 years ago
1.0.0-alpha.4
3 years ago