0.0.3 • Published 9 months ago
@andre-brdoch/eslint-config-vitest v0.0.3
@andre-brdoch/eslint-config-vitest
An opinionated and sharable vitest eslint config for the world to use 👨🔬
Installation
# npm
npm i -D @andre-brdoch/eslint-config-vitest eslint@^8.56.0
# yarn
yarn add -D @andre-brdoch/eslint-config-vitest eslint@^8.56.0
Usage
// .eslintrc.cjs
module.exports = {
// regular config...
overrides: [
{
// test files
files: ['**/*.test.js'],
extends: ['@andre-brdoch/eslint-config-vitest'],
},
],
}
Done! 💥
Editor integration
VS Code
Add the extension dbaeumer.vscode-eslint
To make other developers get a warning if they open the project without the extension installed, commit this to your project under .vscode/extensions.json
:
{
"recommendations": ["dbaeumer.vscode-eslint"]
}
Edit your VSCode settings to include:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit" // or "always"
}
}
To make this work also for other users, do this on project-level rather than user-level, by committing it to your project under .vscode/settings.json
.