mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-10 00:23:13 +08:00
Enable eslint for util.ts (#3887)
* Enable eslint for util.ts * Drop babel (since eslint parser was replaced by typescript-parser and it doesn't seem to be used anywhere) * Apply "plugin:@typescript-eslint/recommended" * Minor * Remove comment for generated file (Keep the first comment only)
This commit is contained in:
20
.eslintrc.js
20
.eslintrc.js
@@ -19,12 +19,13 @@ module.exports = {
|
||||
],
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@babel/eslint-parser",
|
||||
parser: "@typescript-eslint/parser",
|
||||
sourceType: "module",
|
||||
requireConfigFile: false,
|
||||
},
|
||||
plugins: [
|
||||
"jsdoc"
|
||||
"jsdoc",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
rules: {
|
||||
"yoda": "error",
|
||||
@@ -163,6 +164,21 @@ module.exports = {
|
||||
context: true,
|
||||
jestPuppeteer: true,
|
||||
},
|
||||
},
|
||||
|
||||
// Override for TypeScript
|
||||
{
|
||||
"files": [
|
||||
"**/*.ts",
|
||||
],
|
||||
extends: [
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
"rules": {
|
||||
"jsdoc/require-returns-type": "off",
|
||||
"jsdoc/require-param-type": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
Reference in New Issue
Block a user