-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.cjs
59 lines (58 loc) · 1.48 KB
/
.eslintrc.cjs
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// @ts-check
/** @type {import("eslint").Linter.Config} */
const config = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:node/recommended",
"prettier",
],
plugins: ["@babel/development"],
parser: "@typescript-eslint/parser",
reportUnusedDisableDirectives: true,
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"no-constant-condition": [
"error",
{
checkLoops: false,
},
],
"node/no-unsupported-features/es-syntax": "off",
// Specifying *.js for *.ts doesn't work now
"node/no-missing-import": "off",
// Disabling it until it skips type-only imports
"node/no-unpublished-import": "off",
// We target newer Node, so this is unnecessary
"no-inner-declarations": "off",
},
overrides: [
{
files: ["src/**/*.ts"],
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
parserOptions: {
project: ["./tsconfig.json"],
tsconfigRootDir: __dirname,
},
},
{
files: ["*.test.ts"],
extends: ["plugin:jest/recommended"],
rules: {
"node/no-unpublished-import": "off",
},
},
],
ignorePatterns: ["cjs/dist/**/*", "dist/**/*", "coverage/**/*"],
};
module.exports = config;