2022-02-07 07:25:13 +08:00
|
|
|
{
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"es2021": true,
|
|
|
|
"node": true
|
|
|
|
},
|
|
|
|
"globals": {
|
|
|
|
"$": "readonly",
|
|
|
|
"jQuery": "readonly",
|
|
|
|
"html2canvas": "readonly",
|
|
|
|
"ClipboardItem": "readonly",
|
|
|
|
"grecaptcha": "readonly"
|
|
|
|
},
|
|
|
|
"extends": [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:json/recommended",
|
2022-02-12 06:34:40 +08:00
|
|
|
"plugin:require-path-exists/recommended",
|
|
|
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
|
|
"plugin:@typescript-eslint/recommended"
|
2022-02-07 07:25:13 +08:00
|
|
|
],
|
2022-02-12 06:34:40 +08:00
|
|
|
"plugins": ["json", "require-path-exists", "@typescript-eslint"],
|
2022-02-07 07:25:13 +08:00
|
|
|
"parserOptions": {
|
2022-02-12 06:34:40 +08:00
|
|
|
"ecmaVersion": 12,
|
2022-02-07 07:25:13 +08:00
|
|
|
"sourceType": "module"
|
|
|
|
},
|
|
|
|
"rules": {
|
|
|
|
"json/*": ["error"],
|
2022-02-12 21:47:36 +08:00
|
|
|
"indent": ["off"],
|
2022-02-07 07:25:13 +08:00
|
|
|
"linebreak-style": ["error", "unix"],
|
2022-03-11 04:56:45 +08:00
|
|
|
"curly": ["error", "multi-line"],
|
2022-02-07 07:25:13 +08:00
|
|
|
"quotes": [
|
|
|
|
"error",
|
|
|
|
"double",
|
|
|
|
{ "allowTemplateLiterals": true, "avoidEscape": true }
|
|
|
|
],
|
|
|
|
"semi": ["error", "always"],
|
2022-02-07 07:30:04 +08:00
|
|
|
"no-empty": ["error", { "allowEmptyCatch": true }],
|
2022-02-12 06:34:40 +08:00
|
|
|
"no-var": 2,
|
2022-02-07 07:25:13 +08:00
|
|
|
"require-path-exists/notEmpty": 2,
|
|
|
|
"require-path-exists/tooManyArguments": 2,
|
|
|
|
"require-path-exists/exists": [
|
|
|
|
2,
|
|
|
|
{
|
2022-02-12 06:34:40 +08:00
|
|
|
"extensions": [
|
|
|
|
"",
|
|
|
|
".js",
|
|
|
|
".ts",
|
|
|
|
".tsx",
|
|
|
|
".es.ts",
|
|
|
|
".tsx",
|
|
|
|
".json5",
|
|
|
|
".es",
|
|
|
|
".es6",
|
|
|
|
".coffee"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"@typescript-eslint/no-empty-function": "off",
|
2022-02-12 06:39:41 +08:00
|
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
|
|
"@typescript-eslint/no-var-requires": "off"
|
2022-02-12 06:34:40 +08:00
|
|
|
},
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
// enable the rule specifically for TypeScript files
|
|
|
|
"files": ["*.ts", "*.tsx"],
|
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/explicit-function-return-type": ["error"],
|
|
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
|
|
"@typescript-eslint/no-empty-function": "error",
|
2022-05-06 02:05:31 +08:00
|
|
|
"no-unused-vars": "off",
|
2022-02-23 05:39:26 +08:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
2022-05-06 02:05:31 +08:00
|
|
|
{ "argsIgnorePattern": "^(_|e|event)", "varsIgnorePattern": "^_" }
|
2022-02-23 05:39:26 +08:00
|
|
|
],
|
2022-04-24 08:05:11 +08:00
|
|
|
"@typescript-eslint/no-var-requires": "error",
|
|
|
|
"@typescript-eslint/no-this-alias": "off"
|
2022-02-07 07:25:13 +08:00
|
|
|
}
|
2022-02-14 09:20:30 +08:00
|
|
|
// "parserOptions": {
|
|
|
|
// "project": "./tsconfig.json"
|
|
|
|
// }
|
2022-02-12 06:34:40 +08:00
|
|
|
}
|
|
|
|
]
|
2022-02-07 07:25:13 +08:00
|
|
|
}
|