@trackunit/eslint-plugin-trackunit 0.3.2 → 0.3.5

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 (59) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +8 -4
  3. package/src/lib/config/index.d.ts +1 -1
  4. package/src/lib/config/plugins.d.ts +1 -2
  5. package/src/lib/config/plugins.js +1 -3
  6. package/src/lib/config/presets/react.d.ts +1 -1
  7. package/src/lib/config/presets/react.js +0 -1
  8. package/src/lib/utils/file-utils.d.ts +6 -0
  9. package/src/lib/utils/file-utils.js +0 -67
  10. package/src/index.js.map +0 -1
  11. package/src/lib/config/fragments/ignores.js.map +0 -1
  12. package/src/lib/config/fragments/import-rules.js.map +0 -1
  13. package/src/lib/config/fragments/jest-overrides.js.map +0 -1
  14. package/src/lib/config/fragments/jsdoc-rules.js.map +0 -1
  15. package/src/lib/config/fragments/module-boundaries.js.map +0 -1
  16. package/src/lib/config/fragments/react-rules.js.map +0 -1
  17. package/src/lib/config/fragments/restricted-imports.js.map +0 -1
  18. package/src/lib/config/fragments/testing-library.js.map +0 -1
  19. package/src/lib/config/fragments/typescript-rules.js.map +0 -1
  20. package/src/lib/config/index.js.map +0 -1
  21. package/src/lib/config/plugins.js.map +0 -1
  22. package/src/lib/config/presets/base.js.map +0 -1
  23. package/src/lib/config/presets/e2e.js.map +0 -1
  24. package/src/lib/config/presets/public-api.d.ts +0 -147
  25. package/src/lib/config/presets/public-api.js +0 -62
  26. package/src/lib/config/presets/public-api.js.map +0 -1
  27. package/src/lib/config/presets/react.js.map +0 -1
  28. package/src/lib/config/presets/server.js.map +0 -1
  29. package/src/lib/config/utils.js.map +0 -1
  30. package/src/lib/config-helpers/create-skip-when.js.map +0 -1
  31. package/src/lib/rules/cva-merge-base-classes-as-array/cva-merge-base-classes-as-array.js.map +0 -1
  32. package/src/lib/rules/design-guideline-button-icon-size-match/design-guideline-button-icon-size-match.js.map +0 -1
  33. package/src/lib/rules/no-internal-barrel-files/examples.js.map +0 -1
  34. package/src/lib/rules/no-internal-barrel-files/no-internal-barrel-files.js.map +0 -1
  35. package/src/lib/rules/no-internal-graphql-when-tagged-with-gql-public/no-internal-graphql-when-tagged-with-gql-public.js.map +0 -1
  36. package/src/lib/rules/no-jest-mock-trackunit-react-core-hooks/no-jest-mock-trackunit-react-core-hooks.js.map +0 -1
  37. package/src/lib/rules/no-template-strings-in-classname-prop/no-template-strings-in-classname-prop.js.map +0 -1
  38. package/src/lib/rules/no-typescript-assertion/examples.js.map +0 -1
  39. package/src/lib/rules/no-typescript-assertion/no-typescript-assertion.js.map +0 -1
  40. package/src/lib/rules/prefer-destructured-imports/prefer-destructured-imports.js.map +0 -1
  41. package/src/lib/rules/prefer-event-specific-callback-naming/name-suggestion-strategies.js.map +0 -1
  42. package/src/lib/rules/prefer-event-specific-callback-naming/prefer-event-specific-callback-naming.js.map +0 -1
  43. package/src/lib/rules/prefer-event-specific-callback-naming/strategies/string-based.js.map +0 -1
  44. package/src/lib/rules/prefer-event-specific-callback-naming/strategies/type-based.js.map +0 -1
  45. package/src/lib/rules/prefer-event-specific-callback-naming/utils.js.map +0 -1
  46. package/src/lib/rules/prefer-field-components/prefer-field-components.js.map +0 -1
  47. package/src/lib/rules/prefer-mouse-event-handler-in-react-props/prefer-mouse-event-handler-in-react-props.js.map +0 -1
  48. package/src/lib/rules/require-classname-alternatives/require-classname-alternatives.js.map +0 -1
  49. package/src/lib/rules/require-list-item-virtualization-props/require-list-item-virtualization-props.js.map +0 -1
  50. package/src/lib/rules/require-optional-prop-initialization/require-optional-prop-initialization.js.map +0 -1
  51. package/src/lib/rules/require-optional-prop-initialization/suggestion-utils.js.map +0 -1
  52. package/src/lib/rules-map.js.map +0 -1
  53. package/src/lib/utils/ast-utils.js.map +0 -1
  54. package/src/lib/utils/classname-utils.js.map +0 -1
  55. package/src/lib/utils/file-utils.js.map +0 -1
  56. package/src/lib/utils/import-utils.js.map +0 -1
  57. package/src/lib/utils/nx-utils.js.map +0 -1
  58. package/src/lib/utils/package-utils.js.map +0 -1
  59. package/src/lib/utils/typescript-utils.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## 0.3.5 (2026-03-05)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated css-class-variance-utilities to 1.11.53
6
+ - Updated react-core-contexts-test to 1.12.37
7
+ - Updated react-form-components to 1.14.43
8
+ - Updated react-components to 1.17.39
9
+ - Updated shared-utils to 1.13.53
10
+
11
+ ## 0.3.4 (2026-03-04)
12
+
13
+ This was a version bump only for eslint-plugin-trackunit to align it with other projects, there were no code changes.
14
+
15
+ ## 0.3.3 (2026-03-04)
16
+
17
+ ### 🧱 Updated Dependencies
18
+
19
+ - Updated css-class-variance-utilities to 1.11.52
20
+ - Updated react-core-contexts-test to 1.12.36
21
+ - Updated react-form-components to 1.14.42
22
+ - Updated react-components to 1.17.38
23
+ - Updated shared-utils to 1.13.52
24
+
1
25
  ## 0.3.2 (2026-03-04)
2
26
 
3
27
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/eslint-plugin-trackunit",
3
- "version": "0.3.2",
3
+ "version": "0.3.5",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -10,7 +10,7 @@
10
10
  "eslint": "^9.33.0",
11
11
  "@nx/eslint-plugin": "22.4.4",
12
12
  "@typescript-eslint/eslint-plugin": "8.54.0",
13
- "@typescript-eslint/parser": "8.54.0",
13
+ "@typescript-eslint/parser": "^8.54.0",
14
14
  "@typescript-eslint/utils": "8.54.0",
15
15
  "eslint-config-prettier": "^10.1.8",
16
16
  "eslint-plugin-import": "2.32.0",
@@ -19,11 +19,15 @@
19
19
  "eslint-plugin-no-null": "^1.0.2",
20
20
  "eslint-plugin-react": "7.37.5",
21
21
  "eslint-plugin-react-hooks": "7.0.1",
22
- "eslint-plugin-storybook": "^10.2.4",
23
22
  "eslint-plugin-testing-library": "^7.6.6",
24
23
  "globals": "^15.13.0",
25
24
  "typescript": "5.9.3",
26
- "tslib": "^2.6.2"
25
+ "tslib": "^2.6.2",
26
+ "zod": "^3.23.8",
27
+ "jsonc-eslint-parser": "^2.4.0"
28
+ },
29
+ "peerDependencies": {
30
+ "@typescript-eslint/parser": "^8.54.0"
27
31
  },
28
32
  "types": "./src/index.d.ts",
29
33
  "main": "./src/index.js",
@@ -263,7 +263,7 @@ export declare const configs: {
263
263
  plugins?: undefined;
264
264
  languageOptions?: undefined;
265
265
  })[];
