@saasmakers/eslint 0.1.18 → 0.1.19

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.
@@ -2,468 +2,490 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./shared/eslint.NxlGRwZa.cjs');
5
+ const pluginJs = require('@eslint/js');
6
6
  const unocss = require('@unocss/eslint-config/flat');
7
+ const nodeEslint = require('eslint-plugin-n');
7
8
  const packageJson = require('eslint-plugin-package-json');
8
9
  const perfectionist = require('eslint-plugin-perfectionist');
9
10
  const eslintPluginPnpm = require('eslint-plugin-pnpm');
10
11
  const turbo = require('eslint-plugin-turbo');
12
+ const unicorn = require('eslint-plugin-unicorn');
11
13
  const tseslint = require('typescript-eslint');
12
- const require$$0$2 = require('path');
14
+ const require$$0$1 = require('path');
13
15
  const require$$2 = require('assert');
14
16
  const require$$1$1 = require('tty');
15
17
  const require$$1$2 = require('util');
16
- const require$$0$1 = require('os');
18
+ const require$$0 = require('os');
17
19
  const require$$6 = require('module');
18
20
  const require$$8 = require('events');
19
21
  const require$$9 = require('esquery');
20
- const require$$0$3 = require('eslint');
21
- require('eslint/use-at-your-own-risk');
22
+ const require$$10 = require('eslint');
23
+ const index = require('./index.cjs');
24
+ require('@typescript-eslint/utils');
22
25
 
23
26
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
24
27
 
28
+ const pluginJs__default = /*#__PURE__*/_interopDefaultCompat(pluginJs);
25
29
  const unocss__default = /*#__PURE__*/_interopDefaultCompat(unocss);
30
+ const nodeEslint__default = /*#__PURE__*/_interopDefaultCompat(nodeEslint);
26
31
  const packageJson__default = /*#__PURE__*/_interopDefaultCompat(packageJson);
27
32
  const perfectionist__default = /*#__PURE__*/_interopDefaultCompat(perfectionist);
28
33
  const turbo__default = /*#__PURE__*/_interopDefaultCompat(turbo);
34
+ const unicorn__default = /*#__PURE__*/_interopDefaultCompat(unicorn);
29
35
  const tseslint__default = /*#__PURE__*/_interopDefaultCompat(tseslint);
30
- const require$$0__default$1 = /*#__PURE__*/_interopDefaultCompat(require$$0$2);
36
+ const require$$0__default$1 = /*#__PURE__*/_interopDefaultCompat(require$$0$1);
31
37
  const require$$2__default = /*#__PURE__*/_interopDefaultCompat(require$$2);
32
38
  const require$$1__default = /*#__PURE__*/_interopDefaultCompat(require$$1$1);
33
39
  const require$$1__default$1 = /*#__PURE__*/_interopDefaultCompat(require$$1$2);
34
- const require$$0__default = /*#__PURE__*/_interopDefaultCompat(require$$0$1);
40
+ const require$$0__default = /*#__PURE__*/_interopDefaultCompat(require$$0);
35
41
  const require$$6__default = /*#__PURE__*/_interopDefaultCompat(require$$6);
36
42
  const require$$8__default = /*#__PURE__*/_interopDefaultCompat(require$$8);
37
43
  const require$$9__default = /*#__PURE__*/_interopDefaultCompat(require$$9);
38
- const require$$0__default$2 = /*#__PURE__*/_interopDefaultCompat(require$$0$3);
39
-
40
- const name$1 = "@eslint/js";
41
- const version$1 = "9.39.2";
42
- const description$1 = "ESLint JavaScript language implementation";
43
- const funding = "https://eslint.org/donate";
44
- const main$1 = "./src/index.js";
45
- const types = "./types/index.d.ts";
46
- const scripts$1 = {
47
- "test:types": "tsc -p tests/types/tsconfig.json"
48
- };
49
- const files = [
50
- "LICENSE",
51
- "README.md",
52
- "src",
53
- "types"
54
- ];
55
- const publishConfig = {
56
- access: "public"
57
- };
58
- const repository$1 = {
59
- type: "git",
60
- url: "https://github.com/eslint/eslint.git",
61
- directory: "packages/js"
62
- };
63
- const homepage$1 = "https://eslint.org";
64
- const bugs = "https://github.com/eslint/eslint/issues/";
65
- const keywords = [
66
- "javascript",
67
- "eslint-plugin",
68
- "eslint"
69
- ];
70
- const license$1 = "MIT";
71
- const engines$1 = {
72
- node: "^18.18.0 || ^20.9.0 || >=21.1.0"
73
- };
74
- const _package$2 = {
75
- name: name$1,
76
- version: version$1,
77
- description: description$1,
78
- funding: funding,
79
- main: main$1,
80
- types: types,
81
- scripts: scripts$1,
82
- files: files,
83
- publishConfig: publishConfig,
84
- repository: repository$1,
85
- homepage: homepage$1,
86
- bugs: bugs,
87
- keywords: keywords,
88
- license: license$1,
89
- engines: engines$1
90
- };
44
+ const require$$10__default = /*#__PURE__*/_interopDefaultCompat(require$$10);
91
45
 
