Extremely oppinionated ESLint configs for development for vanilla JavaScript, TypeScript, and Vue 3.
Each package can be installed separately, and they all extend the basic package.
pnpm add -D eslint @moso/eslint-config
{
"extends": "@moso",
}
You shouldn't need an
.eslintignore
as presets are providing it
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Install the VS Code ESLint extension and create the file .vscode/settings.json
with the following config:
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
When a .tsconfig
is found, TypeScript overrides will kick in, otherwise the basic rules are in play.
Install and configure stylelint yourself. This project doesn't lint CSS.
Just override the rules in your .eslintrc
-file:
{
"extends": "@moso",
"rules": {
// insert your rules here
},
}