266
- react: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
266
+ react: ({
267
267
  plugins: {
268
268
  "@trackunit": {
269
269
  rules: {
@@ -17,7 +17,6 @@ import * as jsdoc from "eslint-plugin-jsdoc";
17
17
  import * as noNull from "eslint-plugin-no-null";
18
18
  import * as react from "eslint-plugin-react";
19
19
  import * as reactHooks from "eslint-plugin-react-hooks";
20
- import * as storybook from "eslint-plugin-storybook";
21
20
  import * as testingLibrary from "eslint-plugin-testing-library";
22
21
  import * as globals from "globals";
23
22
  import * as jsoncParser from "jsonc-eslint-parser";
@@ -87,4 +86,4 @@ export declare const localRulesPlugin: {
87
86
  };
88
87
  };
89
88
  };
90
- export { eslintConfigPrettier, globals, importPlugin, jest, jsdoc, jsoncParser, noNull, nx, react, reactHooks, storybook, testingLibrary, tsParser, typescriptEslint, };
89
+ export { eslintConfigPrettier, globals, importPlugin, jest, jsdoc, jsoncParser, noNull, nx, react, reactHooks, testingLibrary, tsParser, typescriptEslint, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.typescriptEslint = exports.tsParser = exports.testingLibrary = exports.storybook = exports.reactHooks = exports.react = exports.nx = exports.noNull = exports.jsoncParser = exports.jsdoc = exports.jest = exports.importPlugin = exports.globals = exports.eslintConfigPrettier = exports.localRulesPlugin = void 0;
3
+ exports.typescriptEslint = exports.tsParser = exports.testingLibrary = exports.reactHooks = exports.react = exports.nx = exports.noNull = exports.jsoncParser = exports.jsdoc = exports.jest = exports.importPlugin = exports.globals = exports.eslintConfigPrettier = exports.localRulesPlugin = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /**
6
6
  * Shared plugin instances for ESLint flat config.
@@ -31,8 +31,6 @@ const react = tslib_1.__importStar(require("eslint-plugin-react"));
31
31
  exports.react = react;
32
32
  const reactHooks = tslib_1.__importStar(require("eslint-plugin-react-hooks"));
33
33
  exports.reactHooks = reactHooks;
34
- const storybook = tslib_1.__importStar(require("eslint-plugin-storybook"));
35
- exports.storybook = storybook;
36
34
  const testingLibrary = tslib_1.__importStar(require("eslint-plugin-testing-library"));
37
35
  exports.testingLibrary = testingLibrary;
38
36
  const globals = tslib_1.__importStar(require("globals"));
@@ -1,5 +1,5 @@
1
1
  import { nx, react } from "../plugins";
2
- export declare const reactPreset: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
2
+ export declare const reactPreset: ({
3
3
  plugins: {
4
4
  "@trackunit": {
5
5
  rules: {
@@ -5,7 +5,6 @@ const react_rules_1 = require("../fragments/react-rules");
5
5
  const testing_library_1 = require("../fragments/testing-library");
6
6
  const plugins_1 = require("../plugins");
7
7
  exports.reactPreset = [
8
- ...(plugins_1.storybook.configs["flat/recommended"] ?? []),
9
8
  {
10
9
  plugins: {
11
10
  "@trackunit": plugins_1.localRulesPlugin,
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Utility functions for working with files in ESLint rules.
3
+ *
4
+ * ## Main Functions
5
+ * - `findNearestFile()` - Find the nearest file by walking up the directory tree
6
+ */
1
7
  /**
2
8
  * Find the nearest file with a given name by walking up the directory tree.
3
9
  *
@@ -8,75 +8,8 @@ const path = tslib_1.__importStar(require("path"));
8
8
  * Utility functions for working with files in ESLint rules.
9
9
  *
10
10
  * ## Main Functions
11
- * - `isTestFile()` - Check if a file is a test file
12
- * - `isStoryFile()` - Check if a file is a Storybook story file
13
- * - `matchesFilePattern()` - Check if a file matches a glob pattern
14
11
  * - `findNearestFile()` - Find the nearest file by walking up the directory tree
15
12
  */
16
- /**
17
- * Convert a glob pattern to a regular expression.
18
- * Supports common glob patterns used in ESLint configurations.
19
- *
20
- * @param pattern - Glob pattern (e.g., "**\/*.spec.ts", "**\/*.{ts,tsx}")
21
- * @returns Regular expression that matches the pattern
22
- * @example
23
- * globToRegex("**\/*.spec.ts") // Matches any .spec.ts file
24
- * globToRegex("**\/*.{ts,tsx}") // Matches any .ts or .tsx file
25
- */
26
- const globToRegex = (pattern) => {
27
- // Escape special regex characters except glob special chars
28
- let regexPattern = pattern
29
- .replace(/\./g, "\\.") // Escape dots
30
- .replace(/\*\*/g, "@@DOUBLESTAR@@") // Temporarily replace **
31
- .replace(/\*/g, "[^/]*") // Single * matches anything except /
32
- .replace(/@@DOUBLESTAR@@/g, ".*") // ** matches anything including /
33
- .replace(/\?/g, "."); // ? matches single character
34
- // Handle brace expansion: {ts,tsx} → (ts|tsx)
35
- regexPattern = regexPattern.replace(/\{([^}]+)\}/g, (_, group) => {
36
- return `(${group.replace(/,/g, "|")})`;
37
- });
38
- return new RegExp(`^${regexPattern}$`);
39
- };
40
- /**
41
- * Check if a file path matches a glob pattern.
42
- *
43
- * @param filePath - The file path to check
44
- * @param pattern - Glob pattern (e.g., "**\/*.spec.ts")
45
- * @returns True if the file matches the pattern
46
- * @example
47
- * matchesFilePattern("src/component.spec.ts", "**\/*.spec.ts") // → true
48
- * matchesFilePattern("src/component.ts", "**\/*.spec.ts") // → false
49
- */
50
- const matchesFilePattern = (filePath, pattern) => {
51
- const regex = globToRegex(pattern);
52
- return regex.test(filePath);
53
- };
54
- /**
55
- * Check if a file path is a test file based on naming conventions.
56
- *
57
- * @param filePath - The file path to check
58
- * @returns True if the file is a test file
59
- * @example
60
- * isTestFile("src/component.spec.ts") // → true
61
- * isTestFile("src/component.test.tsx") // → true
62
- * isTestFile("src/component.ts") // → false
63
- */
64
- const isTestFile = (filePath) => {
65
- return /\.(spec|test)\.(ts|tsx|js|jsx)$/.test(filePath);
66
- };
67
- /**
68
- * Check if a file path is a Storybook story file.
69
- *
70
- * @param filePath - The file path to check
71
- * @returns True if the file is a story file
72
- * @example
73
- * isStoryFile("src/component.stories.ts") // → true
74
- * isStoryFile("src/component.stories.tsx") // → true
75
- * isStoryFile("src/component.ts") // → false
76
- */
77
- const isStoryFile = (filePath) => {
78
- return /\.stories\.(ts|tsx|js|jsx)$/.test(filePath);
79
- };
80
13
  /**
81
14
  * Find the nearest file with a given name by walking up the directory tree.
82
15
  *
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/eslint/plugin-trackunit/src/index.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAE3C,kBAAe,oBAAQ,CAAC;AAExB,uCAAuC;AAA9B,iGAAA,OAAO,OAAA;AAChB,0EAAuE;AAA9D,kHAAA,cAAc,OAAA;AACvB,4CAAsD;AAA7C,yGAAA,gBAAgB,OAAA;AAGzB,kEAAsE;AAA7D,+GAAA,gBAAgB,OAAA;AACzB,gDAAgF;AAAvE,kGAAA,OAAO,OAAA;AAAE,gGAAA,KAAK,OAAA;AAAE,6FAAA,EAAE,OAAA;AAAE,qGAAA,UAAU,OAAA;AAAE,mGAAA,QAAQ,OAAA","sourcesContent":["import { rulesMap } from \"./lib/rules-map\";\n\nexport default rulesMap;\n\nexport { configs } from \"./lib/config\";\nexport { createSkipWhen } from \"./lib/config-helpers/create-skip-when\";\nexport { findMonorepoRoot } from \"./lib/config/utils\";\nexport type { MatchCriteria, ProjectMetadata } from \"./lib/utils/nx-utils\";\n\nexport { strictJsdocRules } from \"./lib/config/fragments/jsdoc-rules\";\nexport { globals, jsdoc, nx, reactHooks, tsParser } from \"./lib/config/plugins\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/ignores.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAkB;IAC1C,OAAO,EAAE;QACP,oBAAoB;QACpB,qBAAqB;QACrB,kBAAkB;QAClB,sBAAsB;QACtB,kBAAkB;QAClB,iBAAiB;QACjB,4BAA4B;QAC5B,uBAAuB;QACvB,cAAc;QACd,eAAe;KAChB;CACF,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\n\nexport const globalIgnores: Linter.Config = {\n ignores: [\n \"**/src/gql-api.tsx\",\n \"**/src/typings/**/*\",\n \"**/testUtils.tsx\",\n \"**/webpack.config.js\",\n \"**/jest.config.*\",\n \"**/jest.setup.*\",\n \"**/src/**/generated/**/*.*\",\n \"**/src/**/generated.*\",\n \"**/dist/**/*\",\n \"**/*.docs.mdx\",\n ],\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"import-rules.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/import-rules.ts"],"names":[],"mappings":";;;AACA,4EAAuE;AACvE,wCAA0C;AAE7B,QAAA,WAAW,GAAuB;IAC7C,mBAAmB,EAAE;QACnB,OAAO;QACP;YACE,cAAc,EAAE,IAAI;SACrB;KACF;IACD,gBAAgB,EAAE,KAAK;CACxB,CAAC;AAEK,MAAM,wCAAwC,GAAG,CAAC,OAAe,EAAiB,EAAE,CACzF,IAAA,iCAAc,EAAC;IACb,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE;IAC9B,OAAO,EAAE;QACP,UAAU,EAAE,sBAAY;KACzB;IACD,KAAK,EAAE;QACL,qCAAqC,EAAE;YACrC,OAAO;YACP;gBACE,UAAU,EAAE,OAAO;gBACnB,eAAe,EAAE;oBACf,kBAAkB;oBAClB,eAAe;oBACf,oBAAoB;oBACpB,oBAAoB;oBACpB,iBAAiB;oBACjB,YAAY;oBACZ,aAAa;oBACb,eAAe;oBACf,kBAAkB;oBAClB,kBAAkB;oBAClB,iBAAiB;oBACjB,iBAAiB;oBACjB,mBAAmB;oBACnB,0BAA0B;oBAC1B,uBAAuB;oBACvB,4BAA4B;oBAC5B,kBAAkB;oBAClB,eAAe;oBACf,aAAa;oBACb,6BAA6B;oBAC7B,oBAAoB;oBACpB,6CAA6C;oBAC7C,4BAA4B;iBAC7B;gBACD,oBAAoB,EAAE,KAAK;gBAC3B,gBAAgB,EAAE,IAAI;gBACtB,mBAAmB,EAAE,IAAI;aAC1B;SACF;KACF;CACF,CAAC,CAAC;AA1CQ,QAAA,wCAAwC,4CA0ChD","sourcesContent":["import type { Linter } from \"eslint\";\nimport { createSkipWhen } from \"../../config-helpers/create-skip-when\";\nimport { importPlugin } from \"../plugins\";\n\nexport const importRules: Linter.RulesRecord = {\n \"import-x/no-cycle\": [\n \"error\",\n {\n ignoreExternal: true,\n },\n ],\n \"import-x/first\": \"off\",\n};\n\nexport const createImportExtraneousDependenciesConfig = (rootDir: string): Linter.Config =>\n createSkipWhen({\n when: { tags: [\"scope:tool\"] },\n plugins: {\n \"import-x\": importPlugin,\n },\n rules: {\n \"import-x/no-extraneous-dependencies\": [\n \"error\",\n {\n packageDir: rootDir,\n devDependencies: [\n \"**/*.cy.{ts,tsx}\",\n \"**/cypress/**\",\n \"**/*.spec.{ts,tsx}\",\n \"**/*.test.{ts,tsx}\",\n \"**/jest.setup.*\",\n \"**/test/**\",\n \"**/tests/**\",\n \"**/testing/**\",\n \"**/test-setup/**\",\n \"**/test-utils/**\",\n \"**/__tests__/**\",\n \"**/__mocks__/**\",\n \"**/mocks.{ts,tsx}\",\n \"**/core-contexts-test/**\",\n \"**/*.stories.{ts,tsx}\",\n \"**/storybookUtils.{ts,tsx}\",\n \"**/.storybook/**\",\n \"**/scripts/**\",\n \"**/tools/**\",\n \"**/*.config.{ts,js,cjs,mjs}\",\n \"**/css/tailwind/**\",\n \"**/css/tailwind-custom-properties-plugin/**\",\n \"**/css/component-tokens/**\",\n ],\n optionalDependencies: false,\n peerDependencies: true,\n bundledDependencies: true,\n },\n ],\n },\n });\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"jest-overrides.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/jest-overrides.ts"],"names":[],"mappings":";;;AACA,wCAAkD;AAErC,QAAA,iBAAiB,GAAkB;IAC9C,KAAK,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;IACxC,eAAe,EAAE;QACf,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE;YACb,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAChC;KACF;IAED,OAAO,EAAE;QACP,IAAI,EAAJ,cAAI;QACJ,iBAAiB,EAAE,wBAAc;KAClC;IAED,KAAK,EAAE;QACL,GAAG,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK;QACjC,GAAG,cAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;QAC3B,oCAAoC,EAAE,KAAK;QAC3C,sCAAsC,EAAE,KAAK;QAC7C,0CAA0C,EAAE,KAAK;QACjD,oCAAoC,EAAE,KAAK;QAC3C,oDAAoD,EAAE,OAAO;QAC7D,YAAY,EAAE,KAAK;QACnB,+CAA+C,EAAE,KAAK;KACvD;CACF,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\nimport { jest, testingLibrary } from \"../plugins\";\n\nexport const baseJestOverrides: Linter.Config = {\n files: [\"**/*.spec.ts\", \"**/*.spec.tsx\"],\n languageOptions: {\n ecmaVersion: 5,\n sourceType: \"script\",\n parserOptions: {\n project: [\"./tsconfig.*?.json\"],\n },\n },\n\n plugins: {\n jest,\n \"testing-library\": testingLibrary,\n },\n\n rules: {\n ...jest.configs.recommended.rules,\n ...jest.configs.style.rules,\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@trackunit/no-typescript-assertion\": \"off\",\n \"@trackunit/no-jest-mock-trackunit-react-core-hooks\": \"error\",\n \"no-console\": \"off\",\n \"@typescript-eslint/strict-boolean-expressions\": \"off\",\n },\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsdoc-rules.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/jsdoc-rules.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAuB;IACjD,iBAAiB,EAAE;QACjB,OAAO;QACP,OAAO;QACP;YACE,UAAU,EAAE,CAAC;SACd;KACF;IACD,uBAAuB,EAAE,OAAO;IAChC,wBAAwB,EAAE,KAAK;IAC/B,yBAAyB,EAAE,KAAK;IAChC,4BAA4B,EAAE;QAC5B,OAAO;QACP;YACE,QAAQ,EAAE;gBACR;oBACE,OAAO,EAAE,sCAAsC;oBAC/C,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,qDAAqD;iBAC/D;aACF;SACF;KACF;CACF,CAAC;AAEW,QAAA,gBAAgB,GAAuB;IAClD,qBAAqB,EAAE;QACrB,OAAO;QACP;YACE,UAAU,EAAE,IAAI;YAEhB,OAAO,EAAE;gBACP,uBAAuB,EAAE,IAAI;gBAC7B,gBAAgB,EAAE,IAAI;gBACtB,mBAAmB,EAAE,IAAI;gBACzB,kBAAkB,EAAE,IAAI;gBACxB,gBAAgB,EAAE,IAAI;aACvB;SACF;KACF;IAED,0BAA0B,EAAE;QAC1B,OAAO;QACP;YACE,YAAY,EAAE,CAAC,KAAK,CAAC;SACtB;KACF;IAED,yBAAyB,EAAE,OAAO;IAClC,4BAA4B,EAAE,OAAO;IACrC,mBAAmB,EAAE,OAAO;IAC5B,iCAAiC,EAAE,OAAO;IAC1C,oBAAoB,EAAE,OAAO;IAC7B,4BAA4B,EAAE,OAAO;IACrC,uBAAuB,EAAE,OAAO;IAChC,mBAAmB,EAAE,OAAO;IAC5B,oBAAoB,EAAE,OAAO;IAC7B,uBAAuB,EAAE,OAAO;IAChC,kBAAkB,EAAE,OAAO;IAC3B,6BAA6B,EAAE,OAAO;IACtC,wBAAwB,EAAE,OAAO;IACjC,0BAA0B,EAAE,OAAO;IACnC,wBAAwB,EAAE,OAAO;IACjC,oCAAoC,EAAE,OAAO;IAC7C,6BAA6B,EAAE,OAAO;IACtC,6BAA6B,EAAE,OAAO;IACtC,6BAA6B,EAAE,OAAO;IACtC,mCAAmC,EAAE,OAAO;IAC5C,sBAAsB,EAAE,OAAO;IAC/B,4BAA4B,EAAE,OAAO;CACtC,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\n\nexport const basicJsdocRules: Linter.RulesRecord = {\n \"jsdoc/tag-lines\": [\n \"error\",\n \"never\",\n {\n startLines: 1,\n },\n ],\n \"jsdoc/check-alignment\": \"error\",\n \"prefer-arrow-functions\": \"off\",\n \"jsdoc/check-indentation\": \"off\",\n \"jsdoc/no-restricted-syntax\": [\n \"error\",\n {\n contexts: [\n {\n comment: \"JsdocBlock:has(JsdocTag[tag=/type/])\",\n context: \"any\",\n message: \"Projects should not use @type annotation in JSDocs.\",\n },\n ],\n },\n ],\n};\n\nexport const strictJsdocRules: Linter.RulesRecord = {\n \"jsdoc/require-jsdoc\": [\n \"error\",\n {\n publicOnly: true,\n\n require: {\n ArrowFunctionExpression: true,\n ClassDeclaration: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true,\n },\n },\n ],\n\n \"jsdoc/no-undefined-types\": [\n \"error\",\n {\n definedTypes: [\"JSX\"],\n },\n ],\n\n \"jsdoc/check-param-names\": \"error\",\n \"jsdoc/require-returns-type\": \"error\",\n \"jsdoc/valid-types\": \"error\",\n \"jsdoc/require-param-description\": \"error\",\n \"jsdoc/check-access\": \"error\",\n \"jsdoc/check-property-names\": \"error\",\n \"jsdoc/check-tag-names\": \"error\",\n \"jsdoc/check-types\": \"error\",\n \"jsdoc/check-values\": \"error\",\n \"jsdoc/check-alignment\": \"error\",\n \"jsdoc/empty-tags\": \"error\",\n \"jsdoc/implements-on-classes\": \"error\",\n \"jsdoc/multiline-blocks\": \"error\",\n \"jsdoc/no-multi-asterisks\": \"error\",\n \"jsdoc/require-property\": \"error\",\n \"jsdoc/require-property-description\": \"error\",\n \"jsdoc/require-property-name\": \"error\",\n \"jsdoc/require-property-type\": \"error\",\n \"jsdoc/require-returns-check\": \"error\",\n \"jsdoc/require-returns-description\": \"error\",\n \"jsdoc/require-yields\": \"error\",\n \"jsdoc/require-yields-check\": \"error\",\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-boundaries.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/module-boundaries.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAuB;IACrD,+BAA+B,EAAE;QAC/B,OAAO;QACP;YACE,KAAK,EAAE,EAAE;YAET,cAAc,EAAE;gBACd;oBACE,SAAS,EAAE,UAAU;oBACrB,wBAAwB,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,cAAc,CAAC;oBAC1E,qBAAqB,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;iBACpD;gBACD;oBACE,SAAS,EAAE,gBAAgB;oBAC3B,wBAAwB,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACxD,qBAAqB,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;iBACpD;gBACD;oBACE,SAAS,EAAE,YAAY;oBACvB,wBAAwB,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACxD,qBAAqB,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;iBACpD;gBACD;oBACE,SAAS,EAAE,cAAc;oBACzB,wBAAwB,EAAE,CAAC,cAAc,CAAC;oBAC1C,qBAAqB,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;iBAC7C;gBACD;oBACE,SAAS,EAAE,WAAW;oBACtB,wBAAwB,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;iBAC3D;gBACD;oBACE,SAAS,EAAE,cAAc;oBACzB,wBAAwB,EAAE,CAAC,cAAc,CAAC;iBAC3C;gBACD;oBACE,SAAS,EAAE,YAAY;oBACvB,wBAAwB,EAAE,CAAC,YAAY,CAAC;iBACzC;gBACD;oBACE,SAAS,EAAE,cAAc;oBACzB,wBAAwB,EAAE,CAAC,cAAc,CAAC;iBAC3C;gBACD;oBACE,SAAS,EAAE,iBAAiB;oBAC5B,wBAAwB,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;iBACnE;gBACD;oBACE,SAAS,EAAE,qBAAqB;oBAChC,wBAAwB,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;iBACvE;gBACD;oBACE,SAAS,EAAE,mBAAmB;oBAC9B,wBAAwB,EAAE,CAAC,mBAAmB,CAAC;iBAChD;gBACD;oBACE,SAAS,EAAE,4BAA4B;oBACvC,uBAAuB,EAAE,CAAC,YAAY,CAAC;iBACxC;gBACD;oBACE,SAAS,EAAE,cAAc;iBAC1B;gBACD;oBACE,SAAS,EAAE,YAAY;iBACxB;gBACD;oBACE,SAAS,EAAE,OAAO;iBACnB;gBACD;oBACE,SAAS,EAAE,OAAO;iBACnB;gBACD;oBACE,SAAS,EAAE,OAAO;iBACnB;gBACD;oBACE,SAAS,EAAE,OAAO;iBACnB;gBACD;oBACE,SAAS,EAAE,aAAa;oBACxB,wBAAwB,EAAE,CAAC,aAAa,CAAC;oBACzC,qBAAqB,EAAE,CAAC,WAAW,CAAC;oBACpC,uBAAuB,EAAE,CAAC,YAAY,CAAC;iBACxC;aACF;YAED,6BAA6B,EAAE,IAAI;YACnC,yBAAyB,EAAE,IAAI;SAChC;KACF;CACF,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\n\nexport const moduleBoundaryRules: Linter.RulesRecord = {\n \"@nx/enforce-module-boundaries\": [\n \"error\",\n {\n allow: [],\n\n depConstraints: [\n {\n sourceTag: \"type:app\",\n onlyDependOnLibsWithTags: [\"type:extension\", \"type:react\", \"type:vanilla\"],\n bannedExternalImports: [\"i18next\", \"react-i18next\"],\n },\n {\n sourceTag: \"type:extension\",\n onlyDependOnLibsWithTags: [\"type:react\", \"type:vanilla\"],\n bannedExternalImports: [\"i18next\", \"react-i18next\"],\n },\n {\n sourceTag: \"type:react\",\n onlyDependOnLibsWithTags: [\"type:react\", \"type:vanilla\"],\n bannedExternalImports: [\"i18next\", \"react-i18next\"],\n },\n {\n sourceTag: \"type:vanilla\",\n onlyDependOnLibsWithTags: [\"type:vanilla\"],\n bannedExternalImports: [\"i18next\", \"react*\"],\n },\n {\n sourceTag: \"scope:app\",\n onlyDependOnLibsWithTags: [\"scope:client\", \"scope:server\"],\n },\n {\n sourceTag: \"scope:client\",\n onlyDependOnLibsWithTags: [\"scope:client\"],\n },\n {\n sourceTag: \"scope:tool\",\n onlyDependOnLibsWithTags: [\"scope:tool\"],\n },\n {\n sourceTag: \"scope:server\",\n onlyDependOnLibsWithTags: [\"scope:server\"],\n },\n {\n sourceTag: \"visibility:host\",\n onlyDependOnLibsWithTags: [\"visibility:host\", \"visibility:shared\"],\n },\n {\n sourceTag: \"visibility:iris-app\",\n onlyDependOnLibsWithTags: [\"visibility:iris-app\", \"visibility:shared\"],\n },\n {\n sourceTag: \"visibility:shared\",\n onlyDependOnLibsWithTags: [\"visibility:shared\"],\n },\n {\n sourceTag: \"dependencies:no-deprecated\",\n notDependOnLibsWithTags: [\"deprecated\"],\n },\n {\n sourceTag: \"gql:internal\",\n },\n {\n sourceTag: \"gql:public\",\n },\n {\n sourceTag: \"tier1\",\n },\n {\n sourceTag: \"tier2\",\n },\n {\n sourceTag: \"tier3\",\n },\n {\n sourceTag: \"tier4\",\n },\n {\n sourceTag: \"publish:npm\",\n onlyDependOnLibsWithTags: [\"publish:npm\"],\n bannedExternalImports: [\"@sentry/*\"],\n notDependOnLibsWithTags: [\"deprecated\"],\n },\n ],\n\n enforceBuildableLibDependency: true,\n banTransitiveDependencies: true,\n },\n ],\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-rules.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/react-rules.ts"],"names":[],"mappings":"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","sourcesContent":["import type { Linter } from \"eslint\";\n\nexport const reactRules: Linter.RulesRecord = {\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react-hooks/exhaustive-deps\": \"error\",\n\n \"react-hooks/config\": \"error\",\n \"react-hooks/error-boundaries\": \"error\",\n \"react-hooks/component-hook-factories\": \"error\",\n \"react-hooks/gating\": \"error\",\n \"react-hooks/globals\": \"error\",\n \"react-hooks/set-state-in-render\": \"error\",\n \"react-hooks/use-memo\": \"error\",\n \"react/self-closing-comp\": \"error\",\n \"react-hooks/unsupported-syntax\": \"error\",\n \"react-hooks/static-components\": \"error\",\n \"react-hooks/purity\": \"error\",\n\n \"react-hooks/immutability\": \"warn\",\n \"react/no-unstable-nested-components\": \"warn\",\n \"react-hooks/refs\": \"warn\",\n \"react-hooks/set-state-in-effect\": \"warn\",\n \"react-hooks/preserve-manual-memoization\": \"warn\",\n \"react-hooks/incompatible-library\": \"warn\",\n\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n {\n children: \"never\",\n propElementValues: \"always\",\n props: \"never\",\n },\n ],\n\n \"react/jsx-key\": \"error\",\n \"react/jsx-no-leaked-render\": \"error\",\n \"react/jsx-uses-react\": \"error\",\n \"react/jsx-uses-vars\": \"error\",\n \"react/no-danger\": \"error\",\n \"react/no-unused-prop-types\": \"error\",\n \"react/jsx-sort-props\": \"error\",\n\n \"react/no-children-prop\": [\n \"error\",\n {\n allowFunctions: false,\n },\n ],\n};\n\nexport const reactCustomRules: Linter.RulesRecord = {\n \"@trackunit/no-template-strings-in-classname-prop\": \"error\",\n \"@trackunit/require-classname-alternatives\": [\n \"error\",\n {\n alternatives: {\n slate: [\"neutral\"],\n gray: [\"neutral\"],\n zinc: [\"neutral\"],\n stone: [\"neutral\"],\n teal: [\"cyan\"],\n purple: [\"violet\"],\n fuchsia: [\"pink\"],\n red: [\"danger\"],\n yellow: [\"warning\"],\n green: [\"success\"],\n emerald: [\"success\"],\n amber: [\"warning\", \"low\", \"idle\"],\n sky: [\"primary\", \"info\"],\n blue: [\"primary\", \"info\", \"working\", \"utilized\"],\n indigo: [\"primary\", \"violet\"],\n rose: [\"danger\", \"pink\"],\n },\n prefixes: [\n \"bg\",\n \"text\",\n \"border\",\n \"border-t\",\n \"border-r\",\n \"border-b\",\n \"border-l\",\n \"border-x\",\n \"border-y\",\n \"ring\",\n \"ring-offset\",\n \"outline\",\n \"divide\",\n \"shadow\",\n \"accent\",\n \"caret\",\n \"fill\",\n \"stroke\",\n \"decoration\",\n \"placeholder\",\n \"from\",\n \"via\",\n \"to\",\n ],\n },\n ],\n \"@trackunit/require-list-item-virtualization-props\": \"error\",\n \"@trackunit/cva-merge-base-classes-as-array\": \"error\",\n \"@trackunit/design-guideline-button-icon-size-match\": \"error\",\n \"@trackunit/prefer-destructured-imports\": [\n \"error\",\n {\n packages: {\n react: \"React\",\n },\n },\n ],\n \"@trackunit/require-optional-prop-initialization\": \"warn\",\n \"@trackunit/prefer-event-specific-callback-naming\": [\n \"error\",\n {\n events: [\"onClick\", \"onSubmit\", \"onDoubleClick\"],\n },\n ],\n \"@trackunit/prefer-mouse-event-handler-in-react-props\": [\n \"error\",\n {\n allowedNames: [\"onClickClose\"],\n },\n ],\n \"@trackunit/prefer-field-components\": \"error\",\n};\n\nexport const reactTestingLibraryOverrides: Linter.Config = {\n files: [\"**/*.spec.ts\", \"**/*.spec.tsx\"],\n rules: {\n \"jest/no-commented-out-tests\": \"error\",\n \"jest/expect-expect\": \"error\",\n },\n};\n\nexport const reactStoryOverrides: Linter.Config = {\n files: [\"**/*.stories.ts\", \"**/*.stories.tsx\"],\n rules: {\n \"jsdoc/require-jsdoc\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n },\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"restricted-imports.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/restricted-imports.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAuB;IACvD,uBAAuB,EAAE;QACvB,OAAO;QACP;YACE,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,sBAAsB;oBAC5B,OAAO,EAAE,2DAA2D;iBACrE;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,WAAW,EAAE,CAAC,gBAAgB,CAAC;oBAC/B,OAAO,EAAE,gFAAgF;iBAC1F;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,WAAW,EAAE,CAAC,OAAO,CAAC;oBACtB,OAAO,EAAE,uEAAuE;iBACjF;gBACD;oBACE,IAAI,EAAE,gBAAgB;oBACtB,WAAW,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;oBACzC,OAAO,EACL,mHAAmH;iBACtH;gBACD;oBACE,IAAI,EAAE,oBAAoB;oBAC1B,OAAO,EAAE,+EAA+E;iBACzF;gBACD;oBACE,IAAI,EAAE,2BAA2B;oBACjC,OAAO,EAAE,8DAA8D;iBACxE;gBACD;oBACE,IAAI,EAAE,6BAA6B;oBACnC,OAAO,EAAE,8DAA8D;iBACxE;gBACD;oBACE,IAAI,EAAE,0BAA0B;oBAChC,OAAO,EACL,0HAA0H;iBAC7H;aACF;YAED,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,CAAC,WAAW,CAAC;oBACpB,OAAO,EAAE,sFAAsF;iBAChG;gBACD;oBACE,KAAK,EAAE,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,sFAAsF;iBAChG;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\n\nexport const restrictedImportRules: Linter.RulesRecord = {\n \"no-restricted-imports\": [\n \"error\",\n {\n paths: [\n {\n name: \"react-dom/test-utils\",\n message: \"Please use 'act' from the @testing-library/react instead.\",\n },\n {\n name: \"react-i18next\",\n importNames: [\"useTranslation\"],\n message: \"Please import useTranslation from @trackunit/i18n-manager-translation instead.\",\n },\n {\n name: \"react-i18next\",\n importNames: [\"Trans\"],\n message: \"Please import Trans from @trackunit/i18n-manager-translation instead.\",\n },\n {\n name: \"@apollo/client\",\n importNames: [\"useQuery\", \"useLazyQuery\"],\n message:\n \"Please import the same from @trackunit/react-graphql-hooks instead, to ensure loading state is handled correctly.\",\n },\n {\n name: \"@nx/plugin/testing\",\n message: \"Please import it from @trackunit/nx-utils instead or expose it from that lib.\",\n },\n {\n name: \"@heroicons/react/20/solid\",\n message: \"Please use the Icon component from react-components instead.\",\n },\n {\n name: \"@heroicons/react/24/outline\",\n message: \"Please use the Icon component from react-components instead.\",\n },\n {\n name: \"class-variance-authority\",\n message:\n \"Import our wrappers from, @trackunit/css-class-variance-utilities or twMerge instead. [cva -> cvaMerge], [cx -> twMerge]\",\n },\n ],\n\n patterns: [\n {\n group: [\"date-fns*\"],\n message: \"Please use @trackunit/date-and-time-utils or @trackunit/date-and-time-hooks instead.\",\n },\n {\n group: [\"date-fns-tz*\"],\n message: \"Please use @trackunit/date-and-time-utils or @trackunit/date-and-time-hooks instead.\",\n },\n ],\n },\n ],\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing-library.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/testing-library.ts"],"names":[],"mappings":";;;AACA,wCAA4C;AAE5C,MAAM,WAAW,GAAG,wBAAc,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;AAEhD,QAAA,wBAAwB,GAAuB,MAAM,CAAC,WAAW,CAC5E,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAuC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAC3G,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\nimport { testingLibrary } from \"../plugins\";\n\nconst configRules = testingLibrary.configs.react.rules ?? {};\n\nexport const reactTestingLibraryRules: Linter.RulesRecord = Object.fromEntries(\n Object.entries(configRules).filter((entry): entry is [string, Linter.RuleEntry] => entry[1] !== undefined)\n);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-rules.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/fragments/typescript-rules.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAuB;IACjD,oCAAoC,EAAE,OAAO;IAC7C,wCAAwC,EAAE,OAAO;IACjD,uCAAuC,EAAE,OAAO;IAChD,6CAA6C,EAAE,OAAO;IACtD,gBAAgB,EAAE,KAAK;IACvB,mCAAmC,EAAE;QACnC,MAAM;QACN;YACE,IAAI,EAAE,KAAK;YACX,iBAAiB,EAAE,IAAI;YACvB,YAAY,EAAE,KAAK;YACnB,yBAAyB,EAAE,IAAI;YAC/B,8BAA8B,EAAE,IAAI;YACpC,iBAAiB,EAAE,IAAI;YACvB,kBAAkB,EAAE,IAAI;SACzB;KACF;IACD,+BAA+B,EAAE;QAC/B,OAAO;QACP;YACE,OAAO,EAAE,SAAS;SACnB;KACF;IACD,iCAAiC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;IACvE,8BAA8B,EAAE;QAC9B,OAAO;QACP;YACE,KAAK,EAAE,KAAK;SACb;KACF;IACD,+CAA+C,EAAE;QAC/C,MAAM;QACN;YACE,oBAAoB,EAAE,IAAI;YAC1B,mBAAmB,EAAE,IAAI;SAC1B;KACF;IACD,sCAAsC,EAAE;QACtC,OAAO;QACP;YACE,QAAQ,EAAE,WAAW;YACrB,MAAM,EAAE,CAAC,YAAY,CAAC;YAEtB,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,KAAK;aACb;SACF;QACD;YACE,QAAQ,EAAE,eAAe;YACzB,MAAM,EAAE,CAAC,YAAY,CAAC;YAEtB,MAAM,EAAE;gBACN,KAAK,EAAE,2BAA2B;gBAClC,KAAK,EAAE,IAAI;aACZ;SACF;KACF;IACD,0CAA0C,EAAE,MAAM;IAClD,sCAAsC,EAAE,MAAM;IAC9C,0CAA0C,EAAE,OAAO;IACnD,iCAAiC,EAAE,OAAO;IAC1C,mCAAmC,EAAE,MAAM;IAC3C,mCAAmC,EAAE,MAAM;IAC3C,oCAAoC,EAAE,MAAM;IAC5C,yCAAyC,EAAE,OAAO;IAClD,yCAAyC,EAAE,MAAM;IACjD,kDAAkD,EAAE;QAClD,OAAO;QACP;YACE,aAAa,EAAE,UAAU;YACzB,SAAS,EAAE;gBACT,SAAS,EAAE,UAAU;gBACrB,YAAY,EAAE,UAAU;gBACxB,mBAAmB,EAAE,UAAU;aAChC;SACF;KACF;IACD,kDAAkD,EAAE,OAAO;IAC3D,uCAAuC,EAAE,MAAM;IAC/C,wCAAwC,EAAE;QACxC,OAAO;QACP;YACE,KAAK,EAAE;gBACL,UAAU,EAAE;oBACV,OAAO,EAAE,6CAA6C;iBACvD;gBAED,EAAE,EAAE;oBACF,OAAO,EAAE,6CAA6C;iBACvD;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["import type { Linter } from \"eslint\";\n\nexport const typescriptRules: Linter.RulesRecord = {\n \"@typescript-eslint/no-explicit-any\": \"error\",\n \"@typescript-eslint/no-inferrable-types\": \"error\",\n \"@typescript-eslint/unified-signatures\": \"error\",\n \"@typescript-eslint/no-unnecessary-condition\": \"error\",\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": [\n \"warn\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n caughtErrors: \"all\",\n caughtErrorsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n },\n ],\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"generic\",\n },\n ],\n \"@typescript-eslint/no-redeclare\": [\"error\", { builtinGlobals: false }],\n \"@typescript-eslint/no-shadow\": [\n \"error\",\n {\n hoist: \"all\",\n },\n ],\n \"@typescript-eslint/strict-boolean-expressions\": [\n \"warn\",\n {\n allowNullableBoolean: true,\n allowNullableString: true,\n },\n ],\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: \"interface\",\n format: [\"PascalCase\"],\n\n custom: {\n regex: \"^I[A-Z]\",\n match: false,\n },\n },\n {\n selector: \"typeParameter\",\n format: [\"PascalCase\"],\n\n custom: {\n regex: \"^(T|Keys?)[A-Z][a-zA-Z]+$\",\n match: true,\n },\n },\n ],\n \"@typescript-eslint/no-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-empty-function\": \"warn\",\n \"@typescript-eslint/no-unused-expressions\": \"error\",\n \"@typescript-eslint/dot-notation\": \"error\",\n \"@typescript-eslint/await-thenable\": \"warn\",\n \"@typescript-eslint/ban-ts-comment\": \"warn\",\n \"@typescript-eslint/member-ordering\": \"warn\",\n \"@typescript-eslint/no-empty-object-type\": \"error\",\n \"@typescript-eslint/no-floating-promises\": \"warn\",\n \"@typescript-eslint/explicit-member-accessibility\": [\n \"error\",\n {\n accessibility: \"explicit\",\n overrides: {\n accessors: \"explicit\",\n constructors: \"explicit\",\n parameterProperties: \"explicit\",\n },\n },\n ],\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n \"@typescript-eslint/no-require-imports\": \"warn\",\n \"@typescript-eslint/no-restricted-types\": [\n \"error\",\n {\n types: {\n \"React.FC\": {\n message: \"Please use props interface or type instead.\",\n },\n\n FC: {\n message: \"Please use props interface or type instead.\",\n },\n },\n },\n ],\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/index.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,2CAA8C;AAEjC,QAAA,OAAO,GAAG;IACrB,IAAI,EAAJ,WAAI;IACJ,KAAK,EAAE,mBAAW;CACnB,CAAC","sourcesContent":["import { base } from \"./presets/base\";\nimport { reactPreset } from \"./presets/react\";\n\nexport const configs = {\n base,\n react: reactPreset,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/plugins.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;GAQG;AACH,8DAAwC;AAyBtC,gBAAE;AAxBJ,2FAAqE;AA8BnE,4CAAgB;AA7BlB,4EAAsD;AA4BpD,4BAAQ;AA3BV,+EAA+D;AAe7D,+BAfK,cAAoB,CAeL;AAdtB,2EAAqD;AAgBnD,oCAAY;AAfd,iEAA2C;AAgBzC,oBAAI;AAfN,mEAA6C;AAgB3C,sBAAK;AAfP,sEAAgD;AAiB9C,wBAAM;AAhBR,mEAA6C;AAkB3C,sBAAK;AAjBP,8EAAwD;AAkBtD,gCAAU;AAjBZ,2EAAqD;AAkBnD,8BAAS;AAjBX,sFAAgE;AAkB9D,wCAAc;AAjBhB,yDAAmC;AAOjC,0BAAO;AANT,yEAAmD;AAUjD,kCAAW;AATb,4CAAwC;AAE3B,QAAA,gBAAgB,GAAG,EAAE,KAAK,EAAE,oBAAQ,EAAE,CAAC","sourcesContent":["/**\n * Shared plugin instances for ESLint flat config.\n *\n * ESLint flat config requires that the same plugin name always maps to the same\n * object reference. With TypeScript's __importStar() helper (from esModuleInterop),\n * each file that does `import * as foo from \"pkg\"` gets its own wrapper object.\n * By importing all plugins once here and re-exporting, all presets share the same\n * object references.\n */\nimport * as nx from \"@nx/eslint-plugin\";\nimport * as typescriptEslint from \"@typescript-eslint/eslint-plugin\";\nimport * as tsParser from \"@typescript-eslint/parser\";\nimport eslintConfigPrettier from \"eslint-config-prettier/flat\";\nimport * as importPlugin from \"eslint-plugin-import\";\nimport * as jest from \"eslint-plugin-jest\";\nimport * as jsdoc from \"eslint-plugin-jsdoc\";\nimport * as noNull from \"eslint-plugin-no-null\";\nimport * as react from \"eslint-plugin-react\";\nimport * as reactHooks from \"eslint-plugin-react-hooks\";\nimport * as storybook from \"eslint-plugin-storybook\";\nimport * as testingLibrary from \"eslint-plugin-testing-library\";\nimport * as globals from \"globals\";\nimport * as jsoncParser from \"jsonc-eslint-parser\";\nimport { rulesMap } from \"../rules-map\";\n\nexport const localRulesPlugin = { rules: rulesMap };\nexport {\n eslintConfigPrettier,\n globals,\n importPlugin,\n jest,\n jsdoc,\n jsoncParser,\n noNull,\n nx,\n react,\n reactHooks,\n storybook,\n testingLibrary,\n tsParser,\n typescriptEslint,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/presets/base.ts"],"names":[],"mappings":";;;AAAA,4EAAuE;AAEvE,kDAAqD;AACrD,4DAAwD;AACxD,gEAAgE;AAChE,0DAA2D;AAC3D,sEAAqE;AACrE,wEAAwE;AACxE,oEAAgE;AAChE,wCAUoB;AACpB,oCAA4C;AAE/B,QAAA,IAAI,GAAG;IAClB,uBAAa;IACb;QACE,OAAO,EAAE;YACP,KAAK,EAAE,YAAE;YACT,YAAY,EAAE,0BAAgB;YAC9B,oBAAoB,EAAE,0BAAgB;YACtC,SAAS,EAAE,gBAAM;YACjB,UAAU,EAAE,sBAAY;YACxB,KAAK,EAAL,eAAK;SACN;QAED,KAAK,EAAE;YACL,GAAG,uCAAmB;YACtB,GAAG,0CAAqB;SACzB;KACF;IACD,IAAA,iCAAc,EAAC;QACb,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE;QAC9B,OAAO,EAAE;YACP,UAAU,EAAE,sBAAY;SACzB;QACD,KAAK,EAAE;YACL,qCAAqC,EAAE;gBACrC,OAAO;gBACP;oBACE,UAAU,EAAE,IAAA,wBAAgB,GAAE;oBAC9B,eAAe,EAAE;wBACf,kBAAkB;wBAClB,eAAe;wBACf,oBAAoB;wBACpB,oBAAoB;wBACpB,iBAAiB;wBACjB,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,kBAAkB;wBAClB,kBAAkB;wBAClB,iBAAiB;wBACjB,iBAAiB;wBACjB,mBAAmB;wBACnB,0BAA0B;wBAC1B,uBAAuB;wBACvB,4BAA4B;wBAC5B,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,6BAA6B;wBAC7B,oBAAoB;wBACpB,6CAA6C;wBAC7C,4BAA4B;qBAC7B;oBACD,oBAAoB,EAAE,KAAK;oBAC3B,gBAAgB,EAAE,IAAI;oBACtB,mBAAmB,EAAE,IAAI;iBAC1B;aACF;SACF;KACF,CAAC;IACF;QACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;QAErD,eAAe,EAAE;YACf,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,kBAAQ;YAChB,aAAa,EAAE;gBACb,OAAO,EAAE,CAAC,oBAAoB,CAAC;aAChC;SACF;QACD,KAAK,EAAE;YACL,mBAAmB,EAAE,OAAO;YAC5B,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,OAAO;YACvB,UAAU,EAAE,OAAO;YACnB,WAAW,EAAE,OAAO;YACpB,aAAa,EAAE,OAAO;YACtB,sBAAsB,EAAE,OAAO;YAC/B,UAAU,EAAE,OAAO;YACnB,SAAS,EAAE,OAAO;YAClB,YAAY,EAAE,OAAO;YACrB,QAAQ,EAAE,OAAO;YACjB,cAAc,EAAE,OAAO;YACvB,6BAA6B,EAAE,OAAO;YACtC,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;YAC3B,eAAe,EAAE,OAAO;YACxB,iBAAiB,EAAE,KAAK;YACxB,iBAAiB,EAAE,KAAK;YACxB,sBAAsB,EAAE,KAAK;YAC7B,cAAc,EAAE,KAAK;YACrB,mBAAmB,EAAE,KAAK;YAC1B,uBAAuB,EAAE,KAAK;YAC9B,WAAW,EAAE,KAAK;YAElB,GAAG,6BAAe;YAElB,qCAAqC,EAAE,OAAO;YAC9C,oCAAoC,EAAE,MAAM;YAE5C,GAAG,0BAAW;YAEd,GAAG,kCAAe;SACnB;KACF;IACD;QACE,KAAK,EAAE,CAAC,iBAAiB,CAAC;QAC1B,eAAe,EAAE;YACf,MAAM,EAAE,qBAAW;SACpB;QACD,OAAO,EAAE;YACP,YAAY,EAAE,0BAAgB;SAC/B;QACD,KAAK,EAAE;YACL,4DAA4D,EAAE,OAAO;SACtE;KACF;IACD,kCAAiB;IACjB;QACE,KAAK,EAAE;YACL,sBAAsB;YACtB,yBAAyB;YACzB,qBAAqB;YACrB,qBAAqB;YACrB,sBAAsB;SACvB;QACD,KAAK,EAAE;YACL,uCAAuC,EAAE,KAAK;SAC/C;KACF;IACD,8BAAoB;IACpB;QACE,KAAK,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;QACpE,KAAK,EAAE;YACL,+BAA+B,EAAE,KAAK;SACvC;KACF;CACF,CAAC","sourcesContent":["import { createSkipWhen } from \"../../config-helpers/create-skip-when\";\n\nimport { globalIgnores } from \"../fragments/ignores\";\nimport { importRules } from \"../fragments/import-rules\";\nimport { baseJestOverrides } from \"../fragments/jest-overrides\";\nimport { basicJsdocRules } from \"../fragments/jsdoc-rules\";\nimport { moduleBoundaryRules } from \"../fragments/module-boundaries\";\nimport { restrictedImportRules } from \"../fragments/restricted-imports\";\nimport { typescriptRules } from \"../fragments/typescript-rules\";\nimport {\n eslintConfigPrettier,\n importPlugin,\n jsdoc,\n jsoncParser,\n localRulesPlugin,\n noNull,\n nx,\n tsParser,\n typescriptEslint,\n} from \"../plugins\";\nimport { findMonorepoRoot } from \"../utils\";\n\nexport const base = [\n globalIgnores,\n {\n plugins: {\n \"@nx\": nx,\n \"@trackunit\": localRulesPlugin,\n \"@typescript-eslint\": typescriptEslint,\n \"no-null\": noNull,\n \"import-x\": importPlugin,\n jsdoc,\n },\n\n rules: {\n ...moduleBoundaryRules,\n ...restrictedImportRules,\n },\n },\n createSkipWhen({\n when: { tags: [\"scope:tool\"] },\n plugins: {\n \"import-x\": importPlugin,\n },\n rules: {\n \"import-x/no-extraneous-dependencies\": [\n \"error\",\n {\n packageDir: findMonorepoRoot(),\n devDependencies: [\n \"**/*.cy.{ts,tsx}\",\n \"**/cypress/**\",\n \"**/*.spec.{ts,tsx}\",\n \"**/*.test.{ts,tsx}\",\n \"**/jest.setup.*\",\n \"**/test/**\",\n \"**/tests/**\",\n \"**/testing/**\",\n \"**/test-setup/**\",\n \"**/test-utils/**\",\n \"**/__tests__/**\",\n \"**/__mocks__/**\",\n \"**/mocks.{ts,tsx}\",\n \"**/core-contexts-test/**\",\n \"**/*.stories.{ts,tsx}\",\n \"**/storybookUtils.{ts,tsx}\",\n \"**/.storybook/**\",\n \"**/scripts/**\",\n \"**/tools/**\",\n \"**/*.config.{ts,js,cjs,mjs}\",\n \"**/css/tailwind/**\",\n \"**/css/tailwind-custom-properties-plugin/**\",\n \"**/css/component-tokens/**\",\n ],\n optionalDependencies: false,\n peerDependencies: true,\n bundledDependencies: true,\n },\n ],\n },\n }),\n {\n files: [\"**/*.ts\", \"**/*.tsx\", \"**/*.js\", \"**/*.jsx\"],\n\n languageOptions: {\n ecmaVersion: 5,\n sourceType: \"script\",\n parser: tsParser,\n parserOptions: {\n project: [\"./tsconfig.*?.json\"],\n },\n },\n rules: {\n \"constructor-super\": \"error\",\n curly: \"error\",\n \"default-case\": \"error\",\n \"id-match\": \"error\",\n \"no-caller\": \"error\",\n \"no-debugger\": \"error\",\n \"no-duplicate-imports\": \"error\",\n \"no-empty\": \"error\",\n \"no-eval\": \"error\",\n \"no-console\": \"error\",\n \"no-var\": \"error\",\n \"prefer-const\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n eqeqeq: [\"error\", \"always\"],\n \"no-undef-init\": \"error\",\n \"no-invalid-this\": \"off\",\n \"no-null/no-null\": \"off\",\n \"no-underscore-dangle\": \"off\",\n \"no-redeclare\": \"off\",\n \"no-empty-function\": \"off\",\n \"no-unused-expressions\": \"off\",\n \"no-shadow\": \"off\",\n\n ...basicJsdocRules,\n\n \"@trackunit/no-internal-barrel-files\": \"error\",\n \"@trackunit/no-typescript-assertion\": \"warn\",\n\n ...importRules,\n\n ...typescriptRules,\n },\n },\n {\n files: [\"**/project.json\"],\n languageOptions: {\n parser: jsoncParser,\n },\n plugins: {\n \"@trackunit\": localRulesPlugin,\n },\n rules: {\n \"@trackunit/no-internal-graphql-when-tagged-with-gql-public\": \"error\",\n },\n },\n baseJestOverrides,\n {\n files: [\n \"**/eslint.config.cjs\",\n \"**/iris-app-manifest.ts\",\n \"**/rspack.config.ts\",\n \"**/rspack.config.js\",\n \"**/webpack.config.ts\",\n ],\n rules: {\n \"@typescript-eslint/no-require-imports\": \"off\",\n },\n },\n eslintConfigPrettier,\n {\n files: [\"**/*.stories.{ts,tsx,js,jsx}\", \"**/*.demo.{ts,tsx,js,jsx}\"],\n rules: {\n \"@nx/enforce-module-boundaries\": \"off\",\n },\n },\n];\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"e2e.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/presets/e2e.ts"],"names":[],"mappings":";;;;AAAA,4EAAsD;AAEzC,QAAA,GAAG,GAAG;IACjB,OAAO,CAAC,OAAO,CAAC,WAAW;IAC3B;QACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;QAErD,eAAe,EAAE;YACf,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,QAAQ;YAEpB,aAAa,EAAE;gBACb,OAAO,EAAE,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,CAAC;aAC9E;SACF;KACF;CACF,CAAC","sourcesContent":["import * as cypress from \"eslint-plugin-cypress/flat\";\n\nexport const e2e = [\n cypress.configs.recommended,\n {\n files: [\"**/*.ts\", \"**/*.tsx\", \"**/*.js\", \"**/*.jsx\"],\n\n languageOptions: {\n ecmaVersion: 5,\n sourceType: \"script\",\n\n parserOptions: {\n project: [\"./tsconfig.*?.json\", \"./tsconfig.json\", \"./cypress/tsconfig.json\"],\n },\n },\n },\n];\n"]}
@@ -1,147 +0,0 @@
1
- import { nx } from "../plugins";
2
- export declare const publicApi: ({
3
- plugins: {
4
- "react-hooks": {
5
- meta: {
6
- name: string;
7
- version: string;
8
- };
9
- rules: {
10
- "exhaustive-deps": {
11
- meta: {
12
- type: "suggestion";
13
- docs: {
14
- description: string;
15
- recommended: true;
16
- url: string;
17
- };
18
- fixable: "code";
19
- hasSuggestions: true;
20
- schema: {
21
- type: "object";
22
- additionalProperties: false;
23
- enableDangerousAutofixThisMayCauseInfiniteLoops: boolean;
24
- properties: {
25
- additionalHooks: {
26
- type: "string";
27
- };
28
- enableDangerousAutofixThisMayCauseInfiniteLoops: {
29
- type: "boolean";
30
- };
31
- experimental_autoDependenciesHooks: {
32
- type: "array";
33
- items: {
34
- type: "string";
35
- };
36
- };
37
- requireExplicitEffectDeps: {
38
- type: "boolean";
39
- };
40
- };
41
- }[];
42
- };
43
- create(context: import("eslint").Rule.RuleContext): {
44
- CallExpression: (node: estree.CallExpression) => void;
45
- };
46
- };
47
- "rules-of-hooks": {
48
- meta: {
49
- type: "problem";
50
- docs: {
51
- description: string;
52
- recommended: true;
53
- url: string;
54
- };
55
- schema: {
56
- type: "object";
57
- additionalProperties: false;
58
- properties: {
59
- additionalHooks: {
60
- type: "string";
61
- };
62
- };
63
- }[];
64
- };
65
- create(context: import("eslint").Rule.RuleContext): {
66
- "*"(node: any): void;
67
- "*:exit"(node: any): void;
68
- CallExpression(node: estree.CallExpression & import("eslint").Rule.NodeParentExtension): void;
69
- Identifier(node: estree.Identifier & import("eslint").Rule.NodeParentExtension): void;
70
- "CallExpression:exit"(node: estree.CallExpression & import("eslint").Rule.NodeParentExtension): void;
71
- FunctionDeclaration(node: estree.FunctionDeclaration & import("eslint").Rule.NodeParentExtension): void;
72
- ArrowFunctionExpression(node: estree.ArrowFunctionExpression & import("eslint").Rule.NodeParentExtension): void;
73
- };
74
- };
75
- };
76
- configs: {
77
- recommended: {
78
- plugins: string[];
79
- rules: import("eslint").Linter.RulesRecord;
80
- };
81
- "recommended-latest": {
82
- plugins: string[];
83
- rules: import("eslint").Linter.RulesRecord;
84
- };
85
- flat: {
86
- recommended: {
87
- plugins: {
88
- react: any;
89
- };
90
- rules: import("eslint").Linter.RulesRecord;
91
- };
92
- "recommended-latest": {
93
- plugins: {
94
- react: any;
95
- };
96
- rules: import("eslint").Linter.RulesRecord;
97
- };
98
- };
99
- };
100
- };
101
- "@nx": typeof nx;
102
- };
103
- languageOptions: {
104
- parser: import("eslint").Linter.Parser;
105
- };
106
- files?: undefined;
107
- rules?: undefined;
108
- } | {
109
- files: string[];
110
- rules: {
111
- "@typescript-eslint/explicit-module-boundary-types": string;
112
- "jsdoc/require-jsdoc"?: undefined;
113
- "no-console"?: undefined;
114
- "@typescript-eslint/no-empty-function"?: undefined;
115
- "@nx/dependency-checks"?: undefined;
116
- };
117
- plugins?: undefined;
118
- languageOptions?: undefined;
119
- } | {
120
- files: string[];
121
- rules: {
122
- "jsdoc/require-jsdoc": string;
123
- "no-console": string;
124
- "@typescript-eslint/no-empty-function": string;
125
- "@nx/dependency-checks"?: undefined;
126
- };
127
- plugins?: undefined;
128
- languageOptions?: undefined;
129
- } | {
130
- files: string[];
131
- languageOptions: {
132
- parser: import("eslint").Linter.Parser;
133
- };
134
- rules: {
135
- "@nx/dependency-checks": (string | {
136
- ignoredDependencies: string[];
137
- ignoredFiles: string[];
138
- checkMissingDependencies: boolean;
139
- checkObsoleteDependencies: boolean;
140
- checkVersionMismatches: boolean;
141
- })[];
142
- "jsdoc/require-jsdoc"?: undefined;
143
- "no-console"?: undefined;
144
- "@typescript-eslint/no-empty-function"?: undefined;
145
- };
146
- plugins?: undefined;
147
- })[];
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.publicApi = void 0;
4
- const jsdoc_rules_1 = require("../fragments/jsdoc-rules");
5
- const plugins_1 = require("../plugins");
6
- exports.publicApi = [
7
- {
8
- plugins: {
9
- "react-hooks": plugins_1.reactHooks,
10
- "@nx": plugins_1.nx,
11
- },
12
- languageOptions: {
13
- parser: plugins_1.tsParser,
14
- },
15
- },
16
- {
17
- files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
18
- rules: {
19
- ...jsdoc_rules_1.strictJsdocRules,
20
- "@typescript-eslint/explicit-module-boundary-types": "warn",
21
- },
22
- },
23
- {
24
- files: ["**/*.stories.ts", "**/*.stories.tsx"],
25
- rules: {
26
- "jsdoc/require-jsdoc": "off",
27
- "no-console": "off",
28
- "@typescript-eslint/no-empty-function": "off",
29
- },
30
- },
31
- {
32
- files: ["**/*.json"],
33
- languageOptions: {
34
- parser: plugins_1.jsoncParser,
35
- },
36
- rules: {
37
- "@nx/dependency-checks": [
38
- "error",
39
- {
40
- ignoredDependencies: [
41
- "@trackunit/react-test-setup",
42
- "@trackunit/iris-app-build-utilities",
43
- "@trackunit/react-core-contexts-test",
44
- "jest",
45
- "jest-fetch-mock",
46
- "jest-canvas-mock",
47
- "@googlemaps/jest-mocks",
48
- "jest-fail-on-console",
49
- "@testing-library/react",
50
- "@testing-library/jest-dom",
51
- "@storybook/react-webpack5",
52
- ],
53
- ignoredFiles: ["**/*.stories.tsx", "**/*.stories.ts", "**/storybook-utils/**", "**/storybookUtils.ts"],
54
- checkMissingDependencies: true,
55
- checkObsoleteDependencies: true,
56
- checkVersionMismatches: true,
57
- },
58
- ],
59
- },
60
- },
61
- ];
62
- //# sourceMappingURL=public-api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/presets/public-api.ts"],"names":[],"mappings":";;;AAAA,0DAA4D;AAC5D,wCAAmE;AAEtD,QAAA,SAAS,GAAG;IACvB;QACE,OAAO,EAAE;YACP,aAAa,EAAE,oBAAU;YACzB,KAAK,EAAE,YAAE;SACV;QACD,eAAe,EAAE;YACf,MAAM,EAAE,kBAAQ;SACjB;KACF;IACD;QACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;QACrD,KAAK,EAAE;YACL,GAAG,8BAAgB;YACnB,mDAAmD,EAAE,MAAM;SAC5D;KACF;IACD;QACE,KAAK,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;QAC9C,KAAK,EAAE;YACL,qBAAqB,EAAE,KAAK;YAC5B,YAAY,EAAE,KAAK;YACnB,sCAAsC,EAAE,KAAK;SAC9C;KACF;IACD;QACE,KAAK,EAAE,CAAC,WAAW,CAAC;QAEpB,eAAe,EAAE;YACf,MAAM,EAAE,qBAAW;SACpB;QAED,KAAK,EAAE;YACL,uBAAuB,EAAE;gBACvB,OAAO;gBACP;oBACE,mBAAmB,EAAE;wBACnB,6BAA6B;wBAC7B,qCAAqC;wBACrC,qCAAqC;wBACrC,MAAM;wBACN,iBAAiB;wBACjB,kBAAkB;wBAClB,wBAAwB;wBACxB,sBAAsB;wBACtB,wBAAwB;wBACxB,2BAA2B;wBAC3B,2BAA2B;qBAC5B;oBACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,sBAAsB,CAAC;oBACtG,wBAAwB,EAAE,IAAI;oBAC9B,yBAAyB,EAAE,IAAI;oBAC/B,sBAAsB,EAAE,IAAI;iBAC7B;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["import { strictJsdocRules } from \"../fragments/jsdoc-rules\";\nimport { jsoncParser, nx, reactHooks, tsParser } from \"../plugins\";\n\nexport const publicApi = [\n {\n plugins: {\n \"react-hooks\": reactHooks,\n \"@nx\": nx,\n },\n languageOptions: {\n parser: tsParser,\n },\n },\n {\n files: [\"**/*.ts\", \"**/*.tsx\", \"**/*.js\", \"**/*.jsx\"],\n rules: {\n ...strictJsdocRules,\n \"@typescript-eslint/explicit-module-boundary-types\": \"warn\",\n },\n },\n {\n files: [\"**/*.stories.ts\", \"**/*.stories.tsx\"],\n rules: {\n \"jsdoc/require-jsdoc\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n },\n },\n {\n files: [\"**/*.json\"],\n\n languageOptions: {\n parser: jsoncParser,\n },\n\n rules: {\n \"@nx/dependency-checks\": [\n \"error\",\n {\n ignoredDependencies: [\n \"@trackunit/react-test-setup\",\n \"@trackunit/iris-app-build-utilities\",\n \"@trackunit/react-core-contexts-test\",\n \"jest\",\n \"jest-fetch-mock\",\n \"jest-canvas-mock\",\n \"@googlemaps/jest-mocks\",\n \"jest-fail-on-console\",\n \"@testing-library/react\",\n \"@testing-library/jest-dom\",\n \"@storybook/react-webpack5\",\n ],\n ignoredFiles: [\"**/*.stories.tsx\", \"**/*.stories.ts\", \"**/storybook-utils/**\", \"**/storybookUtils.ts\"],\n checkMissingDependencies: true,\n checkObsoleteDependencies: true,\n checkVersionMismatches: true,\n },\n ],\n },\n },\n];\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/presets/react.ts"],"names":[],"mappings":";;;AAAA,0DAAwE;AACxE,kEAAwE;AACxE,wCAYoB;AAEP,QAAA,WAAW,GAAG;IACzB,GAAG,CAAC,mBAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IAChD;QACE,OAAO,EAAE;YACP,YAAY,EAAE,0BAAgB;YAC9B,oBAAoB,EAAE,0BAAgB;YACtC,KAAK,EAAL,eAAK;YACL,KAAK,EAAL,eAAK;YACL,aAAa,EAAE,oBAAU;YACzB,iBAAiB,EAAE,wBAAc;YACjC,KAAK,EAAE,YAAE;SACV;QAED,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,OAAO,EAAE,QAAQ;aAClB;SACF;QACD,eAAe,EAAE;YACf,OAAO,EAAE;gBACP,GAAG,iBAAO,CAAC,OAAO;gBAClB,GAAG,cAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO;gBACpC,GAAG,iBAAO,CAAC,IAAI;gBACf,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,UAAU;aACnB;YACD,MAAM,EAAE,kBAAQ;YAChB,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,UAAU;YACtB,aAAa,EAAE;gBACb,YAAY,EAAE;oBACZ,GAAG,EAAE,IAAI;iBACV;aACF;SACF;KACF;IACD;QACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;QACrD,KAAK,EAAE;YACL,GAAG,8BAAgB;YAEnB,yBAAyB,EAAE;gBACzB,OAAO;gBACP;oBACE,GAAG,EAAE,CAAC;iBACP;aACF;YAED,gBAAgB,EAAE,OAAO;YACzB,eAAe,EAAE,OAAO;YAExB,GAAG,wBAAU;YAEb,sBAAsB,EAAE;gBACtB,MAAM;gBACN;oBACE,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,8DAA8D;iBACxE;aACF;SACF;KACF;IACD;QACE,KAAK,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;QAC9C,KAAK,EAAE;YACL,qBAAqB,EAAE,KAAK;YAC5B,YAAY,EAAE,KAAK;YACnB,sCAAsC,EAAE,KAAK;SAC9C;KACF;IACD;QACE,KAAK,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;QAExC,OAAO,EAAE;YACP,IAAI,EAAJ,cAAI;YACJ,iBAAiB,EAAE,wBAAc;SAClC;QACD,eAAe,EAAE;YACf,OAAO,EAAE;gBACP,GAAG,iBAAO,CAAC,OAAO;gBAClB,GAAG,cAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO;gBACpC,GAAG,iBAAO,CAAC,IAAI;gBACf,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,UAAU;aACnB;YAED,MAAM,EAAE,kBAAQ;SACjB;QAED,KAAK,EAAE;YACL,GAAG,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK;YACjC,GAAG,cAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;YAC3B,GAAG,0CAAwB;YAC3B,6BAA6B,EAAE,OAAO;YACtC,oBAAoB,EAAE,OAAO;SAC9B;KACF;CACF,CAAC","sourcesContent":["import { reactCustomRules, reactRules } from \"../fragments/react-rules\";\nimport { reactTestingLibraryRules } from \"../fragments/testing-library\";\nimport {\n globals,\n jest,\n jsdoc,\n localRulesPlugin,\n nx,\n react,\n reactHooks,\n storybook,\n testingLibrary,\n tsParser,\n typescriptEslint,\n} from \"../plugins\";\n\nexport const reactPreset = [\n ...(storybook.configs[\"flat/recommended\"] ?? []),\n {\n plugins: {\n \"@trackunit\": localRulesPlugin,\n \"@typescript-eslint\": typescriptEslint,\n jsdoc,\n react,\n \"react-hooks\": reactHooks,\n \"testing-library\": testingLibrary,\n \"@nx\": nx,\n },\n\n settings: {\n react: {\n version: \"detect\",\n },\n },\n languageOptions: {\n globals: {\n ...globals.browser,\n ...jest.environments.globals.globals,\n ...globals.node,\n Text: \"writable\",\n screen: \"writable\",\n },\n parser: tsParser,\n ecmaVersion: 2022,\n sourceType: \"commonjs\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n },\n {\n files: [\"**/*.ts\", \"**/*.tsx\", \"**/*.js\", \"**/*.jsx\"],\n rules: {\n ...reactCustomRules,\n\n \"no-multiple-empty-lines\": [\n \"error\",\n {\n max: 1,\n },\n ],\n\n \"no-unreachable\": \"error\",\n \"prefer-spread\": \"error\",\n\n ...reactRules,\n\n \"no-restricted-syntax\": [\n \"warn\",\n {\n selector: \"TSEnumDeclaration\",\n message: \"Please use string literal union or objects instead of enums.\",\n },\n ],\n },\n },\n {\n files: [\"**/*.stories.ts\", \"**/*.stories.tsx\"],\n rules: {\n \"jsdoc/require-jsdoc\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n },\n },\n {\n files: [\"**/*.spec.ts\", \"**/*.spec.tsx\"],\n\n plugins: {\n jest,\n \"testing-library\": testingLibrary,\n },\n languageOptions: {\n globals: {\n ...globals.browser,\n ...jest.environments.globals.globals,\n ...globals.node,\n Text: \"writable\",\n screen: \"writable\",\n },\n\n parser: tsParser,\n },\n\n rules: {\n ...jest.configs.recommended.rules,\n ...jest.configs.style.rules,\n ...reactTestingLibraryRules,\n \"jest/no-commented-out-tests\": \"error\",\n \"jest/expect-expect\": \"error\",\n },\n },\n];\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/presets/server.ts"],"names":[],"mappings":";;;;AAAA,2CAAkD;AAClD,gFAA0D;AAE1D,wCAAsD;AAEzC,QAAA,MAAM,GAAG;IACpB;QACE,eAAe,EAAE;YACf,OAAO,EAAE;gBACP,GAAG,iBAAO,CAAC,OAAO;aACnB;YAED,MAAM,EAAE,kBAAQ;SACjB;KACF;IACD;QACE,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;YACP,KAAK,EAAL,eAAK;YACL,cAAc,EAAE,IAAA,yBAAgB,EAAC,WAAW,CAAC;SAC9C;QACD,eAAe,EAAE;YACf,aAAa,EAAE;gBACb,OAAO,EAAE,CAAC,oBAAoB,CAAC;aAChC;SACF;QAED,KAAK,EAAE;YACL,GAAG,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK;YACxC,qCAAqC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC;YACvD,2CAA2C,EAAE,KAAK;YAClD,wCAAwC,EAAE,OAAO;YACjD,0CAA0C,EAAE,KAAK;SAClD;KACF;CACF,CAAC","sourcesContent":["import { fixupPluginRules } from \"@eslint/compat\";\nimport * as typeGraphql from \"eslint-plugin-type-graphql\";\n\nimport { globals, jsdoc, tsParser } from \"../plugins\";\n\nexport const server = [\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n\n parser: tsParser,\n },\n },\n {\n files: [\"**/*.ts\", \"**/*.js\"],\n plugins: {\n jsdoc,\n \"type-graphql\": fixupPluginRules(typeGraphql),\n },\n languageOptions: {\n parserOptions: {\n project: [\"./tsconfig.*?.json\"],\n },\n },\n\n rules: {\n ...typeGraphql.configs.recommended.rules,\n \"type-graphql/missing-decorator-type\": [\"error\", \"all\"],\n \"type-graphql/invalid-nullable-output-type\": \"off\",\n \"type-graphql/wrong-decorator-signature\": \"error\",\n \"type-graphql/invalid-nullable-input-type\": \"off\",\n },\n },\n];\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/utils.ts"],"names":[],"mappings":";;AAUA,4CAcC;;AAxBD,+CAAyB;AACzB,mDAA6B;AAE7B,IAAI,UAA8B,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,gBAAgB;IAC9B,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,GAAG,GAAG,SAAS,CAAC;IACpB,OAAO,GAAG,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;YAC7C,UAAU,GAAG,GAAG,CAAC;YACjB,OAAO,GAAG,CAAC;QACb,CAAC;QACD,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC3B,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import * as fs from \"fs\";\nimport * as path from \"path\";\n\nlet cachedRoot: string | undefined;\n\n/**\n * Finds the monorepo root by walking up from the config package directory\n * until a directory containing nx.json is found.\n * Falls back to process.cwd() if no nx.json is found.\n */\nexport function findMonorepoRoot(): string {\n if (cachedRoot !== undefined) {\n return cachedRoot;\n }\n let dir = __dirname;\n while (dir !== path.dirname(dir)) {\n if (fs.existsSync(path.join(dir, \"nx.json\"))) {\n cachedRoot = dir;\n return dir;\n }\n dir = path.dirname(dir);\n }\n cachedRoot = process.cwd();\n return cachedRoot;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-skip-when.js","sourceRoot":"","sources":["../../../../../../../libs/eslint/plugin-trackunit/src/lib/config-helpers/create-skip-when.ts"],"names":[],"mappings":";;;AAqBA,gDAAmG;AAUnG,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,OAA8B,EAAqB,EAAE;IAClF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAEzC,8CAA8C;IAC9C,MAAM,UAAU,GAAG,aAAa,eAAe,EAAE,EAAE,CAAC;IAEpD,4CAA4C;IAC5C,MAAM,YAAY,GAAoC,EAAE,CAAC;IAEzD,KAAK,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnE,KAAK,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACpE,MAAM,YAAY,GAAG,GAAG,kBAAkB,IAAI,QAAQ,EAAE,CAAC;YAEzD,sCAAsC;YACtC,YAAY,CAAC,YAAY,CAAC,GAAG;gBAC3B,IAAI,EAAE,YAAY,CAAC,IAAI;gBACvB,MAAM,CAAC,OAAyB;oBAC9B,gEAAgE;oBAChE,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;oBAC3D,MAAM,QAAQ,GAAG,IAAA,6BAAkB,EAAC,QAAQ,CAAC,CAAC;oBAE9C,6CAA6C;oBAC7C,IAAI,QAAQ,IAAI,IAAA,iCAAsB,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;wBACvD,0CAA0C;wBAC1C,OAAO,EAAE,CAAC;oBACZ,CAAC;oBAED,2CAA2C;oBAC3C,OAAO,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACtC,CAAC;aACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,yBAAyB;IACzB,MAAM,WAAW,GAAuB,EAAE,CAAC;IAE3C,KAAK,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3D,4BAA4B;QAC5B,WAAW,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;QAE9B,6BAA6B;QAC7B,WAAW,CAAC,GAAG,UAAU,IAAI,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC;IACxD,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP,CAAC,UAAU,CAAC,EAAE;gBACZ,KAAK,EAAE,YAAY;aACpB;SACF;QACD,KAAK,EAAE,WAAW;KACnB,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,cAAc,kBAqDzB","sourcesContent":["/**\n * Helper to create ESLint config that wraps rules with skip-when-lib-has-tag-tool logic.\n *\n * This provides a cleaner API than manually using the skip-when-lib-has-tag-tool/ prefix.\n *\n * @example\n * createSkipWhen({\n * when: { tags: ['scope:tool'] },\n * plugins: {\n * 'import-x': importXPlugin,\n * },\n * rules: {\n * 'import-x/no-extraneous-dependencies': [\"error\", { ... }],\n * }\n * })\n *\n * Returns a config object with:\n * - A unique plugin containing the wrapped rules for this specific config\n * - Rules configured to use the wrapped versions\n */\nimport type { Linter, Rule } from \"eslint\";\nimport { getProjectMetadata, projectMatchesCriteria, type MatchCriteria } from \"../utils/nx-utils\";\n\ntype PluginMap = Record<string, { rules: Record<string, Rule.RuleModule> }>;\n\ntype CreateSkipWhenOptions = {\n when: MatchCriteria;\n plugins: PluginMap;\n rules: Linter.RulesRecord;\n};\n\nlet skipWhenCounter = 0;\n\n/**\n * Creates an ESLint config that wraps rules to skip enforcement based on NX project criteria.\n */\nexport const createSkipWhen = (options: CreateSkipWhenOptions): Linter.FlatConfig => {\n const { when, plugins, rules } = options;\n\n // Create a unique plugin name for this config\n const pluginName = `skip-when-${skipWhenCounter++}`;\n\n // Build wrapped rules from provided plugins\n const wrappedRules: Record<string, Rule.RuleModule> = {};\n\n for (const [originalPluginName, plugin] of Object.entries(plugins)) {\n for (const [ruleName, originalRule] of Object.entries(plugin.rules)) {\n const fullRuleName = `${originalPluginName}/${ruleName}`;\n\n // Create wrapped version of this rule\n wrappedRules[fullRuleName] = {\n meta: originalRule.meta,\n create(context: Rule.RuleContext) {\n // Check if this file belongs to a project matching the criteria\n const filename = context.filename || context.getFilename();\n const metadata = getProjectMetadata(filename);\n\n // Check if project matches the skip criteria\n if (metadata && projectMatchesCriteria(metadata, when)) {\n // Skip enforcement - return empty visitor\n return {};\n }\n\n // Otherwise, delegate to the original rule\n return originalRule.create(context);\n },\n };\n }\n }\n\n // Build the rules config\n const rulesConfig: Linter.RulesRecord = {};\n\n for (const [ruleName, ruleConfig] of Object.entries(rules)) {\n // Disable the original rule\n rulesConfig[ruleName] = \"off\";\n\n // Enable our wrapped version\n rulesConfig[`${pluginName}/${ruleName}`] = ruleConfig;\n }\n\n return {\n plugins: {\n [pluginName]: {\n rules: wrappedRules,\n },\n },\n rules: rulesConfig,\n };\n};\n"]}