92
- const _package$3 = {
93
- __proto__: null,
94
- bugs: bugs,
95
- default: _package$2,
96
- description: description$1,
97
- engines: engines$1,
98
- files: files,
99
- funding: funding,
100
- homepage: homepage$1,
101
- keywords: keywords,
102
- license: license$1,
103
- main: main$1,
104
- name: name$1,
105
- publishConfig: publishConfig,
106
- repository: repository$1,
107
- scripts: scripts$1,
108
- types: types,
109
- version: version$1
110
- };
46
+ function getDefaultExportFromCjs (x) {
47
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
48
+ }
111
49
 
112
- const require$$0 = /*@__PURE__*/index.getAugmentedNamespace(_package$3);
50
+ function getAugmentedNamespace(n) {
51
+ if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
52
+ var f = n.default;
53
+ if (typeof f == "function") {
54
+ var a = function a () {
55
+ var isInstance = false;
56
+ try {
57
+ isInstance = this instanceof a;
58
+ } catch {}
59
+ if (isInstance) {
60
+ return Reflect.construct(f, arguments, this.constructor);
61
+ }
62
+ return f.apply(this, arguments);
63
+ };
64
+ a.prototype = f.prototype;
65
+ } else a = {};
66
+ Object.defineProperty(a, '__esModule', {value: true});
67
+ Object.keys(n).forEach(function (k) {
68
+ var d = Object.getOwnPropertyDescriptor(n, k);
69
+ Object.defineProperty(a, k, d.get ? d : {
70
+ enumerable: true,
71
+ get: function () {
72
+ return n[k];
73
+ }
74
+ });
75
+ });
76
+ return a;
77
+ }
113
78
 
114
- /*
115
- * WARNING: This file is autogenerated using the tools/update-eslint-all.js
116
- * script. Do not edit manually.
117
- */
79
+ function commonjsRequire(path) {
80
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
81
+ }
118
82
 
119
- var eslintAll;
120
- var hasRequiredEslintAll;
83
+ var vueEslintParser = {};
121
84
 
