-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy patheslint.config.mjs
More file actions
41 lines (40 loc) · 1.08 KB
/
Copy patheslint.config.mjs
File metadata and controls
41 lines (40 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [
{
ignores: [
"**/node_modules/**",
"**/lib/**",
"**/dist/**",
"**/*.js",
"**/*.mjs",
"**/*.cjs",
"**/*.d.ts",
],
},
{
files: ["**/*.ts"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": typescriptEslint,
},
rules: {
// Warn on explicit any (Phase 2 gradually eliminated these)
"@typescript-eslint/no-explicit-any": "warn",
// Warn on console usage (should use @onebots/core Logger instead)
"no-console": "warn",
// Warn on unused variables
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
// Error on require() - should use ESM imports
"@typescript-eslint/no-var-requires": "error",
// Warn on empty functions
"no-empty": ["warn", { allowEmptyCatch: true }],
},
},
];