@saasmakers/eslint 0.2.11 → 1.0.1

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.
Files changed (35) hide show
  1. package/dist/chunks/formatters.cjs +2 -2
  2. package/dist/chunks/formatters.mjs +2 -2
  3. package/dist/chunks/import.cjs +2 -2
  4. package/dist/chunks/import.mjs +2 -2
  5. package/dist/chunks/index4.cjs +4 -4
  6. package/dist/chunks/index4.mjs +4 -4
  7. package/dist/chunks/jsdoc.cjs +4 -4
  8. package/dist/chunks/jsdoc.mjs +4 -4
  9. package/dist/chunks/stylistic.cjs +4 -4
  10. package/dist/chunks/stylistic.mjs +4 -4
  11. package/dist/chunks/typescript.cjs +194 -194
  12. package/dist/chunks/typescript.mjs +5 -5
  13. package/dist/chunks/unicorn.cjs +1 -1
  14. package/dist/chunks/unicorn.mjs +1 -1
  15. package/dist/chunks/vue.cjs +7 -7
  16. package/dist/chunks/vue.mjs +5 -5
  17. package/dist/eslint.config.cjs +2 -2
  18. package/dist/eslint.config.d.cts +27 -19
  19. package/dist/eslint.config.d.mts +27 -19
  20. package/dist/eslint.config.d.ts +27 -19
  21. package/dist/eslint.config.mjs +2 -2
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.d.cts +2 -6
  24. package/dist/index.d.mts +2 -6
  25. package/dist/index.d.ts +2 -6
  26. package/dist/index.mjs +1 -1
  27. package/dist/shared/{eslint.CMfxPSSy.cjs → eslint.7dipMixF.cjs} +2 -2
  28. package/dist/shared/{eslint.BFtsK_yJ.mjs → eslint.B4kWSx8Y.mjs} +7236 -7435
  29. package/dist/shared/{eslint.DV_fpPxQ.mjs → eslint.B6FFUbNC.mjs} +39 -30
  30. package/dist/shared/{eslint.CDkoKQAL.cjs → eslint.BHA6t2Iw.cjs} +7246 -7438
  31. package/dist/shared/{eslint.Bf7aat-e.mjs → eslint.BXzpdiiq.mjs} +2 -2
  32. package/dist/shared/{eslint.B3ywQ3NK.mjs → eslint.C6EaTeQZ.mjs} +328 -121
  33. package/dist/shared/{eslint.CyJA7jO6.cjs → eslint.DP_6nQqR.cjs} +39 -30
  34. package/dist/shared/{eslint.Dhg0jKDi.cjs → eslint.Dxl4X46J.cjs} +327 -127
  35. package/package.json +1 -1
