@kachkaev/eslint-config-base
v0.6.0
Published
Compatible with [ESLint](https://www.npmjs.com/package/eslint) v7. Requires [TypeScript](https://www.npmjs.com/package/typescript) to be present as a dependency.
Downloads
335
Readme
@kachkaev → eslint config (base)
Compatible with ESLint v7. Requires TypeScript to be present as a dependency.
See also @kachkaev/eslint-config-react.
Adding to project
Install the package:
npm install -D @kachkaev/eslint-config-base ## or yarn add -D @kachkaev/eslint-config-base
Create
.eslintrc.js
with the following contents:module.exports = { extends: ["@kachkaev/eslint-config-base"], };
If you want extra typechecking (
tsconfig.json
needs to exist in repo dir):module.exports = { extends: [ "@kachkaev/eslint-config-base", "@kachkaev/eslint-config-base/extra-type-checking", ], };
Create
.eslintignore
. For example,##################### ## Specific to ESLint ##################### ## Ignore all files (but still allow sub-folder scanning) * !*/ ## Allow certain file types !*.cjs !*.cts !*.js !*.json !*.mjs !*.mts !*.ts ######################## ## Same as in .gitignore ######################## # (paste lines from .gitignore here)
Optionally, configure package scripts and a pre-commit hook to make sure that all project files are always formatted. See example in
njt
→package.json
.