@servicetitan/eslint-plugin 32.2.0 → 32.3.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.
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Linter, Rule } from 'eslint';
3
3
  export declare const rules: Record<'base' | 'mobx' | 'react', Record<string, Rule.RuleModule | AnyRuleModule>>;
4
4
  declare const plugin: {
5
5
  configs: {
6
- recommended: Linter.Config<Linter.RulesRecord>[];
6
+ recommended: Linter.Config<import("@eslint/core").RulesConfig>[];
7
7
  };
8
8
  };
9
9
  export default plugin;
@@ -24,7 +24,8 @@ const reactNoQualifiedType = {
24
24
  create (context) {
25
25
  return {
26
26
  TSQualifiedName (node) {
27
- if (node.left && node.left.name === 'React') {
27
+ var _node_left;
28
+ if (((_node_left = node.left) === null || _node_left === void 0 ? void 0 : _node_left.name) === 'React') {
28
29
  context.report({
29
30
  node,
30
31
  messageId: 'importDefault',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/rules/react/no-qualified-type.ts"],"sourcesContent":["import { Rule } from 'eslint';\n\nexport const reactNoQualifiedType: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow using React types from default export',\n category: 'Best Practices',\n recommended: false,\n url: 'https://github.com/servicetitan/uikit.git',\n },\n messages: {\n importDefault: \"Import {{right}} from 'react' instead of using React.{{right}}\",\n },\n },\n create(context) {\n return {\n TSQualifiedName(node: any) {\n if (node.left && node.left.name === 'React') {\n context.report({\n node,\n messageId: 'importDefault',\n data: {\n right: node.right.name,\n },\n });\n }\n },\n };\n },\n};\n"],"names":["reactNoQualifiedType","meta","type","docs","description","category","recommended","url","messages","importDefault","create","context","TSQualifiedName","node","left","name","report","messageId","data","right"],"mappings":";;;;+BAEaA;;;eAAAA;;;AAAN,MAAMA,uBAAwC;IACjDC,MAAM;QACFC,MAAM;QACNC,MAAM;YACFC,aAAa;YACbC,UAAU;YACVC,aAAa;YACbC,KAAK;QACT;QACAC,UAAU;YACNC,eAAe;QACnB;IACJ;IACAC,QAAOC,OAAO;QACV,OAAO;YACHC,iBAAgBC,IAAS;gBACrB,IAAIA,KAAKC,IAAI,IAAID,KAAKC,IAAI,CAACC,IAAI,KAAK,SAAS;oBACzCJ,QAAQK,MAAM,CAAC;wBACXH;wBACAI,WAAW;wBACXC,MAAM;4BACFC,OAAON,KAAKM,KAAK,CAACJ,IAAI;wBAC1B;oBACJ;gBACJ;YACJ;QACJ;IACJ;AACJ"}
1
+ {"version":3,"sources":["../../../src/rules/react/no-qualified-type.ts"],"sourcesContent":["import { Rule } from 'eslint';\n\nexport const reactNoQualifiedType: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow using React types from default export',\n category: 'Best Practices',\n recommended: false,\n url: 'https://github.com/servicetitan/uikit.git',\n },\n messages: {\n importDefault: \"Import {{right}} from 'react' instead of using React.{{right}}\",\n },\n },\n create(context) {\n return {\n TSQualifiedName(node: any) {\n if (node.left?.name === 'React') {\n context.report({\n node,\n messageId: 'importDefault',\n data: {\n right: node.right.name,\n },\n });\n }\n },\n };\n },\n};\n"],"names":["reactNoQualifiedType","meta","type","docs","description","category","recommended","url","messages","importDefault","create","context","TSQualifiedName","node","left","name","report","messageId","data","right"],"mappings":";;;;+BAEaA;;;eAAAA;;;AAAN,MAAMA,uBAAwC;IACjDC,MAAM;QACFC,MAAM;QACNC,MAAM;YACFC,aAAa;YACbC,UAAU;YACVC,aAAa;YACbC,KAAK;QACT;QACAC,UAAU;YACNC,eAAe;QACnB;IACJ;IACAC,QAAOC,OAAO;QACV,OAAO;YACHC,iBAAgBC,IAAS;oBACjBA;gBAAJ,IAAIA,EAAAA,aAAAA,KAAKC,IAAI,cAATD,iCAAAA,WAAWE,IAAI,MAAK,SAAS;oBAC7BJ,QAAQK,MAAM,CAAC;wBACXH;wBACAI,WAAW;wBACXC,MAAM;4BACFC,OAAON,KAAKM,KAAK,CAACJ,IAAI;wBAC1B;oBACJ;gBACJ;YACJ;QACJ;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/eslint-plugin",
3
- "version": "32.2.0",
3
+ "version": "32.3.1",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,12 +15,12 @@
15
15
  "src"
16
16
  ],
17
17
  "dependencies": {
18
- "typescript-eslint": "~8.41.0"
18
+ "typescript-eslint": "~8.46.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/eslint": "~9.6.1",
22
- "@typescript-eslint/rule-tester": "~8.41.0",
23
- "eslint": "~9.37.0"
22
+ "@typescript-eslint/rule-tester": "~8.46.2",
23
+ "eslint": "~9.38.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "eslint": ">=9",
@@ -32,5 +32,5 @@
32
32
  "cli": {
33
33
  "webpack": false
34
34
  },
35
- "gitHead": "76a83fea33e04809b97c72720751878b1e3002d7"
35
+ "gitHead": "a2d0b80586285dbe4c657a4cf44b4c4fe69362c1"
36
36
  }
@@ -16,7 +16,7 @@ export const reactNoQualifiedType: Rule.RuleModule = {
16
16
  create(context) {
17
17
  return {
18
18
  TSQualifiedName(node: any) {
19
- if (node.left && node.left.name === 'React') {
19
+ if (node.left?.name === 'React') {
20
20
  context.report({
21
21
  node,
22
22
  messageId: 'importDefault',