Licence
MIT
Version
3.6.2
Deps
9
Size
113 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
kayahr eslint config
Shared eslint configuration for my personal TypeScript projects.
How to use it in a project
Install the dependencies:
$ npm install -DE @kayahr/eslint-configCreate an
eslint.config.js(Oreslint.config.mjsin CommonJS projects) configuration file with the following content (Modify environment if necessary):{ import kayahrConfigs from "@kayahr/eslint-config"; import globals from "globals"; export default [ { ignores: [ "doc", "lib" ] }, { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, { files: [ "**/*.js" ], languageOptions: { sourceType: "commonjs" } }, ...kayahrConfigs ]; }The block with
sourceType: "commonjs"is only needed for CommonJS projects.Add the following script line to
package.json:"lint": "eslint --max-warnings 0"Reference the
lintscript in thetestscript:"test": "npm run -s lint && npm run -s check"Run eslint by typing
npm testornpm run lint.