Add eslint as linter and add linter workflow
This commit is contained in:
parent
85821f5fa3
commit
bab508e4b9
4 changed files with 1191 additions and 5 deletions
32
eslint.config.mjs
Normal file
32
eslint.config.mjs
Normal file
|
@ -0,0 +1,32 @@
|
|||
import jest from "eslint-plugin-jest";
|
||||
import globals from "globals";
|
||||
export default [{
|
||||
plugins: {
|
||||
jest,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.jest,
|
||||
...jest.environments.globals.globals,
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
"no-fallthrough": "error",
|
||||
"no-case-declarations": "error",
|
||||
"no-unused-vars": "warn"
|
||||
},
|
||||
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
// /** @type {import('eslint').Linter.Config[]} */
|
||||
// export default [
|
||||
// {files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
|
||||
// {languageOptions: { globals: globals.node }},
|
||||
// pluginJs.configs.recommended,
|
||||
// ];
|
Loading…
Add table
Add a link
Reference in a new issue