4.5.5 • Published 1 year ago
@evaneos/eslint-config v4.5.5
ESLint (and Prettier, and tsconfig) config
This package provides Evaneos's configs for front projects.
.eslintrcas an extensible shared config.prettierrcas an importable/extensible file
What it does
This setup lints, and formats based on Evaneos' practices. Feel free to override the rules that make sense for you.
Installing
In your project folder, run:
npm i -D @evaneos/eslint-config npx install-peerdeps --dev @evaneos/eslint-configYou will see several dependencies were installed.
Now, create (or update) a
.eslintrcfile with the following content:Don't forget to adapt the
parserOptions.projectif it's different in your project.{ "extends": ["@evaneos/eslint-config"], "parserOptions": { "project": ["./tsconfig.json"] } }If you need to extend the configuration with other plugins, make sure that
@evaneos/eslint-config/prettieris the last item of the array{ "extends": [ "@evaneos/eslint-config", // ..., "@evaneos/eslint-config/prettier", ], "parserOptions": { "project": ["./tsconfig.json"] } }Add prettier config to your
package.json{ "prettier": "@evaneos/eslint-config/.prettierrc.js" }If you want to override it, you'll have to spread the config into a
.prettierrc.jsfile instead, eg:module.exports = { ...require('@evaneos/eslint-config/.prettierrc.js'), semi: false, };