122
- function requireEslintAll () {
123
- if (hasRequiredEslintAll) return eslintAll;
124
- hasRequiredEslintAll = 1;
85
+ var eslintVisitorKeys = {};
125
86
 
126
- /*
127
- * IMPORTANT!
128
- *
129
- * We cannot add a "name" property to this object because it's still used in eslintrc
130
- * which doesn't support the "name" property. If we add a "name" property, it will
131
- * cause an error.
87
+ var hasRequiredEslintVisitorKeys;
88
+
89
+ function requireEslintVisitorKeys () {
90
+ if (hasRequiredEslintVisitorKeys) return eslintVisitorKeys;
91
+ hasRequiredEslintVisitorKeys = 1;
92
+
93
+ /* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
94
+ TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
95
+ */
96
+ /**
97
+ * @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
132
98
  */
99
+ /* eslint-enable jsdoc/valid-types -- doesn't allow `readonly string[]`. TODO: check why */
133
100
 
134
- eslintAll = Object.freeze({
135
- rules: Object.freeze({
136
- "accessor-pairs": "error",
137
- "array-callback-return": "error",
138
- "arrow-body-style": "error",
139
- "block-scoped-var": "error",
140
- "camelcase": "error",
141
- "capitalized-comments": "error",
142
- "class-methods-use-this": "error",
143
- "complexity": "error",
144
- "consistent-return": "error",
145
- "consistent-this": "error",
146
- "constructor-super": "error",
147
- "curly": "error",
148
- "default-case": "error",
149
- "default-case-last": "error",
150
- "default-param-last": "error",
151
- "dot-notation": "error",
152
- "eqeqeq": "error",
153
- "for-direction": "error",
154
- "func-name-matching": "error",
155
- "func-names": "error",
156
- "func-style": "error",
157
- "getter-return": "error",
158
- "grouped-accessor-pairs": "error",
159
- "guard-for-in": "error",
160
- "id-denylist": "error",
161
- "id-length": "error",
162
- "id-match": "error",
163
- "init-declarations": "error",
164
- "logical-assignment-operators": "error",
165
- "max-classes-per-file": "error",
166
- "max-depth": "error",
167
- "max-lines": "error",
168
- "max-lines-per-function": "error",
169
- "max-nested-callbacks": "error",
170
- "max-params": "error",
171
- "max-statements": "error",
172
- "new-cap": "error",
173
- "no-alert": "error",
174
- "no-array-constructor": "error",
175
- "no-async-promise-executor": "error",
176
- "no-await-in-loop": "error",
177
- "no-bitwise": "error",
178
- "no-caller": "error",
179
- "no-case-declarations": "error",
180
- "no-class-assign": "error",
181
- "no-compare-neg-zero": "error",
182
- "no-cond-assign": "error",
183
- "no-console": "error",
184
- "no-const-assign": "error",
185
- "no-constant-binary-expression": "error",
186
- "no-constant-condition": "error",
187
- "no-constructor-return": "error",
188
- "no-continue": "error",
189
- "no-control-regex": "error",
190
- "no-debugger": "error",
191
- "no-delete-var": "error",
192
- "no-div-regex": "error",
193
- "no-dupe-args": "error",
194
- "no-dupe-class-members": "error",
195
- "no-dupe-else-if": "error",
196
- "no-dupe-keys": "error",
197
- "no-duplicate-case": "error",
198
- "no-duplicate-imports": "error",
199
- "no-else-return": "error",
200
- "no-empty": "error",
201
- "no-empty-character-class": "error",
202
- "no-empty-function": "error",
203
- "no-empty-pattern": "error",
204
- "no-empty-static-block": "error",
205
- "no-eq-null": "error",
206
- "no-eval": "error",
207
- "no-ex-assign": "error",
208
- "no-extend-native": "error",
209
- "no-extra-bind": "error",
210
- "no-extra-boolean-cast": "error",
211
- "no-extra-label": "error",
212
- "no-fallthrough": "error",
213
- "no-func-assign": "error",
214
- "no-global-assign": "error",
215
- "no-implicit-coercion": "error",
216
- "no-implicit-globals": "error",
217
- "no-implied-eval": "error",
218
- "no-import-assign": "error",
219
- "no-inline-comments": "error",
220
- "no-inner-declarations": "error",
221
- "no-invalid-regexp": "error",
222
- "no-invalid-this": "error",
223
- "no-irregular-whitespace": "error",
224
- "no-iterator": "error",
225
- "no-label-var": "error",
226
- "no-labels": "error",
227
- "no-lone-blocks": "error",
228
- "no-lonely-if": "error",
229
- "no-loop-func": "error",
230
- "no-loss-of-precision": "error",
231
- "no-magic-numbers": "error",
232
- "no-misleading-character-class": "error",
233
- "no-multi-assign": "error",
234
- "no-multi-str": "error",
235
- "no-negated-condition": "error",
236
- "no-nested-ternary": "error",
237
- "no-new": "error",
238
- "no-new-func": "error",
239
- "no-new-native-nonconstructor": "error",
240
- "no-new-wrappers": "error",
241
- "no-nonoctal-decimal-escape": "error",
242
- "no-obj-calls": "error",
243
- "no-object-constructor": "error",
244
- "no-octal": "error",
245
- "no-octal-escape": "error",
246
- "no-param-reassign": "error",
247
- "no-plusplus": "error",
248
- "no-promise-executor-return": "error",
249
- "no-proto": "error",
250
- "no-prototype-builtins": "error",
251
- "no-redeclare": "error",
252
- "no-regex-spaces": "error",
253
- "no-restricted-exports": "error",
254
- "no-restricted-globals": "error",
255
- "no-restricted-imports": "error",
256
- "no-restricted-properties": "error",
257
- "no-restricted-syntax": "error",
258
- "no-return-assign": "error",
259
- "no-script-url": "error",
260
- "no-self-assign": "error",
261
- "no-self-compare": "error",
262
- "no-sequences": "error",
263
- "no-setter-return": "error",
264
- "no-shadow": "error",
265
- "no-shadow-restricted-names": "error",
266
- "no-sparse-arrays": "error",
267
- "no-template-curly-in-string": "error",
268
- "no-ternary": "error",
269
- "no-this-before-super": "error",
270
- "no-throw-literal": "error",
271
- "no-unassigned-vars": "error",
272
- "no-undef": "error",
273
- "no-undef-init": "error",
274
- "no-undefined": "error",
275
- "no-underscore-dangle": "error",
276
- "no-unexpected-multiline": "error",
277
- "no-unmodified-loop-condition": "error",
278
- "no-unneeded-ternary": "error",
279
- "no-unreachable": "error",
280
- "no-unreachable-loop": "error",
281
- "no-unsafe-finally": "error",
282
- "no-unsafe-negation": "error",
283
- "no-unsafe-optional-chaining": "error",
284
- "no-unused-expressions": "error",
285
- "no-unused-labels": "error",
286
- "no-unused-private-class-members": "error",
287
- "no-unused-vars": "error",
288
- "no-use-before-define": "error",
289
- "no-useless-assignment": "error",
290
- "no-useless-backreference": "error",
291
- "no-useless-call": "error",
292
- "no-useless-catch": "error",
293
- "no-useless-computed-key": "error",
294
- "no-useless-concat": "error",
295
- "no-useless-constructor": "error",
296
- "no-useless-escape": "error",
297
- "no-useless-rename": "error",
298
- "no-useless-return": "error",
299
- "no-var": "error",
300
- "no-void": "error",
301
- "no-warning-comments": "error",
302
- "no-with": "error",
303
- "object-shorthand": "error",
304
- "one-var": "error",
305
- "operator-assignment": "error",
306
- "prefer-arrow-callback": "error",
307
- "prefer-const": "error",
308
- "prefer-destructuring": "error",
309
- "prefer-exponentiation-operator": "error",
310
- "prefer-named-capture-group": "error",
311
- "prefer-numeric-literals": "error",
312
- "prefer-object-has-own": "error",
313
- "prefer-object-spread": "error",
314
- "prefer-promise-reject-errors": "error",
315
- "prefer-regex-literals": "error",
316
- "prefer-rest-params": "error",
317
- "prefer-spread": "error",
318
- "prefer-template": "error",
319
- "preserve-caught-error": "error",
320
- "radix": "error",
321
- "require-atomic-updates": "error",
322
- "require-await": "error",
323
- "require-unicode-regexp": "error",
324
- "require-yield": "error",
325
- "sort-imports": "error",
326
- "sort-keys": "error",
327
- "sort-vars": "error",
328
- "strict": "error",
329
- "symbol-description": "error",
330
- "unicode-bom": "error",
331
- "use-isnan": "error",
332
- "valid-typeof": "error",
333
- "vars-on-top": "error",
334
- "yoda": "error"
335
- })
336
- });
337
- return eslintAll;
338
- }
101
+ /**
102
+ * @type {VisitorKeys}
103
+ */
104
+ const KEYS = {
105
+ ArrayExpression: [
106
+ "elements"
107
+ ],
108
+ ArrayPattern: [
109
+ "elements"
110
+ ],
111
+ ArrowFunctionExpression: [
112
+ "params",
113
+ "body"
114
+ ],
115
+ AssignmentExpression: [
116
+ "left",
117
+ "right"
118
+ ],
119
+ AssignmentPattern: [
120
+ "left",
121
+ "right"
122
+ ],
123
+ AwaitExpression: [
124
+ "argument"
125
+ ],
126
+ BinaryExpression: [
127
+ "left",
128
+ "right"
129
+ ],
130
+ BlockStatement: [
131
+ "body"
132
+ ],
133
+ BreakStatement: [
134
+ "label"
135
+ ],
136
+ CallExpression: [
137
+ "callee",
138
+ "arguments"
139
+ ],
140
+ CatchClause: [
141
+ "param",
142
+ "body"
143
+ ],
144
+ ChainExpression: [
145
+ "expression"
146
+ ],
147
+ ClassBody: [
148
+ "body"
149
+ ],
150
+ ClassDeclaration: [
151
+ "id",
152
+ "superClass",
153
+ "body"
154
+ ],
155
+ ClassExpression: [
156
+ "id",
157
+ "superClass",
158
+ "body"
159
+ ],
160
+ ConditionalExpression: [
161
+ "test",
162
+ "consequent",
163
+ "alternate"
164
+ ],
165
+ ContinueStatement: [
166
+ "label"
167
+ ],
168
+ DebuggerStatement: [],
169
+ DoWhileStatement: [
170
+ "body",
171
+ "test"
172
+ ],
173
+ EmptyStatement: [],
174
+ ExperimentalRestProperty: [
175
+ "argument"
176
+ ],
177
+ ExperimentalSpreadProperty: [
178
+ "argument"
179
+ ],
180
+ ExportAllDeclaration: [
181
+ "exported",
182
+ "source",
183
+ "attributes"
184
+ ],
185
+ ExportDefaultDeclaration: [
186
+ "declaration"
187
+ ],
188
+ ExportNamedDeclaration: [
189
+ "declaration",
190
+ "specifiers",
191
+ "source",
192
+ "attributes"
193
+ ],
194
+ ExportSpecifier: [
195
+ "local",
196
+ "exported"
197
+ ],
198
+ ExpressionStatement: [
199
+ "expression"
200
+ ],
201
+ ForInStatement: [
202
+ "left",
203
+ "right",
204
+ "body"
205
+ ],
206
+ ForOfStatement: [
207
+ "left",
208
+ "right",
209
+ "body"
210
+ ],
211
+ ForStatement: [
212
+ "init",
213
+ "test",
214
+ "update",
215
+ "body"
216
+ ],
217
+ FunctionDeclaration: [
218
+ "id",
219
+ "params",
220
+ "body"
221
+ ],
222
+ FunctionExpression: [
223
+ "id",
224
+ "params",
225
+ "body"
226
+ ],
227
+ Identifier: [],
228
+ IfStatement: [
229
+ "test",
230
+ "consequent",
231
+ "alternate"
232
+ ],
233
+ ImportAttribute: [
234
+ "key",
235
+ "value"
236
+ ],
237
+ ImportDeclaration: [
238
+ "specifiers",
239
+ "source",
240
+ "attributes"
241
+ ],
242
+ ImportDefaultSpecifier: [
243
+ "local"
244
+ ],
245
+ ImportExpression: [
246
+ "source",
247
+ "options"
248
+ ],
249
+ ImportNamespaceSpecifier: [
250
+ "local"
251
+ ],
252
+ ImportSpecifier: [
253
+ "imported",
254
+ "local"
255
+ ],
256
+ JSXAttribute: [
257
+ "name",
258
+ "value"
259
+ ],
260
+ JSXClosingElement: [
261
+ "name"
262
+ ],
263
+ JSXClosingFragment: [],
264
+ JSXElement: [
265
+ "openingElement",
266
+ "children",
267
+ "closingElement"
268
+ ],
269
+ JSXEmptyExpression: [],
270
+ JSXExpressionContainer: [
271
+ "expression"
272
+ ],
273
+ JSXFragment: [
274
+ "openingFragment",
275
+ "children",
276
+ "closingFragment"
277
+ ],
278
+ JSXIdentifier: [],
279
+ JSXMemberExpression: [
280
+ "object",
281
+ "property"
282
+ ],
283
+ JSXNamespacedName: [
284
+ "namespace",
285
+ "name"
286
+ ],
287
+ JSXOpeningElement: [
288
+ "name",
289
+ "attributes"
290
+ ],
291
+ JSXOpeningFragment: [],
292
+ JSXSpreadAttribute: [
293
+ "argument"
294
+ ],
295
+ JSXSpreadChild: [
296
+ "expression"
297
+ ],
298
+ JSXText: [],
299
+ LabeledStatement: [
300
+ "label",
301
+ "body"
302
+ ],
303
+ Literal: [],
304
+ LogicalExpression: [
305
+ "left",
306
+ "right"
307
+ ],
308
+ MemberExpression: [
309
+ "object",
310
+ "property"
311
+ ],
312
+ MetaProperty: [
313
+ "meta",
314
+ "property"
315
+ ],
316
+ MethodDefinition: [
317
+ "key",
318
+ "value"
319
+ ],
320
+ NewExpression: [
321
+ "callee",
322
+ "arguments"
323
+ ],
324
+ ObjectExpression: [
325
+ "properties"
326
+ ],
327
+ ObjectPattern: [
328
+ "properties"
329
+ ],
330
+ PrivateIdentifier: [],
331
+ Program: [
332
+ "body"
333
+ ],
334
+ Property: [
335
+ "key",
336
+ "value"
337
+ ],
338
+ PropertyDefinition: [
339
+ "key",
340
+ "value"
341
+ ],
342
+ RestElement: [
343
+ "argument"
344
+ ],
345
+ ReturnStatement: [
346
+ "argument"
347
+ ],
348
+ SequenceExpression: [
349
+ "expressions"
350
+ ],
351
+ SpreadElement: [
352
+ "argument"
353
+ ],
354
+ StaticBlock: [
355
+ "body"
356
+ ],
357
+ Super: [],
358
+ SwitchCase: [
359
+ "test",
360
+ "consequent"
361
+ ],
362
+ SwitchStatement: [
363
+ "discriminant",
364
+ "cases"
365
+ ],
366
+ TaggedTemplateExpression: [
367
+ "tag",
368
+ "quasi"
369
+ ],
370
+ TemplateElement: [],
371
+ TemplateLiteral: [
372
+ "quasis",
373
+ "expressions"
374
+ ],
375
+ ThisExpression: [],
376
+ ThrowStatement: [
377
+ "argument"
378
+ ],
379
+ TryStatement: [
380
+ "block",
381
+ "handler",
382
+ "finalizer"
383
+ ],
384
+ UnaryExpression: [
385
+ "argument"
386
+ ],
387
+ UpdateExpression: [
388
+ "argument"
389
+ ],
390
+ VariableDeclaration: [
391
+ "declarations"
392
+ ],
393
+ VariableDeclarator: [
394
+ "id",
395
+ "init"
396
+ ],
397
+ WhileStatement: [
398
+ "test",
399
+ "body"
400
+ ],
401
+ WithStatement: [
402
+ "object",
403
+ "body"
404
+ ],
405
+ YieldExpression: [
406
+ "argument"
407
+ ]
408
+ };
339
409
 
