feat: add new eslint config.

This commit is contained in:
Rintim 2024-04-17 13:15:00 +08:00
parent 02bf141a6a
commit 196212fa39
No known key found for this signature in database
GPG Key ID: BE9E1EA615BACFCF
2 changed files with 40 additions and 1 deletions

39
eslint.config.mjs Normal file
View File

@ -0,0 +1,39 @@
import js from "@eslint/js";
import globals from "globals";
export default [
js.configs.recommended,
{
rules: {
"no-console": 0,
"no-constant-condition": [
"error",
{
checkLoops: false,
},
],
"no-irregular-whitespace": [
"error",
{
skipStrings: true,
skipTemplates: true,
},
],
"no-redeclare": 0,
"no-undef": 0,
"no-unused-vars": 0,
"require-yield": 0,
},
languageOptions: {
ecmaVersion: 13,
sourceType: "module",
globals: {
...globals.browser,
...globals.es2015,
...globals.node,
...globals.serviceworker,
...globals.worker,
},
},
},
];