|
1 |
| -{ |
| 1 | +import {FlatCompat} from "@eslint/eslintrc"; |
| 2 | +import js from "@eslint/js"; |
| 3 | + |
| 4 | +const config = { |
2 | 5 | "env": {
|
3 | 6 | "commonjs": true,
|
4 | 7 | "es6": true,
|
5 |
| - "node": true |
| 8 | + "node": true, |
6 | 9 | },
|
7 | 10 | "ignorePatterns": ["docs/", "site/"],
|
8 | 11 | "extends": "eslint:recommended",
|
9 | 12 | "globals": {
|
10 | 13 | "Atomics": "readonly",
|
11 |
| - "SharedArrayBuffer": "readonly" |
| 14 | + "SharedArrayBuffer": "readonly", |
12 | 15 | },
|
13 | 16 | "parserOptions": {
|
14 | 17 | "ecmaVersion": 2020,
|
15 |
| - "sourceType": "module" |
| 18 | + "sourceType": "module", |
16 | 19 | },
|
17 | 20 | "rules": {
|
18 | 21 | "no-empty": ["error", {"allowEmptyCatch": true}],
|
| 22 | + "no-unused-vars": ["error", {"caughtErrors": "none"}], |
| 23 | + "prefer-const": "error", |
19 | 24 |
|
20 | 25 | "block-scoped-var": "error",
|
21 | 26 | "consistent-return": "error",
|
|
59 | 64 | "semi-spacing": "error",
|
60 | 65 | "semi-style": "error",
|
61 | 66 | "space-before-function-paren": ["error", {
|
62 |
| - "anonymous": "always", "named": "never", "asyncArrow": "always" |
| 67 | + "anonymous": "always", "named": "never", "asyncArrow": "always", |
63 | 68 | }],
|
64 | 69 | "space-infix-ops": "error",
|
65 | 70 | "space-unary-ops": "error",
|
|
81 | 86 | "rest-spread-spacing": "error",
|
82 | 87 | "sort-imports": "error",
|
83 | 88 | "template-curly-spacing": "error",
|
84 |
| - "yield-star-spacing": "error" |
85 |
| - } |
86 |
| -} |
| 89 | + "yield-star-spacing": "error", |
| 90 | + }, |
| 91 | +}; |
| 92 | + |
| 93 | +const compat = new FlatCompat({recommendedConfig: js.configs.recommended}); |
| 94 | +export default compat.config(config); |
0 commit comments