340
- /*
341
- * WARNING: This file is autogenerated using the tools/update-eslint-recommended.js
342
- * script. Do not edit manually.
343
- */
410
+ // Types.
411
+ const NODE_TYPES = Object.keys(KEYS);
344
412
 
345
- var eslintRecommended;
346
- var hasRequiredEslintRecommended;
413
+ // Freeze the keys.
414
+ for (const type of NODE_TYPES) {
415
+ Object.freeze(KEYS[type]);
416
+ }
417
+ Object.freeze(KEYS);
347
418
 
348
- function requireEslintRecommended () {
349
- if (hasRequiredEslintRecommended) return eslintRecommended;
350
- hasRequiredEslintRecommended = 1;
419
+ /**
420
+ * @author Toru Nagashima <https://github.com/mysticatea>
421
+ * See LICENSE file in root directory for full license.
422
+ */
351
423
 
352
- /*
353
- * IMPORTANT!
354
- *
355
- * We cannot add a "name" property to this object because it's still used in eslintrc
356
- * which doesn't support the "name" property. If we add a "name" property, it will
357
- * cause an error.
424
+ /**
425
+ * @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
358
426
  */
359
427
 
360
- eslintRecommended = Object.freeze({
361
- rules: Object.freeze({
362
- "constructor-super": "error",
363
- "for-direction": "error",
364
- "getter-return": "error",
365
- "no-async-promise-executor": "error",
366
- "no-case-declarations": "error",
367
- "no-class-assign": "error",
368
- "no-compare-neg-zero": "error",
369
- "no-cond-assign": "error",
370
- "no-const-assign": "error",
371
- "no-constant-binary-expression": "error",
372
- "no-constant-condition": "error",
373
- "no-control-regex": "error",
374
- "no-debugger": "error",
375
- "no-delete-var": "error",
376
- "no-dupe-args": "error",
377
- "no-dupe-class-members": "error",
378
- "no-dupe-else-if": "error",
379
- "no-dupe-keys": "error",
380
- "no-duplicate-case": "error",
381
- "no-empty": "error",
382
- "no-empty-character-class": "error",
383
- "no-empty-pattern": "error",
384
- "no-empty-static-block": "error",
385
- "no-ex-assign": "error",
386
- "no-extra-boolean-cast": "error",
387
- "no-fallthrough": "error",
388
- "no-func-assign": "error",
389
- "no-global-assign": "error",
390
- "no-import-assign": "error",
391
- "no-invalid-regexp": "error",
392
- "no-irregular-whitespace": "error",
393
- "no-loss-of-precision": "error",
394
- "no-misleading-character-class": "error",
395
- "no-new-native-nonconstructor": "error",
396
- "no-nonoctal-decimal-escape": "error",
397
- "no-obj-calls": "error",
398
- "no-octal": "error",
399
- "no-prototype-builtins": "error",
400
- "no-redeclare": "error",
401
- "no-regex-spaces": "error",
402
- "no-self-assign": "error",
403
- "no-setter-return": "error",
404
- "no-shadow-restricted-names": "error",
405
- "no-sparse-arrays": "error",
406
- "no-this-before-super": "error",
407
- "no-undef": "error",
408
- "no-unexpected-multiline": "error",
409
- "no-unreachable": "error",
410
- "no-unsafe-finally": "error",
411
- "no-unsafe-negation": "error",
412
- "no-unsafe-optional-chaining": "error",
413
- "no-unused-labels": "error",
414
- "no-unused-private-class-members": "error",
415
- "no-unused-vars": "error",
416
- "no-useless-backreference": "error",
417
- "no-useless-catch": "error",
418
- "no-useless-escape": "error",
419
- "no-with": "error",
420
- "require-yield": "error",
421
- "use-isnan": "error",
422
- "valid-typeof": "error"
423
- }),
424
- });
425
- return eslintRecommended;
426
- }
428
+ // List to ignore keys.
429
+ const KEY_BLACKLIST = new Set([
430
+ "parent",
431
+ "leadingComments",
432
+ "trailingComments"
433
+ ]);
427
434
 
