@storm-software/linting-tools 1.49.1 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +0,0 @@
1
- .alexignore
2
- .prettierignore
3
- npm-lock.json
4
- pnpm-lock.json
5
- yarn.lock.json
6
- npm-lock.yml
7
- pnpm-lock.yml
8
- yarn.lock.yml
9
- npm-lock.yaml
10
- pnpm-lock.yaml
11
- yarn.lock.yaml
12
- bun.lockb
13
-
14
- **/.git/**
15
- **/.docusaurus/**
16
- **/dist/**
17
- **/dotnet/**
18
- **/node_modules/**
19
- **/.next/**
20
- **/tools/docker/**
21
- **/__snapshots__/**
22
- **/catalog-package/**
23
- **/*.hbs
24
- **/CODEOWNERS
25
- **/CODE_OF_CONDUCT.md
26
- **/CONTRIBUTING.md
27
- **/LICENSE
28
- **/LICENSE.md
29
-
30
- # tailwind.config.js
@@ -1,38 +0,0 @@
1
- {
2
- "plugins": [
3
- "prettier-plugin-packagejson",
4
- "prettier-plugin-prisma",
5
- "prettier-plugin-tailwindcss"
6
- ],
7
- "trailingComma": "none",
8
- "tabWidth": 2,
9
- "semi": true,
10
- "singleQuote": false,
11
- "quoteProps": "preserve",
12
- "insertPragma": false,
13
- "bracketSameLine": true,
14
- "printWidth": 80,
15
- "bracketSpacing": true,
16
- "arrowParens": "avoid",
17
- "endOfLine": "lf",
18
- "overrides": [
19
- {
20
- "files": "**/*.hbs",
21
- "options": {
22
- "parser": "html"
23
- }
24
- },
25
- {
26
- "files": "**/*.acid",
27
- "options": {
28
- "parser": "prisma-parse"
29
- }
30
- },
31
- {
32
- "files": "**/*.acidic",
33
- "options": {
34
- "parser": "prisma-parse"
35
- }
36
- }
37
- ]
38
- }
@@ -1,128 +0,0 @@
1
- const require = (await import('node:module')).createRequire(import.meta.url);const __filename = (await import('node:url')).fileURLToPath(import.meta.url);const __dirname = (await import('node:path')).dirname(__filename);
2
-
3
- // packages/linting-tools/src/eslint/graphql/index.ts
4
- var config = {
5
- root: true,
6
- overrides: [
7
- {
8
- files: ["*.js", "*.ts", "*.jsx", "*.tsx"],
9
- processor: "@graphql-eslint/graphql",
10
- extends: ["plugin:relay/recommended"],
11
- plugins: ["@graphql-eslint", "relay"],
12
- rules: {
13
- "@graphql-eslint/relay-arguments": "error",
14
- "@graphql-eslint/relay-connection-types": "error",
15
- "@graphql-eslint/relay-edge-types": "error",
16
- "@graphql-eslint/relay-page-info": "error",
17
- "@graphql-eslint/executable-definitions": "error",
18
- "@graphql-eslint/fields-on-correct-type": "error",
19
- "@graphql-eslint/fragments-on-composite-type": "error",
20
- "@graphql-eslint/known-argument-names": "error",
21
- "@graphql-eslint/known-directives": "error",
22
- "@graphql-eslint/known-fragment-names": "error",
23
- "@graphql-eslint/known-type-names": "error",
24
- "@graphql-eslint/lone-anonymous-operation": "error",
25
- "@graphql-eslint/naming-convention": [
26
- "error",
27
- {
28
- VariableDefinition: "camelCase",
29
- OperationDefinition: {
30
- style: "PascalCase",
31
- forbiddenPrefixes: ["Query", "Mutation", "Subscription", "Get"],
32
- forbiddenSuffixes: ["Query", "Mutation", "Subscription"]
33
- },
34
- FragmentDefinition: {
35
- style: "PascalCase",
36
- forbiddenPrefixes: ["Fragment"],
37
- forbiddenSuffixes: ["Fragment"]
38
- }
39
- }
40
- ],
41
- "@graphql-eslint/no-anonymous-operations": "error",
42
- "@graphql-eslint/no-deprecated": "error",
43
- "@graphql-eslint/no-duplicate-fields": "error",
44
- "@graphql-eslint/no-fragment-cycles": "error",
45
- "@graphql-eslint/no-undefined-variables": "error",
46
- "@graphql-eslint/no-unused-fragments": "error",
47
- "@graphql-eslint/no-unused-variables": "error",
48
- "@graphql-eslint/one-field-subscriptions": "error",
49
- "@graphql-eslint/overlapping-fields-can-be-merged": "error",
50
- "@graphql-eslint/possible-fragment-spread": "error",
51
- "@graphql-eslint/provided-required-arguments": "error",
52
- "@graphql-eslint/require-id-when-available": "error",
53
- "@graphql-eslint/scalar-leafs": "error",
54
- "@graphql-eslint/selection-set-depth": ["error", { maxDepth: 7 }],
55
- "@graphql-eslint/unique-argument-names": "error",
56
- "@graphql-eslint/unique-directive-names-per-location": "error",
57
- "@graphql-eslint/unique-input-field-names": "error",
58
- "@graphql-eslint/unique-variable-names": "error",
59
- "@graphql-eslint/value-literals-of-correct-type": "error",
60
- "@graphql-eslint/variables-are-input-types": "error",
61
- "@graphql-eslint/variables-in-allowed-position": "error",
62
- "relay/generated-flow-types": "off"
63
- }
64
- },
65
- {
66
- files: ["*.graphql"],
67
- parser: "@graphql-eslint/eslint-plugin",
68
- extends: ["plugin:relay/recommended"],
69
- plugins: ["@graphql-eslint", "relay"],
70
- rules: {
71
- "@graphql-eslint/relay-arguments": "error",
72
- "@graphql-eslint/relay-connection-types": "error",
73
- "@graphql-eslint/relay-edge-types": "error",
74
- "@graphql-eslint/relay-page-info": "error",
75
- "@graphql-eslint/executable-definitions": "error",
76
- "@graphql-eslint/fields-on-correct-type": "error",
77
- "@graphql-eslint/fragments-on-composite-type": "error",
78
- "@graphql-eslint/known-argument-names": "error",
79
- "@graphql-eslint/known-directives": "error",
80
- "@graphql-eslint/known-fragment-names": "error",
81
- "@graphql-eslint/known-type-names": "error",
82
- "@graphql-eslint/lone-anonymous-operation": "error",
83
- "@graphql-eslint/naming-convention": [
84
- "error",
85
- {
86
- VariableDefinition: "camelCase",
87
- OperationDefinition: {
88
- style: "PascalCase",
89
- forbiddenPrefixes: ["Query", "Mutation", "Subscription", "Get"],
90
- forbiddenSuffixes: ["Query", "Mutation", "Subscription"]
91
- },
92
- FragmentDefinition: {
93
- style: "PascalCase",
94
- forbiddenPrefixes: ["Fragment"],
95
- forbiddenSuffixes: ["Fragment"]
96
- }
97
- }
98
- ],
99
- "@graphql-eslint/no-anonymous-operations": "error",
100
- "@graphql-eslint/no-deprecated": "error",
101
- "@graphql-eslint/no-duplicate-fields": "error",
102
- "@graphql-eslint/no-fragment-cycles": "error",
103
- "@graphql-eslint/no-undefined-variables": "error",
104
- "@graphql-eslint/no-unused-fragments": "error",
105
- "@graphql-eslint/no-unused-variables": "error",
106
- "@graphql-eslint/one-field-subscriptions": "error",
107
- "@graphql-eslint/overlapping-fields-can-be-merged": "error",
108
- "@graphql-eslint/possible-fragment-spread": "error",
109
- "@graphql-eslint/provided-required-arguments": "error",
110
- "@graphql-eslint/require-id-when-available": "error",
111
- "@graphql-eslint/scalar-leafs": "error",
112
- "@graphql-eslint/selection-set-depth": ["error", { maxDepth: 7 }],
113
- "@graphql-eslint/unique-argument-names": "error",
114
- "@graphql-eslint/unique-directive-names-per-location": "error",
115
- "@graphql-eslint/unique-input-field-names": "error",
116
- "@graphql-eslint/unique-variable-names": "error",
117
- "@graphql-eslint/value-literals-of-correct-type": "error",
118
- "@graphql-eslint/variables-are-input-types": "error",
119
- "@graphql-eslint/variables-in-allowed-position": "error",
120
- "relay/generated-flow-types": "off"
121
- }
122
- }
123
- ]
124
- };
125
- var graphql_default = config;
126
- export {
127
- graphql_default as default
128
- };
@@ -1,368 +0,0 @@
1
- const require = (await import('node:module')).createRequire(import.meta.url);const __filename = (await import('node:url')).fileURLToPath(import.meta.url);const __dirname = (await import('node:path')).dirname(__filename);
2
-
3
- // packages/linting-tools/src/eslint/rules/import.ts
4
- var config = {
5
- /**
6
- * Disallow non-import statements appearing before import statements.
7
- *
8
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
9
- */
10
- "import/first": "error",
11
- /**
12
- * Require a newline after the last import/require.
13
- *
14
- * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
15
- */
16
- "import/newline-after-import": "warn",
17
- /**
18
- * Disallow import of modules using absolute paths.
19
- *
20
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
21
- */
22
- "import/no-absolute-path": "error",
23
- /**
24
- * Disallow cyclical dependencies between modules.
25
- *
26
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
27
- */
28
- "import/no-cycle": "error",
29
- /**
30
- * Disallow default exports.
31
- *
32
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
33
- */
34
- "import/no-default-export": "error",
35
- /**
36
- * Disallow the use of extraneous packages.
37
- *
38
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
39
- */
40
- "import/no-extraneous-dependencies": ["error", { includeInternal: true, includeTypes: true }],
41
- /**
42
- * Disallow mutable exports.
43
- *
44
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
45
- */
46
- "import/no-mutable-exports": "error",
47
- /**
48
- * Disallow importing packages through relative paths.
49
- *
50
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
51
- */
52
- "import/no-relative-packages": "warn",
53
- /**
54
- * Disallow a module from importing itself.
55
- *
56
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
57
- */
58
- "import/no-self-import": "error",
59
- /**
60
- * Ensures that there are no useless path segments.
61
- *
62
- * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
63
- */
64
- "import/no-useless-path-segments": ["error"],
65
- /**
66
- * Enforce a module import order convention.
67
- *
68
- * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
69
- */
70
- "import/order": [
71
- "warn",
72
- {
73
- groups: [
74
- "builtin",
75
- // Node.js built-in modules
76
- "external",
77
- // Packages
78
- "internal",
79
- // Aliased modules
80
- "parent",
81
- // Relative parent
82
- "sibling",
83
- // Relative sibling
84
- "index"
85
- // Relative index
86
- ],
87
- "newlines-between": "never"
88
- }
89
- ]
90
- };
91
- var import_default = config;
92
-
93
- // packages/linting-tools/src/eslint/rules/storm.ts
94
- var config2 = {
95
- /**
96
- * Require return statements in array methods callbacks.
97
- *
98
- * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
99
- */
100
- "array-callback-return": ["error", { allowImplicit: true }],
101
- /**
102
- * Treat `var` statements as if they were block scoped.
103
- *
104
- * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
105
- */
106
- "block-scoped-var": "error",
107
- /**
108
- * Require curly braces for multiline blocks.
109
- *
110
- * 🔧 Fixable - https://eslint.org/docs/rules/curly
111
- */
112
- curly: ["warn", "multi-line"],
113
- /**
114
- * Require default clauses in switch statements to be last (if used).
115
- *
116
- * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
117
- */
118
- "default-case-last": "error",
119
- /**
120
- * Require triple equals (`===` and `!==`).
121
- *
122
- * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
123
- */
124
- eqeqeq: "error",
125
- /**
126
- * Require grouped accessor pairs in object literals and classes.
127
- *
128
- * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
129
- */
130
- "grouped-accessor-pairs": "error",
131
- /**
132
- * Disallow use of `alert()`.
133
- *
134
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
135
- */
136
- "no-alert": "error",
137
- /**
138
- * Disallow use of `caller`/`callee`.
139
- *
140
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
141
- */
142
- "no-caller": "error",
143
- /**
144
- * Disallow returning value in constructor.
145
- *
146
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
147
- */
148
- "no-constructor-return": "error",
149
- /**
150
- * Disallow using an `else` if the `if` block contains a return.
151
- *
152
- * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
153
- */
154
- "no-else-return": "warn",
155
- /**
156
- * Disallow `eval()`.
157
- *
158
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
159
- */
160
- "no-eval": "error",
161
- /**
162
- * Disallow extending native objects.
163
- *
164
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
165
- */
166
- "no-extend-native": "error",
167
- /**
168
- * Disallow unnecessary function binding.
169
- *
170
- * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
171
- */
172
- "no-extra-bind": "error",
173
- /**
174
- * Disallow unnecessary labels.
175
- *
176
- * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
177
- */
178
- "no-extra-label": "error",
179
- /**
180
- * Disallow floating decimals.
181
- *
182
- * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
183
- */
184
- "no-floating-decimal": "error",
185
- /**
186
- * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.
187
- *
188
- * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
189
- */
190
- "no-implicit-coercion": "error",
191
- /**
192
- * Disallow use of `eval()`-like methods.
193
- *
194
- * https://eslint.org/docs/rules/no-implied-eval
195
- */
196
- "no-implied-eval": "error",
197
- /**
198
- * Disallow usage of `__iterator__` property.
199
- *
200
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
201
- */
202
- "no-iterator": "error",
203
- /**
204
- * Disallow use of labels for anything other than loops and switches.
205
- *
206
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
207
- */
208
- "no-labels": ["error"],
209
- /**
210
- * Disallow unnecessary nested blocks.
211
- *
212
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
213
- */
214
- "no-lone-blocks": "error",
215
- /**
216
- * Disallow `new` for side effects.
217
- *
218
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
219
- */
220
- "no-new": "error",
221
- /**
222
- * Disallow function constructors.
223
- *
224
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
225
- */
226
- "no-new-func": "error",
227
- /**
228
- * Disallow base types wrapper instances, such as `new String('foo')`.
229
- *
230
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
231
- */
232
- "no-new-wrappers": "error",
233
- /**
234
- * Disallow use of octal escape sequences in string literals.
235
- *
236
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
237
- */
238
- "no-octal-escape": "error",
239
- /**
240
- * Disallow reassignment of function parameters.
241
- *
242
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
243
- */
244
- "no-param-reassign": "error",
245
- /**
246
- * Disallow usage of the deprecated `__proto__` property.
247
- *
248
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
249
- */
250
- "no-proto": "error",
251
- /**
252
- * Disallow assignment in `return` statement.
253
- *
254
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
255
- */
256
- "no-return-assign": "error",
257
- /**
258
- * Disallows unnecessary `return await`.
259
- *
260
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-await
261
- */
262
- "no-return-await": "error",
263
- /**
264
- * Disallow use of `javascript:` urls.
265
- *
266
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
267
- */
268
- "no-script-url": "error",
269
- /**
270
- * Disallow comparisons where both sides are exactly the same.
271
- *
272
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
273
- */
274
- "no-self-compare": "error",
275
- /**
276
- * Disallow use of comma operator.
277
- *
278
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
279
- */
280
- "no-sequences": "error",
281
- /**
282
- * Disallow unnecessary `.call()` and `.apply()`.
283
- *
284
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
285
- */
286
- "no-useless-call": "error",
287
- /**
288
- * Disallow unnecessary concatenation of strings.
289
- *
290
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
291
- */
292
- "no-useless-concat": "error",
293
- /**
294
- * Disallow redundant return statements.
295
- *
296
- * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
297
- */
298
- "no-useless-return": "warn",
299
- /**
300
- * Require using named capture groups in regular expressions.
301
- *
302
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
303
- */
304
- "prefer-named-capture-group": "error",
305
- /**
306
- * Require using Error objects as Promise rejection reasons.
307
- *
308
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
309
- */
310
- "prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
311
- /**
312
- * Disallow use of the RegExp constructor in favor of regular expression
313
- * literals.
314
- *
315
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
316
- */
317
- "prefer-regex-literals": "error",
318
- /**
319
- * Disallow "Yoda conditions", ensuring the comparison.
320
- *
321
- * 🔧 Fixable - https://eslint.org/docs/rules/yoda
322
- */
323
- yoda: "warn"
324
- };
325
- var storm_default = config2;
326
-
327
- // packages/linting-tools/src/eslint/rules/unicorn.ts
328
- var config3 = {
329
- /**
330
- * Require consistent filename case for all linted files.
331
- *
332
- * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
333
- */
334
- "unicorn/filename-case": [
335
- "error",
336
- {
337
- case: "kebabCase"
338
- }
339
- ],
340
- /**
341
- * Require using the `node:` protocol when importing Node.js built-in modules.
342
- *
343
- * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
344
- */
345
- "unicorn/prefer-node-protocol": "warn"
346
- };
347
- var unicorn_default = config3;
348
-
349
- // packages/linting-tools/src/eslint/javascript/index.ts
350
- var config4 = {
351
- root: true,
352
- overrides: [
353
- {
354
- files: ["*.js", "*.jsx"],
355
- extends: ["plugin:@nx/javascript"],
356
- plugins: ["unicorn", "import"],
357
- rules: {
358
- ...import_default,
359
- ...unicorn_default,
360
- ...storm_default
361
- }
362
- }
363
- ]
364
- };
365
- var javascript_default = config4;
366
- export {
367
- javascript_default as default
368
- };
@@ -1,19 +0,0 @@
1
- const require = (await import('node:module')).createRequire(import.meta.url);const __filename = (await import('node:url')).fileURLToPath(import.meta.url);const __dirname = (await import('node:path')).dirname(__filename);
2
-
3
- // packages/linting-tools/src/eslint/jest/index.ts
4
- var config = {
5
- root: true,
6
- overrides: [
7
- {
8
- files: ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
9
- env: {
10
- jest: true
11
- },
12
- rules: {}
13
- }
14
- ]
15
- };
16
- var jest_default = config;
17
- export {
18
- jest_default as default
19
- };
@@ -1,90 +0,0 @@
1
- const require = (await import('node:module')).createRequire(import.meta.url);const __filename = (await import('node:url')).fileURLToPath(import.meta.url);const __dirname = (await import('node:path')).dirname(__filename);
2
-
3
- // packages/linting-tools/src/eslint/constants.ts
4
- var RESTRICTED_SYNTAX = [
5
- {
6
- // ❌ readFile(…, { encoding: … })
7
- selector: "CallExpression[callee.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=1] Property[key.name=encoding]",
8
- message: "Specify encoding as last argument instead of object with encoding key"
9
- },
10
- {
11
- // ❌ readFile(…, {})
12
- selector: "CallExpression[callee.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=0]",
13
- message: "Specify encoding as last argument"
14
- },
15
- {
16
- // ❌ readFileSync(…).toString(…)
17
- selector: "CallExpression[callee.name=readFileSync][parent.property.name=toString]",
18
- message: "toString is redundant, specify encoding as last argument"
19
- },
20
- {
21
- // ❌ ….readFile(…, { encoding: … })
22
- selector: "CallExpression[callee.type=MemberExpression][callee.property.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=1] Property[key.name=encoding]",
23
- message: "Specify encoding as last argument instead of object with encoding key"
24
- },
25
- {
26
- // ❌ ….readFile(…, {})
27
- selector: "CallExpression[callee.type=MemberExpression][callee.property.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=0]",
28
- message: "Specify encoding as last argument"
29
- },
30
- {
31
- // ❌ Boolean(…)
32
- selector: "CallExpression[callee.name=Boolean][arguments.1.elements.length!=0]",
33
- message: "Prefer `!!\u2026` over `Boolean(\u2026)` because TypeScript infers a narrow literal boolean `type: true` instead of `type: boolean`."
34
- },
35
- {
36
- // ❌ process.browser
37
- selector: "ExpressionStatement[expression.object.name=process][expression.property.name=browser]",
38
- message: "`process.browser` is deprecated, use `!!globalThis.window`"
39
- }
40
- // {
41
- // // ❌ let { foo: { bar } } = baz
42
- // // ✅ let { bar } = baz.foo
43
- // // ✅ let { foo: { bar } } = await baz
44
- // selector:
45
- // 'VariableDeclarator[init.type!=AwaitExpression] > ObjectPattern[properties.length=1][properties.0.value.type=ObjectPattern]',
46
- // message: 'Do not use nested destructuring.',
47
- // },
48
- ];
49
- var REACT_RESTRICTED_SYNTAX = [
50
- ...RESTRICTED_SYNTAX,
51
- {
52
- // ❌ useMemo(…, [])
53
- selector: "CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]",
54
- message: "`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead."
55
- }
56
- ];
57
- var CODE_BLOCK = "**/*.md{,x}/*";
58
-
59
- // packages/linting-tools/src/eslint/json/index.ts
60
- var JSONC_FILES = ["tsconfig.json", "tsconfig.base.json", "nx.json", ".vscode/launch.json"];
61
- var config = {
62
- root: true,
63
- overrides: [
64
- {
65
- files: "*.json",
66
- excludedFiles: JSONC_FILES,
67
- extends: "plugin:jsonc/recommended-with-json"
68
- },
69
- {
70
- files: ["*.jsonc", ...JSONC_FILES],
71
- extends: "plugin:jsonc/recommended-with-jsonc"
72
- },
73
- {
74
- files: "*.json5",
75
- extends: "plugin:jsonc/recommended-with-json5"
76
- },
77
- {
78
- files: "*.json{,c,5}",
79
- excludedFiles: CODE_BLOCK,
80
- plugins: ["unicorn"],
81
- rules: {
82
- "unicorn/filename-case": "error"
83
- }
84
- }
85
- ]
86
- };
87
- var json_default = config;
88
- export {
89
- json_default as default
90
- };