forked from TypeCellOS/BlockNote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (57 loc) · 1.55 KB
/
.eslintrc.js
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
const typeScriptExtensions = [".ts", ".cts", ".mts", ".tsx"];
const allExtensions = [...typeScriptExtensions, ".js", ".jsx"];
module.exports = {
root: true,
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"react-app",
"react-app/jest",
],
parser: "@typescript-eslint/parser",
plugins: ["import", "@typescript-eslint"],
settings: {
"import/extensions": allExtensions,
"import/external-module-folders": ["node_modules", "node_modules/@types"],
"import/parsers": {
"@typescript-eslint/parser": typeScriptExtensions,
},
"import/resolver": {
node: {
extensions: allExtensions,
},
},
},
ignorePatterns: ["**/ui/*"],
rules: {
"no-console": "error",
curly: 1,
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
bundledDependencies: false,
},
],
// would be nice to enable these rules later, but they are too noisy right now
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"import/no-cycle": "error",
// doesn't work:
// "import/no-restricted-paths": [
// "error",
// {
// zones: [
// {
// target: "./src/**/*",
// from: "./types/**/*",
// message: "Import from this module to types is not allowed.",
// },
// ],
// },
// ],
},
};