428
- /**
429
- * @fileoverview Main package entrypoint.
430
- * @author Nicholas C. Zakas
431
- */
435
+ /**
436
+ * Check whether a given key should be used or not.
437
+ * @param {string} key The key to check.
438
+ * @returns {boolean} `true` if the key should be used.
439
+ */
440
+ function filterKey(key) {
441
+ return !KEY_BLACKLIST.has(key) && key[0] !== "_";
442
+ }
432
443
 
433
- var src$1;
434
- var hasRequiredSrc$1;
435
444
 
436
- function requireSrc$1 () {
437
- if (hasRequiredSrc$1) return src$1;
438
- hasRequiredSrc$1 = 1;
445
+ /* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
446
+ TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
447
+ */
448
+ /**
449
+ * Get visitor keys of a given node.
450
+ * @param {Object} node The AST node to get keys.
451
+ * @returns {readonly string[]} Visitor keys of the node.
452
+ */
453
+ function getKeys(node) {
454
+ return Object.keys(node).filter(filterKey);
455
+ }
456
+ /* eslint-enable jsdoc/valid-types -- doesn't allow `readonly` */
439
457
 
440
- const { name, version } = require$$0;
458
+ /**
459
+ * Make the union set with `KEYS` and given keys.
460
+ * @param {VisitorKeys} additionalKeys The additional keys.
461
+ * @returns {VisitorKeys} The union set.
462
+ */
463
+ function unionWith(additionalKeys) {
464
+ const retv = /** @type {{ [type: string]: ReadonlyArray<string> }} */
465
+ (Object.assign({}, KEYS));
441
466
 
442
- //------------------------------------------------------------------------------
443
- // Public Interface
444
- //------------------------------------------------------------------------------
467
+ for (const type of Object.keys(additionalKeys)) {
468
+ if (Object.hasOwn(retv, type)) {
469
+ const keys = new Set(additionalKeys[type]);
445
470
 
446
- src$1 = {
447
- meta: {
448
- name,
449
- version,
450
- },
451
- configs: {
452
- all: requireEslintAll(),
453
- recommended: requireEslintRecommended(),
454
- },
455
- };
456
- return src$1;
457
- }
471
+ for (const key of retv[type]) {
472
+ keys.add(key);
473
+ }
458
474
 
459
- var srcExports = requireSrc$1();
460
- const pluginJs = /*@__PURE__*/index.getDefaultExportFromCjs(srcExports);
475
+ retv[type] = Object.freeze(Array.from(keys));
476
+ } else {
477
+ retv[type] = Object.freeze(Array.from(additionalKeys[type]));
478
+ }
479
+ }
461
480
 
462
- function commonjsRequire(path) {
463
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
464
- }
481
+ return Object.freeze(retv);
482
+ }
465
483
 
