generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.eslintrc.js
85 lines (85 loc) · 2.93 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"airbnb",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:solid/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.eslint.json",
},
plugins: ["@typescript-eslint", "jest", "unused-imports", "solid", "lodash-fp"],
rules: {
"jest/expect-expect": [
"warn",
{
assertFunctionNames: ["expect", "*Check*"],
},
],
"lodash-fp/consistent-compose": "off",
"lodash-fp/consistent-name": ["error", "_"],
"lodash-fp/no-argumentless-calls": "error",
"lodash-fp/no-chain": "error",
"lodash-fp/no-extraneous-args": "error",
"lodash-fp/no-extraneous-function-wrapping": "error",
"lodash-fp/no-extraneous-iteratee-args": "error",
"lodash-fp/no-extraneous-partials": "error",
"lodash-fp/no-for-each": "off",
"lodash-fp/no-partial-of-curried": "error",
"lodash-fp/no-single-composition": "error",
"lodash-fp/no-submodule-destructuring": "error",
"lodash-fp/no-unused-result": "error",
"lodash-fp/prefer-compact": "error",
"lodash-fp/prefer-composition-grouping": "error",
"lodash-fp/prefer-constant": [
"error",
{
arrowFunctions: false,
},
],
"lodash-fp/prefer-flat-map": "error",
"lodash-fp/prefer-get": "error",
"lodash-fp/prefer-identity": [
"error",
{
arrowFunctions: false,
},
],
"lodash-fp/preferred-alias": "off",
"lodash-fp/use-fp": "error",
"no-restricted-syntax": [
"error",
{
selector: "ForInStatement",
message:
"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
},
{
selector: "LabeledStatement",
message:
"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
},
{
selector: "WithStatement",
message:
"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
},
],
"import/prefer-default-export": "off",
"import/no-default-export": "error",
"react/react-in-jsx-scope": "off",
"react/destructuring-assignment": "off",
"react/no-unknown-property": "off",
},
};