Opinionated linting configuration. Valid for your JavaScript or TypeScript projects 🤟
Stars are free 😊
-
Install the dependency
npm install --save-dev eslint-config-comparitiko
-
Add it to your
eslint.config.mjs
file:{ import eslintConfigComparitiko from "eslint-config-comparitiko"; export default [...eslintConfigComparitiko]; }
-
If you are using TypeScript, just import the TypeScript configuration instead:
import eslintConfigComparitiko from "eslint-config-comparitiko/typescript"; export default [...eslintConfigComparitiko];
- You need also configure your
tsconfig.json
file in the root of your project to use thetypescript
configuration same way as theeslint.config.mjs
file.
- You need also configure your
-
Lints JavaScript using
eslint:recommended
and Prettier -
Additionally, lints TypeScript using
@typescript-eslint/recommended
-
Uses the following JavaScript rules and TypeScript rules
-
Uses the following plugins:
-
import
: helps validate proper imports -
simple-import-sort
: sorts imports -
unused-imports
: checks for unused imports
-