466
- var vueEslintParser = {};
484
+ eslintVisitorKeys.KEYS = KEYS;
485
+ eslintVisitorKeys.getKeys = getKeys;
486
+ eslintVisitorKeys.unionWith = unionWith;
487
+ return eslintVisitorKeys;
488
+ }
467
489
 
468
490
  var src = {exports: {}};
469
491
 
@@ -2562,24 +2584,24 @@ const _package = {
2562
2584
  };
2563
2585
 
2564
2586
  const _package$1 = {
2565
- __proto__: null,
2566
- babel: babel,
2567
- default: _package,
2568
- dependencies: dependencies,
2569
- description: description,
2570
- devDependencies: devDependencies,
2571
- engines: engines,
2572
- homepage: homepage,
2573
- license: license,
2574
- main: main,
2575
- maintainers: maintainers,
2576
- name: name,
2577
- repository: repository,
2578
- scripts: scripts,
2579
- version: version
2587
+ __proto__: null,
2588
+ babel: babel,
2589
+ default: _package,
2590
+ dependencies: dependencies,
2591
+ description: description,
2592
+ devDependencies: devDependencies,
2593
+ engines: engines,
2594
+ homepage: homepage,
2595
+ license: license,
2596
+ main: main,
2597
+ maintainers: maintainers,
2598
+ name: name,
2599
+ repository: repository,
2600
+ scripts: scripts,
2601
+ version: version
2580
2602
  };
