0.1.1 • Published 2 years ago
@uselessjs/eslint-config-base v0.1.1
@uselessjs/eslint-config-base
base eslint config presets
- Auto fix for formatting with prettier
- lint JavaScript
- Lint also for JSON, yaml, markdown
- Sorted imports, dangling commas for cleaner commit diff
- Reasonable defaults, best practices, only one-line of config
- Default Alias mapping "@" => "src", "~" => "./"
Usage
Install
pnpm i -D eslint @uselessjs/eslint-config-base
Config eslint (.eslintrc | .eslintrc.js | .eslintrc.json)
{
"extends": "@uselessjs/eslint-config-base"
}
You don't need .eslintignore normally as it has been provided by the preset.
add import alias
{
"settings": {
"import/resolver": {
"alias": { // default alias
"map": [
["~", "."],
["@", "./src"]
],
"extensions": [".js", ".jsx", ".mjs", ".ts", ".tsx", "mts", ".d.ts"]
}
}
}
}
Add scripts for package.json
For example:
{
"scripts": {
"lint": "eslint . --fix"
}
}
0.1.1
2 years ago
0.1.0
2 years ago
0.0.2-beta.0
2 years ago
0.0.1
2 years ago
0.0.1-beta.4
2 years ago
0.0.1-beta.3
2 years ago
0.0.0
2 years ago