@@ -4111,9 +4111,7 @@ function requireGetParserServices () {
4111
4111
  const ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = "You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://tseslint.com/typed-linting for enabling linting with type information.";
4112
4112
  const ERROR_MESSAGE_UNKNOWN_PARSER = 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.';
4113
4113
  function getParserServices$1(context, allowWithoutFullTypeInformation = false) {
4114
- const parser =
4115
- // eslint-disable-next-line @typescript-eslint/no-deprecated -- For compatibility with ESLint 8
4116
- context.parserPath || context.languageOptions.parser?.meta?.name;
4114
+ const parser = context.parserPath || context.languageOptions.parser?.meta?.name;
4117
4115
  // This check is unnecessary if the user is using the latest version of our parser.
4118
4116
  //
4119
4117
  // However the world isn't perfect:
@@ -4541,100 +4539,309 @@ function requireEslintVisitorKeys () {
4541
4539
  * @type {VisitorKeys}
4542
4540
  */
4543
4541
  const KEYS = {
4544
- ArrayExpression: ["elements"],
4545
- ArrayPattern: ["elements"],
4546
- ArrowFunctionExpression: ["params", "body"],
4547
- AssignmentExpression: ["left", "right"],
4548
- AssignmentPattern: ["left", "right"],
4549
- AwaitExpression: ["argument"],
4550
- BinaryExpression: ["left", "right"],
4551
- BlockStatement: ["body"],
4552
- BreakStatement: ["label"],
4553
- CallExpression: ["callee", "arguments"],
4554
- CatchClause: ["param", "body"],
4555
- ChainExpression: ["expression"],
4556
- ClassBody: ["body"],
4557
- ClassDeclaration: ["id", "superClass", "body"],
4558
- ClassExpression: ["id", "superClass", "body"],
4559
- ConditionalExpression: ["test", "consequent", "alternate"],
4560
- ContinueStatement: ["label"],
4561
- DebuggerStatement: [],
4562
- DoWhileStatement: ["body", "test"],
4563
- EmptyStatement: [],
4564
- ExperimentalRestProperty: ["argument"],
4565
- ExperimentalSpreadProperty: ["argument"],
4566
- ExportAllDeclaration: ["exported", "source", "attributes"],
4567
- ExportDefaultDeclaration: ["declaration"],
4568
- ExportNamedDeclaration: [
4569
- "declaration",
4570
- "specifiers",
4571
- "source",
4572
- "attributes",
4573
- ],
4574
- ExportSpecifier: ["local", "exported"],
4575
- ExpressionStatement: ["expression"],
4576
- ForInStatement: ["left", "right", "body"],
4577
- ForOfStatement: ["left", "right", "body"],
4578
- ForStatement: ["init", "test", "update", "body"],
4579
- FunctionDeclaration: ["id", "params", "body"],
4580
- FunctionExpression: ["id", "params", "body"],
4581
- Identifier: [],
4582
- IfStatement: ["test", "consequent", "alternate"],
4583
- ImportAttribute: ["key", "value"],
4584
- ImportDeclaration: ["specifiers", "source", "attributes"],
4585
- ImportDefaultSpecifier: ["local"],
4586
- ImportExpression: ["source", "options"],
4587
- ImportNamespaceSpecifier: ["local"],
4588
- ImportSpecifier: ["imported", "local"],
4589
- JSXAttribute: ["name", "value"],
4590
- JSXClosingElement: ["name"],
4591
- JSXClosingFragment: [],
4592
- JSXElement: ["openingElement", "children", "closingElement"],
4593
- JSXEmptyExpression: [],
4594
- JSXExpressionContainer: ["expression"],
4595
- JSXFragment: ["openingFragment", "children", "closingFragment"],
4596
- JSXIdentifier: [],
4597
- JSXMemberExpression: ["object", "property"],
4598
- JSXNamespacedName: ["namespace", "name"],
4599
- JSXOpeningElement: ["name", "attributes"],
4600
- JSXOpeningFragment: [],
4601
- JSXSpreadAttribute: ["argument"],
4602
- JSXSpreadChild: ["expression"],
4603
- JSXText: [],
4604
- LabeledStatement: ["label", "body"],
4605
- Literal: [],
4606
- LogicalExpression: ["left", "right"],
4607
- MemberExpression: ["object", "property"],
4608
- MetaProperty: ["meta", "property"],
4609
- MethodDefinition: ["key", "value"],
4610
- NewExpression: ["callee", "arguments"],
4611
- ObjectExpression: ["properties"],
4612
- ObjectPattern: ["properties"],
4613
- PrivateIdentifier: [],
4614
- Program: ["body"],
4615
- Property: ["key", "value"],
4616
- PropertyDefinition: ["key", "value"],
4617
- RestElement: ["argument"],
4618
- ReturnStatement: ["argument"],
4619
- SequenceExpression: ["expressions"],
4620
- SpreadElement: ["argument"],
4621
- StaticBlock: ["body"],
4622
- Super: [],
4623
- SwitchCase: ["test", "consequent"],
4624
- SwitchStatement: ["discriminant", "cases"],
4625
- TaggedTemplateExpression: ["tag", "quasi"],
4626
- TemplateElement: [],
4627
- TemplateLiteral: ["quasis", "expressions"],
4628
- ThisExpression: [],
4629
- ThrowStatement: ["argument"],
4630
- TryStatement: ["block", "handler", "finalizer"],
4631
- UnaryExpression: ["argument"],
4632
- UpdateExpression: ["argument"],
4633
- VariableDeclaration: ["declarations"],
4634
- VariableDeclarator: ["id", "init"],
4635
- WhileStatement: ["test", "body"],
4636
- WithStatement: ["object", "body"],
4637
- YieldExpression: ["argument"],
4542
+ ArrayExpression: [
4543
+ "elements"
4544
+ ],
4545
+ ArrayPattern: [
4546
+ "elements"
4547
+ ],
4548
+ ArrowFunctionExpression: [
4549
+ "params",
4550
+ "body"
4551
+ ],
4552
+ AssignmentExpression: [
4553
+ "left",
4554
+ "right"
4555
+ ],
4556
+ AssignmentPattern: [
4557
+ "left",
4558
+ "right"
4559
+ ],
4560
+ AwaitExpression: [
4561
+ "argument"
4562
+ ],
4563
+ BinaryExpression: [
4564
+ "left",
4565
+ "right"
4566
+ ],
4567
+ BlockStatement: [
4568
+ "body"
4569
+ ],
4570
+ BreakStatement: [
4571
+ "label"
4572
+ ],
4573
+ CallExpression: [
4574
+ "callee",
4575
+ "arguments"
4576
+ ],
4577
+ CatchClause: [
4578
+ "param",
4579
+ "body"
4580
+ ],
4581
+ ChainExpression: [
4582
+ "expression"
4583
+ ],
4584
+ ClassBody: [
4585
+ "body"
4586
+ ],
4587
+ ClassDeclaration: [
4588
+ "id",
4589
+ "superClass",
4590
+ "body"
4591
+ ],
4592
+ ClassExpression: [
4593
+ "id",
4594
+ "superClass",
4595
+ "body"
4596
+ ],
4597
+ ConditionalExpression: [
4598
+ "test",
4599
+ "consequent",
4600
+ "alternate"
4601
+ ],
4602
+ ContinueStatement: [
4603
+ "label"
4604
+ ],
4605
+ DebuggerStatement: [],
4606
+ DoWhileStatement: [
4607
+ "body",
4608
+ "test"
4609
+ ],
4610
+ EmptyStatement: [],
4611
+ ExperimentalRestProperty: [
4612
+ "argument"
4613
+ ],
4614
+ ExperimentalSpreadProperty: [
4615
+ "argument"
4616
+ ],
4617
+ ExportAllDeclaration: [
4618
+ "exported",
4619
+ "source",
4620
+ "attributes"
4621
+ ],
4622
+ ExportDefaultDeclaration: [
4623
+ "declaration"
4624
+ ],
4625
+ ExportNamedDeclaration: [
4626
+ "declaration",
4627
+ "specifiers",
4628
+ "source",
4629
+ "attributes"
4630
+ ],
4631
+ ExportSpecifier: [
4632
+ "local",
4633
+ "exported"
4634
+ ],
4635
+ ExpressionStatement: [
4636
+ "expression"
4637
+ ],
4638
+ ForInStatement: [
4639
+ "left",
4640
+ "right",
4641
+ "body"
4642
+ ],
4643
+ ForOfStatement: [
4644
+ "left",
4645
+ "right",
4646
+ "body"
4647
+ ],
4648
+ ForStatement: [
4649
+ "init",
4650
+ "test",
4651
+ "update",
4652
+ "body"
4653
+ ],
4654
+ FunctionDeclaration: [
4655
+ "id",
4656
+ "params",
4657
+ "body"
4658
+ ],
4659
+ FunctionExpression: [
4660
+ "id",
4661
+ "params",
4662
+ "body"
4663
+ ],
4664
+ Identifier: [],
4665
+ IfStatement: [
4666
+ "test",
4667
+ "consequent",
4668
+ "alternate"
4669
+ ],
4670
+ ImportAttribute: [
4671
+ "key",
4672
+ "value"
4673
+ ],
4674
+ ImportDeclaration: [
4675
+ "specifiers",
4676
+ "source",
4677
+ "attributes"
4678
+ ],
4679
+ ImportDefaultSpecifier: [
4680
+ "local"
4681
+ ],
4682
+ ImportExpression: [
4683
+ "source",
4684
+ "options"
4685
+ ],
4686
+ ImportNamespaceSpecifier: [
4687
+ "local"
4688
+ ],
4689
+ ImportSpecifier: [
4690
+ "imported",
4691
+ "local"
4692
+ ],
4693
+ JSXAttribute: [
4694
+ "name",
4695
+ "value"
4696
+ ],
4697
+ JSXClosingElement: [
4698
+ "name"
4699
+ ],
4700
+ JSXClosingFragment: [],
4701
+ JSXElement: [
4702
+ "openingElement",
4703
+ "children",
4704
+ "closingElement"
4705
+ ],
4706
+ JSXEmptyExpression: [],
4707
+ JSXExpressionContainer: [
4708
+ "expression"
4709
+ ],
4710
+ JSXFragment: [
4711
+ "openingFragment",
4712
+ "children",
4713
+ "closingFragment"
4714
+ ],
4715
+ JSXIdentifier: [],
4716
+ JSXMemberExpression: [
4717
+ "object",
4718
+ "property"
4719
+ ],
4720
+ JSXNamespacedName: [
4721
+ "namespace",
4722
+ "name"
4723
+ ],
4724
+ JSXOpeningElement: [
4725
+ "name",
4726
+ "attributes"
4727
+ ],
4728
+ JSXOpeningFragment: [],
4729
+ JSXSpreadAttribute: [
4730
+ "argument"
4731
+ ],
4732
+ JSXSpreadChild: [
4733
+ "expression"
4734
+ ],
4735
+ JSXText: [],
4736
+ LabeledStatement: [
4737
+ "label",
4738
+ "body"
4739
+ ],
4740
+ Literal: [],
4741
+ LogicalExpression: [
4742
+ "left",
4743
+ "right"
4744
+ ],
4745
+ MemberExpression: [
4746
+ "object",
4747
+ "property"
4748
+ ],
4749
+ MetaProperty: [
4750
+ "meta",
4751
+ "property"
4752
+ ],
4753
+ MethodDefinition: [
4754
+ "key",
4755
+ "value"
4756
+ ],
4757
+ NewExpression: [
4758
+ "callee",
4759
+ "arguments"
4760
+ ],
4761
+ ObjectExpression: [
4762
+ "properties"
4763
+ ],
4764
+ ObjectPattern: [
4765
+ "properties"
4766
+ ],
4767
+ PrivateIdentifier: [],
4768
+ Program: [
4769
+ "body"
4770
+ ],
4771
+ Property: [
4772
+ "key",
4773
+ "value"
4774
+ ],
4775
+ PropertyDefinition: [
4776
+ "key",
4777
+ "value"
4778
+ ],
4779
+ RestElement: [
4780
+ "argument"
4781
+ ],
4782
+ ReturnStatement: [
4783
+ "argument"
4784
+ ],
4785
+ SequenceExpression: [
4786
+ "expressions"
4787
+ ],
4788
+ SpreadElement: [
4789
+ "argument"
4790
+ ],
4791
+ StaticBlock: [
4792
+ "body"
4793
+ ],
4794
+ Super: [],
4795
+ SwitchCase: [
4796
+ "test",
4797
+ "consequent"
4798
+ ],
4799
+ SwitchStatement: [
4800
+ "discriminant",
4801
+ "cases"
4802
+ ],
4803
+ TaggedTemplateExpression: [
4804
+ "tag",
4805
+ "quasi"
4806
+ ],
4807
+ TemplateElement: [],
4808
+ TemplateLiteral: [
4809
+ "quasis",
4810
+ "expressions"
4811
+ ],
4812
+ ThisExpression: [],
4813
+ ThrowStatement: [
4814
+ "argument"
4815
+ ],
4816
+ TryStatement: [
4817
+ "block",
4818
+ "handler",
4819
+ "finalizer"
4820
+ ],
4821
+ UnaryExpression: [
4822
+ "argument"
4823
+ ],
4824
+ UpdateExpression: [
4825
+ "argument"
4826
+ ],
4827
+ VariableDeclaration: [
4828
+ "declarations"
4829
+ ],
4830
+ VariableDeclarator: [
4831
+ "id",
4832
+ "init"
4833
+ ],
4834
+ WhileStatement: [
4835
+ "test",
4836
+ "body"
4837
+ ],
4838
+ WithStatement: [
4839
+ "object",
4840
+ "body"
4841
+ ],
4842
+ YieldExpression: [
4843
+ "argument"
4844
+ ]
4638
4845
  };
4639
4846
 
4640
4847
  // Types.
@@ -4642,7 +4849,7 @@ function requireEslintVisitorKeys () {
4642
4849
 
4643
4850
  // Freeze the keys.
4644
4851
  for (const type of NODE_TYPES) {
4645
- Object.freeze(KEYS[type]);
4852
+ Object.freeze(KEYS[type]);
4646
4853
  }
4647
4854
  Object.freeze(KEYS);
4648
4855
 
@@ -4657,9 +4864,9 @@ function requireEslintVisitorKeys () {
4657
4864
 
4658
4865
  // List to ignore keys.
4659
4866
  const KEY_BLACKLIST = new Set([
4660
- "parent",
4661
- "leadingComments",
4662
- "trailingComments",
4867
+ "parent",
4868
+ "leadingComments",
4869
+ "trailingComments"
4663
4870
  ]);
4664
4871
 
4665
4872
  /**
@@ -4668,9 +4875,10 @@ function requireEslintVisitorKeys () {
4668
4875
  * @returns {boolean} `true` if the key should be used.
4669
4876
  */
4670
4877
  function filterKey(key) {
4671
- return !KEY_BLACKLIST.has(key) && key[0] !== "_";
4878
+ return !KEY_BLACKLIST.has(key) && key[0] !== "_";
4672
4879
  }
4673
4880
 
4881
+
4674
4882
  /* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
4675
4883
  TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
4676
4884
  */
@@ -4680,7 +4888,7 @@ function requireEslintVisitorKeys () {
4680
4888
  * @returns {readonly string[]} Visitor keys of the node.
4681
4889
  */
4682
4890
  function getKeys(node) {
4683
- return Object.keys(node).filter(filterKey);
4891
+ return Object.keys(node).filter(filterKey);
4684
4892
  }
4685
4893
  /* eslint-enable jsdoc/valid-types -- doesn't allow `readonly` */
4686
4894
 
@@ -4690,25 +4898,24 @@ function requireEslintVisitorKeys () {
4690
4898
  * @returns {VisitorKeys} The union set.
4691
4899
  */
4692
4900
  function unionWith(additionalKeys) {
4693
- const retv =
4694
- /** @type {{ [type: string]: ReadonlyArray<string> }} */
4695
- (Object.assign({}, KEYS));
4901
+ const retv = /** @type {{ [type: string]: ReadonlyArray<string> }} */
4902
+ (Object.assign({}, KEYS));
4696
4903
 
4697
- for (const type of Object.keys(additionalKeys)) {
4698
- if (Object.hasOwn(retv, type)) {
4699
- const keys = new Set(additionalKeys[type]);
4904
+ for (const type of Object.keys(additionalKeys)) {
4905
+ if (Object.hasOwn(retv, type)) {
4906
+ const keys = new Set(additionalKeys[type]);
4700
4907
 
4701
- for (const key of retv[type]) {
4702
- keys.add(key);
4703
- }
4908
+ for (const key of retv[type]) {
4909
+ keys.add(key);
4910
+ }
4704
4911
 
4705
- retv[type] = Object.freeze(Array.from(keys));
4706
- } else {
4707
- retv[type] = Object.freeze(Array.from(additionalKeys[type]));
4708
- }
4709
- }
4912
+ retv[type] = Object.freeze(Array.from(keys));
4913
+ } else {
4914
+ retv[type] = Object.freeze(Array.from(additionalKeys[type]));
4915
+ }
4916
+ }
4710
4917
 
4711
- return Object.freeze(retv);
4918
+ return Object.freeze(retv);
4712
4919
  }
4713
4920
 
4714
4921
  eslintVisitorKeys.KEYS = KEYS;
@@ -4724,7 +4931,7 @@ function requireGetKeys () {
4724
4931
  hasRequiredGetKeys = 1;
4725
4932
  Object.defineProperty(getKeys, "__esModule", { value: true });
4726
4933
  getKeys.getKeys = void 0;
4727
- const eslint_visitor_keys_1 = /*@__PURE__*/ requireEslintVisitorKeys();
4934
+ const eslint_visitor_keys_1 = requireEslintVisitorKeys();
4728
4935
  getKeys.getKeys = eslint_visitor_keys_1.getKeys;
4729
4936
  return getKeys;
4730
4937
  }
@@ -4771,7 +4978,7 @@ function requireVisitorKeys () {
4771
4978
  })();
4772
4979
  Object.defineProperty(visitorKeys, "__esModule", { value: true });
4773
4980
  visitorKeys.visitorKeys = void 0;
4774
- const eslintVisitorKeys = __importStar(/*@__PURE__*/ requireEslintVisitorKeys());
4981
+ const eslintVisitorKeys = __importStar(requireEslintVisitorKeys());
4775
4982
  /*
4776
4983
  ********************************** IMPORTANT NOTE ********************************
4777
4984
  * *
@@ -13937,11 +14144,4 @@ exports.commonjsGlobal = commonjsGlobal;
13937
14144
  exports.distExports = distExports;
13938
14145
  exports.getAugmentedNamespace = getAugmentedNamespace;
13939
14146
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
13940
- exports.requireAstUtils = requireAstUtils;
13941
- exports.requireDist = requireDist$3;
13942
- exports.requireDist$1 = requireDist$2;
13943
- exports.requireDist$2 = requireDist$1;
13944
- exports.requireDist$3 = requireDist;
13945
14147
  exports.requireEslintUtils = requireEslintUtils$2;
13946
- exports.requireEslintUtils$1 = requireEslintUtils;
13947
- exports.requireEslintVisitorKeys = requireEslintVisitorKeys;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/eslint",
3
- "version": "0.2.11",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "description": "Shared ESLint config and rules for SaaS Makers projects",
6
6
  "license": "MIT",