-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
34 lines (31 loc) · 1.01 KB
/
eslint.config.js
File metadata and controls
34 lines (31 loc) · 1.01 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
// eslint.config.js
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import globals from "globals";
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
ignores: ["dist/", "node_modules/"],
languageOptions: {
ecmaVersion: 2021,
globals: {
...globals.node, // fixes console, setInterval, require, __dirname, etc.
...globals.es2021,
},
},
rules: {
// Your project uses CommonJS require() — turn this off
"@typescript-eslint/no-require-imports": "off",
// Downgrade unused vars to a warning, ignore _-prefixed params
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"no-unused-vars": "off", // use the TS version above instead
// Downgrade style issues to warnings, not hard failures
"no-empty": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
},
});