@thepeaklab/eslint-config
v1.0.5
Published
Standardized ESLint flat config for our JavaScript and TypeScript projects
Downloads
17
Readme
@thepeaklab/eslint-config
An ESLint flat config which lints and fixes formatting (no prettier!)
Heavily inspired by @antfu/eslint-config.
Installation
Install the config:
npm i -D @thepeaklab/eslint-config
Setup config file:
// eslint.config.ts
import tpl from "@thepeaklab/eslint-config";
export default tpl;
Add linting scripts to package.json:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Inspect the config settings:
eslint --inspect-config
Visual Studio Code Support
Install the ESLint extension.
Copy the following settings into .vscode/settings.json
:
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
}
}