]> git.ipfire.org Git - thirdparty/bootstrap.git/blame - .eslintrc.json
docs: migrate to the built-in sitemap template (#39951)
[thirdparty/bootstrap.git] / .eslintrc.json
CommitLineData
18ff57a1 1{
26c16743 2 "root": true,
44e6abcb
X
3 "extends": [
4 "plugin:import/errors",
5 "plugin:import/warnings",
6 "plugin:unicorn/recommended",
66338459 7 "xo",
44e6abcb
X
8 "xo/browser"
9 ],
26c16743 10 "rules": {
75b29345 11 "arrow-body-style": "off",
44e6abcb 12 "capitalized-comments": "off",
75b29345
X
13 "comma-dangle": [
14 "error",
15 "never"
16 ],
ae43f0c4
X
17 "import/extensions": [
18 "error",
19 "ignorePackages",
20 {
21 "js": "always"
22 }
23 ],
24 "import/first": "error",
25 "import/newline-after-import": "error",
26 "import/no-absolute-path": "error",
27 "import/no-amd": "error",
28 "import/no-cycle": [
29 "error",
30 {
31 "ignoreExternal": true
32 }
33 ],
34 "import/no-duplicates": "error",
35 "import/no-extraneous-dependencies": "error",
36 "import/no-mutable-exports": "error",
37 "import/no-named-as-default": "error",
38 "import/no-named-as-default-member": "error",
39 "import/no-named-default": "error",
40 "import/no-self-import": "error",
41 "import/no-unassigned-import": [
42 "error"
43 ],
44 "import/no-useless-path-segments": "error",
45 "import/order": "error",
44e6abcb
X
46 "indent": [
47 "error",
48 2,
49 {
50 "MemberExpression": "off",
51 "SwitchCase": 1
26c16743
BH
52 }
53 ],
40c6d8a4 54 "logical-assignment-operators": "off",
44e6abcb
X
55 "max-params": [
56 "warn",
57 5
58 ],
59 "multiline-ternary": [
60 "error",
61 "always-multiline"
62 ],
e0b8fcdf
X
63 "new-cap": [
64 "error",
65 {
66 "properties": false
67 }
68 ],
b3dfcdc7 69 "no-console": "error",
ec62be27 70 "no-negated-condition": "off",
44e6abcb
X
71 "object-curly-spacing": [
72 "error",
73 "always"
74 ],
75b29345
X
75 "operator-linebreak": [
76 "error",
77 "after"
78 ],
40c6d8a4 79 "prefer-object-has-own": "off",
5208dd10 80 "prefer-template": "error",
44e6abcb
X
81 "semi": [
82 "error",
83 "never"
84 ],
ae43f0c4 85 "strict": "error",
5bcd6a29 86 "unicorn/explicit-length-check": "off",
ae43f0c4 87 "unicorn/filename-case": "off",
1a3c2872 88 "unicorn/no-anonymous-default-export": "off",
122b2bdd 89 "unicorn/no-array-callback-reference": "off",
75b29345 90 "unicorn/no-array-method-this-argument": "off",
3300c626 91 "unicorn/no-null": "off",
b1f86f45 92 "unicorn/no-typeof-undefined": "off",
5bcd6a29 93 "unicorn/no-unused-properties": "error",
c117823d 94 "unicorn/numeric-separators-style": "off",
75b29345 95 "unicorn/prefer-array-flat": "off",
c117823d 96 "unicorn/prefer-at": "off",
122b2bdd 97 "unicorn/prefer-dom-node-dataset": "off",
0519a3bb 98 "unicorn/prefer-module": "off",
105687ac 99 "unicorn/prefer-query-selector": "off",
1a2688ed 100 "unicorn/prefer-spread": "off",
c117823d 101 "unicorn/prefer-string-replace-all": "off",
105687ac 102 "unicorn/prevent-abbreviations": "off"
ae43f0c4
X
103 },
104 "overrides": [
105 {
106 "files": [
107 "build/**"
108 ],
109 "env": {
110 "browser": false,
111 "node": true
112 },
113 "parserOptions": {
56664e0c 114 "sourceType": "module"
ae43f0c4
X
115 },
116 "rules": {
117 "no-console": "off",
118 "unicorn/prefer-top-level-await": "off"
119 }
120 },
121 {
122 "files": [
123 "js/**"
124 ],
125 "parserOptions": {
126 "sourceType": "module"
127 }
128 },
129 {
130 "files": [
131 "js/tests/*.js",
132 "js/tests/integration/rollup*.js"
133 ],
134 "env": {
135 "node": true
136 },
137 "parserOptions": {
138 "sourceType": "script"
139 }
140 },
141 {
142 "files": [
143 "js/tests/unit/**"
144 ],
145 "env": {
146 "jasmine": true
147 },
148 "rules": {
149 "no-console": "off",
150 "unicorn/consistent-function-scoping": "off",
151 "unicorn/no-useless-undefined": "off",
152 "unicorn/prefer-add-event-listener": "off"
153 }
154 },
155 {
156 "files": [
157 "js/tests/visual/**"
158 ],
159 "plugins": [
160 "html"
161 ],
162 "settings": {
163 "html/html-extensions": [
164 ".html"
165 ]
166 },
167 "rules": {
168 "no-console": "off",
169 "no-new": "off",
170 "unicorn/no-array-for-each": "off"
171 }
172 },
173 {
174 "files": [
175 "scss/tests/**"
176 ],
177 "env": {
178 "node": true
179 },
180 "parserOptions": {
181 "sourceType": "script"
182 }
183 },
184 {
185 "files": [
186 "site/**"
187 ],
188 "env": {
189 "browser": true,
190 "node": false
191 },
192 "parserOptions": {
193 "sourceType": "script",
194 "ecmaVersion": 2019
195 },
196 "rules": {
197 "no-new": "off",
c117823d 198 "unicorn/no-array-for-each": "off"
ae43f0c4
X
199 }
200 },
24f749cb
X
201 {
202 "files": [
203 "site/assets/js/**"
204 ],
205 "parserOptions": {
206 "sourceType": "module",
207 "ecmaVersion": 2020
208 }
209 },
ae43f0c4
X
210 {
211 "files": [
212 "**/*.md"
213 ],
214 "plugins": [
215 "markdown"
216 ],
217 "processor": "markdown/markdown"
218 },
219 {
220 "files": [
2bc395b5
X
221 "**/*.md/*.js",
222 "**/*.md/*.mjs"
ae43f0c4 223 ],
2bc395b5 224 "extends": "plugin:markdown/recommended-legacy",
ae43f0c4
X
225 "parserOptions": {
226 "sourceType": "module"
227 },
228 "rules": {
229 "unicorn/prefer-node-protocol": "off"
230 }
231 }
232 ]
18ff57a1 233}