This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
/
.eslintrc.json
128 lines (124 loc) · 3.39 KB
/
.eslintrc.json
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"env": {
"es6": true,
"browser": true,
"commonjs": false
},
"globals": {
"Promise": true,
"sinon": true
},
"extends": ["airbnb", "prettier"],
"plugins": ["chai-friendly", "jsdoc", "prettier", "unicorn"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022
},
"settings": {
"jsdoc": {
"tagNamePreference": {
"returns": "return"
}
}
},
"rules": {
"prettier/prettier": "error",
"import/no-unresolved": [
"error",
{
"ignore": [
"enketo/config",
"enketo/widgets",
"enketo/translator",
"enketo/dialog",
"enketo/file-manager",
"enketo/xpath-evaluator-binding"
]
}
],
"import/prefer-default-export": "off",
"class-methods-use-this": "warn",
"consistent-return": "warn",
"default-case": "warn",
"global-require": "warn",
"guard-for-in": "warn",
"import/extensions": "warn",
"no-cond-assign": "warn",
"no-constructor-return": "warn",
"no-continue": "warn",
"no-loop-func": "warn",
"no-nested-ternary": "warn",
"no-new": "warn",
"no-param-reassign": "warn",
"no-plusplus": "warn",
"no-restricted-globals": ["warn", "isFinite", "isNaN"],
"no-restricted-syntax": [
"warn",
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
"no-return-assign": "warn",
"no-shadow": "warn",
"no-throw-literal": "warn",
"no-underscore-dangle": "warn",
"no-unused-expressions": "warn",
"no-use-before-define": [
"warn",
{
"functions": false
}
],
"no-useless-concat": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
"prefer-promise-reject-errors": "warn"
},
"overrides": [
{
"files": [
"./.github/**/*.md",
"./*.md",
"./src/**/*.md",
"./tutorials/**/*.md"
],
"parser": "markdown-eslint-parser",
"rules": {
"prettier/prettier": ["error", { "parser": "markdown" }]
}
},
{
"files": [
"./Gruntfile.js",
"./scripts/**/*.js",
"./test/karma.conf.js"
],
"env": {
"browser": false,
"node": true
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": true }
]
}
},
{
"files": ["./test/**/*.js"],
"excludedFiles": ["./test/karma.conf.js"],
"env": {
"mocha": true
},
"globals": {
"expect": true,
"sinon": true
},
"rules": {
"no-console": "off",
"no-unused-expressions": "off",
"chai-friendly/no-unused-expressions": "warn"
}
}
]
}