2581
2603
 
2582
- const require$$1 = /*@__PURE__*/index.getAugmentedNamespace(_package$1);
2604
+ const require$$1 = /*@__PURE__*/getAugmentedNamespace(_package$1);
2583
2605
 
2584
2606
  /*
2585
2607
  Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
@@ -14818,7 +14840,7 @@ function requireEspree () {
14818
14840
 
14819
14841
  var acorn = requireAcorn();
14820
14842
  var jsx = requireAcornJsx();
14821
- var visitorKeys = index.requireEslintVisitorKeys();
14843
+ var visitorKeys = requireEslintVisitorKeys();
14822
14844
 
14823
14845
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14824
14846
 
@@ -15768,7 +15790,7 @@ function requireVueEslintParser () {
15768
15790
  Object.defineProperty(vueEslintParser, '__esModule', { value: true });
15769
15791
 
15770
15792
  var path = require$$0__default$1;
15771
- var Evk = index.requireEslintVisitorKeys();
15793
+ var Evk = requireEslintVisitorKeys();
15772
15794
  var assert = require$$2__default;
15773
15795
  var debugFactory = requireSrc();
15774
15796
  var escope = requireEslintScope();
@@ -15930,7 +15952,7 @@ function requireVueEslintParser () {
15930
15952
  traverse(node, null, visitor);
15931
15953
  }
15932
15954
 
15933
- var index$1 = /*#__PURE__*/Object.freeze({
15955
+ var index = /*#__PURE__*/Object.freeze({
15934
15956
  __proto__: null,
15935
15957
  ParseError: ParseError,
15936
15958
  NS: NS,
@@ -20795,7 +20817,7 @@ function requireVueEslintParser () {
20795
20817
  return sourceCode;
20796
20818
  }
20797
20819
  const scopeManager = getScopeManager();
20798
- const originalSourceCode = new (require$$0__default$2.SourceCode)({
20820
+ const originalSourceCode = new (require$$10__default.SourceCode)({
20799
20821
  text,
20800
20822
  ast: parsedResult.ast,
20801
20823
  parserServices: {
@@ -22396,7 +22418,7 @@ function requireVueEslintParser () {
22396
22418
  version: "10.2.0",
22397
22419
  };
22398
22420
 
22399
- vueEslintParser.AST = index$1;
22421
+ vueEslintParser.AST = index;
22400
22422
  vueEslintParser.meta = meta;
22401
22423
  vueEslintParser.parse = parse;
22402
22424
  vueEslintParser.parseForESLint = parseForESLint;
@@ -22405,7 +22427,7 @@ function requireVueEslintParser () {
22405
22427
  }
22406
22428
 
22407
22429
  var vueEslintParserExports = requireVueEslintParser();
22408
- const parserVue = /*@__PURE__*/index.getDefaultExportFromCjs(vueEslintParserExports);
22430
+ const parserVue = /*@__PURE__*/getDefaultExportFromCjs(vueEslintParserExports);
22409
22431
 
22410
22432
  const config = [
22411
22433
  // Global ignores
@@ -22425,7 +22447,7 @@ const config = [
22425
22447
  ]
22426
22448
  },
22427
22449
  // JavaScript & TypeScript
22428
- pluginJs.configs.recommended,
22450
+ pluginJs__default.configs.recommended,
22429
22451
  ...tseslint__default.configs.strict,
22430
22452
  ...tseslint__default.configs.stylistic,
22431
22453
  {
@@ -22449,7 +22471,7 @@ const config = [
22449
22471
  "@typescript-eslint/no-non-null-assertion": "off",
22450
22472
  "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
22451
22473
  "array-bracket-newline": ["error", { minItems: 3, multiline: true }],
22452
- "id-length": ["error", { exceptions: ["_", "t", "x", "y"], min: 2 }],
22474
+ "id-length": ["error", { exceptions: ["_", "n", "t", "x", "y"], min: 2 }],
22453
22475
  "no-undef": "off"
22454
22476
  }
22455
22477
  },
@@ -22458,6 +22480,20 @@ const config = [
22458
22480
  ...eslintPluginPnpm.configs.yaml,
22459
22481
  unocss__default,
22460
22482
  turbo__default.configs["flat/recommended"],
22483
+ // Node
22484
+ nodeEslint__default.configs["flat/recommended"],
22485
+ {
22486
+ files: ["**/*.{js,mjs,ts,mts,vue}"],
22487
+ rules: {
22488
+ "n/no-missing-import": "off",
22489
+ "n/no-sync": "error",
22490
+ "n/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
22491
+ "n/prefer-global/process": ["error", "always"],
22492
+ "n/prefer-node-protocol": "error",
22493
+ "n/prefer-promises/fs": "error"
22494
+ },
22495
+ settings: { n: { version: "22.21.1" } }
22496
+ },
22461
22497
  // Package JSON
22462
22498
  packageJson__default.configs["recommended-publishable"],
22463
22499
  packageJson__default.configs.stylistic,
@@ -22481,7 +22517,7 @@ const config = [
22481
22517
  // SaaS Makers
22482
22518
  {
22483
22519
  plugins: {
22484
- saasmakers: index.saasmakers
22520
+ saasmakers: index.default
22485
22521
  },
22486
22522
  rules: {
22487
22523
  "saasmakers/ts-multiline-ternary": "error",
@@ -22500,6 +22536,14 @@ const config = [
22500
22536
  "saasmakers/vue-template-remove-comments": "error",
22501
22537
  "saasmakers/vue-template-remove-true-attributes": "error"
22502
22538
  }
22539
+ },
22540
+ // Unicorn
22541
+ unicorn__default.configs["recommended"],
22542
+ {
22543
+ rules: {
22544
+ "unicorn/filename-case": "off",
22545
+ "unicorn/prevent-abbreviations": "off"
22546
+ }
22503
22547
  }
22504
22548
  ];
22505
22549