@trackunit/eslint-plugin-trackunit 0.0.2
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/CHANGELOG.md +9 -0
- package/README.md +117 -0
- package/package.json +31 -0
- package/src/index.d.ts +8 -0
- package/src/index.js +20 -0
- package/src/index.js.map +1 -0
- package/src/lib/config/fragments/ignores.d.ts +2 -0
- package/src/lib/config/fragments/ignores.js +18 -0
- package/src/lib/config/fragments/ignores.js.map +1 -0
- package/src/lib/config/fragments/import-rules.d.ts +3 -0
- package/src/lib/config/fragments/import-rules.js +58 -0
- package/src/lib/config/fragments/import-rules.js.map +1 -0
- package/src/lib/config/fragments/jest-overrides.d.ts +2 -0
- package/src/lib/config/fragments/jest-overrides.js +30 -0
- package/src/lib/config/fragments/jest-overrides.js.map +1 -0
- package/src/lib/config/fragments/jsdoc-rules.d.ts +3 -0
- package/src/lib/config/fragments/jsdoc-rules.js +71 -0
- package/src/lib/config/fragments/jsdoc-rules.js.map +1 -0
- package/src/lib/config/fragments/module-boundaries.d.ts +2 -0
- package/src/lib/config/fragments/module-boundaries.js +92 -0
- package/src/lib/config/fragments/module-boundaries.js.map +1 -0
- package/src/lib/config/fragments/react-rules.d.ts +5 -0
- package/src/lib/config/fragments/react-rules.js +137 -0
- package/src/lib/config/fragments/react-rules.js.map +1 -0
- package/src/lib/config/fragments/restricted-imports.d.ts +2 -0
- package/src/lib/config/fragments/restricted-imports.js +58 -0
- package/src/lib/config/fragments/restricted-imports.js.map +1 -0
- package/src/lib/config/fragments/testing-library.d.ts +2 -0
- package/src/lib/config/fragments/testing-library.js +7 -0
- package/src/lib/config/fragments/testing-library.js.map +1 -0
- package/src/lib/config/fragments/typescript-rules.d.ts +2 -0
- package/src/lib/config/fragments/typescript-rules.js +97 -0
- package/src/lib/config/fragments/typescript-rules.js.map +1 -0
- package/src/lib/config/index.d.ts +863 -0
- package/src/lib/config/index.js +10 -0
- package/src/lib/config/index.js.map +1 -0
- package/src/lib/config/plugins.d.ts +90 -0
- package/src/lib/config/plugins.js +44 -0
- package/src/lib/config/plugins.js.map +1 -0
- package/src/lib/config/presets/base.d.ts +265 -0
- package/src/lib/config/presets/base.js +145 -0
- package/src/lib/config/presets/base.js.map +1 -0
- package/src/lib/config/presets/e2e.d.ts +10 -0
- package/src/lib/config/presets/e2e.js +19 -0
- package/src/lib/config/presets/e2e.js.map +1 -0
- package/src/lib/config/presets/public-api.d.ts +147 -0
- package/src/lib/config/presets/public-api.js +62 -0
- package/src/lib/config/presets/public-api.js.map +1 -0
- package/src/lib/config/presets/react.d.ts +598 -0
- package/src/lib/config/presets/react.js +97 -0
- package/src/lib/config/presets/react.js.map +1 -0
- package/src/lib/config/presets/server.d.ts +36 -0
- package/src/lib/config/presets/server.js +37 -0
- package/src/lib/config/presets/server.js.map +1 -0
- package/src/lib/config/utils.d.ts +6 -0
- package/src/lib/config/utils.js +28 -0
- package/src/lib/config/utils.js.map +1 -0
- package/src/lib/config-helpers/create-skip-when.d.ts +35 -0
- package/src/lib/config-helpers/create-skip-when.js +54 -0
- package/src/lib/config-helpers/create-skip-when.js.map +1 -0
- package/src/lib/rules/cva-merge-base-classes-as-array/cva-merge-base-classes-as-array.d.ts +16 -0
- package/src/lib/rules/cva-merge-base-classes-as-array/cva-merge-base-classes-as-array.js +83 -0
- package/src/lib/rules/cva-merge-base-classes-as-array/cva-merge-base-classes-as-array.js.map +1 -0
- package/src/lib/rules/design-guideline-button-icon-size-match/design-guideline-button-icon-size-match.d.ts +4 -0
- package/src/lib/rules/design-guideline-button-icon-size-match/design-guideline-button-icon-size-match.js +297 -0
- package/src/lib/rules/design-guideline-button-icon-size-match/design-guideline-button-icon-size-match.js.map +1 -0
- package/src/lib/rules/no-internal-barrel-files/examples.d.ts +80 -0
- package/src/lib/rules/no-internal-barrel-files/examples.js +84 -0
- package/src/lib/rules/no-internal-barrel-files/examples.js.map +1 -0
- package/src/lib/rules/no-internal-barrel-files/no-internal-barrel-files.d.ts +29 -0
- package/src/lib/rules/no-internal-barrel-files/no-internal-barrel-files.js +178 -0
- package/src/lib/rules/no-internal-barrel-files/no-internal-barrel-files.js.map +1 -0
- package/src/lib/rules/no-internal-graphql-when-tagged-with-gql-public/no-internal-graphql-when-tagged-with-gql-public.d.ts +5 -0
- package/src/lib/rules/no-internal-graphql-when-tagged-with-gql-public/no-internal-graphql-when-tagged-with-gql-public.js +67 -0
- package/src/lib/rules/no-internal-graphql-when-tagged-with-gql-public/no-internal-graphql-when-tagged-with-gql-public.js.map +1 -0
- package/src/lib/rules/no-jest-mock-trackunit-react-core-hooks/no-jest-mock-trackunit-react-core-hooks.d.ts +2 -0
- package/src/lib/rules/no-jest-mock-trackunit-react-core-hooks/no-jest-mock-trackunit-react-core-hooks.js +34 -0
- package/src/lib/rules/no-jest-mock-trackunit-react-core-hooks/no-jest-mock-trackunit-react-core-hooks.js.map +1 -0
- package/src/lib/rules/no-template-strings-in-classname-prop/no-template-strings-in-classname-prop.d.ts +16 -0
- package/src/lib/rules/no-template-strings-in-classname-prop/no-template-strings-in-classname-prop.js +55 -0
- package/src/lib/rules/no-template-strings-in-classname-prop/no-template-strings-in-classname-prop.js.map +1 -0
- package/src/lib/rules/no-typescript-assertion/examples.d.ts +1 -0
- package/src/lib/rules/no-typescript-assertion/examples.js +45 -0
- package/src/lib/rules/no-typescript-assertion/examples.js.map +1 -0
- package/src/lib/rules/no-typescript-assertion/no-typescript-assertion.d.ts +20 -0
- package/src/lib/rules/no-typescript-assertion/no-typescript-assertion.js +83 -0
- package/src/lib/rules/no-typescript-assertion/no-typescript-assertion.js.map +1 -0
- package/src/lib/rules/prefer-destructured-imports/prefer-destructured-imports.d.ts +73 -0
- package/src/lib/rules/prefer-destructured-imports/prefer-destructured-imports.js +333 -0
- package/src/lib/rules/prefer-destructured-imports/prefer-destructured-imports.js.map +1 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/name-suggestion-strategies.d.ts +56 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/name-suggestion-strategies.js +225 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/name-suggestion-strategies.js.map +1 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/prefer-event-specific-callback-naming.d.ts +49 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/prefer-event-specific-callback-naming.js +75 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/prefer-event-specific-callback-naming.js.map +1 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/strategies/string-based.d.ts +32 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/strategies/string-based.js +143 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/strategies/string-based.js.map +1 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/strategies/type-based.d.ts +27 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/strategies/type-based.js +196 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/strategies/type-based.js.map +1 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/utils.d.ts +76 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/utils.js +245 -0
- package/src/lib/rules/prefer-event-specific-callback-naming/utils.js.map +1 -0
- package/src/lib/rules/prefer-field-components/prefer-field-components.d.ts +4 -0
- package/src/lib/rules/prefer-field-components/prefer-field-components.js +289 -0
- package/src/lib/rules/prefer-field-components/prefer-field-components.js.map +1 -0
- package/src/lib/rules/prefer-mouse-event-handler-in-react-props/prefer-mouse-event-handler-in-react-props.d.ts +26 -0
- package/src/lib/rules/prefer-mouse-event-handler-in-react-props/prefer-mouse-event-handler-in-react-props.js +402 -0
- package/src/lib/rules/prefer-mouse-event-handler-in-react-props/prefer-mouse-event-handler-in-react-props.js.map +1 -0
- package/src/lib/rules/require-classname-alternatives/require-classname-alternatives.d.ts +13 -0
- package/src/lib/rules/require-classname-alternatives/require-classname-alternatives.js +271 -0
- package/src/lib/rules/require-classname-alternatives/require-classname-alternatives.js.map +1 -0
- package/src/lib/rules/require-list-item-virtualization-props/require-list-item-virtualization-props.d.ts +15 -0
- package/src/lib/rules/require-list-item-virtualization-props/require-list-item-virtualization-props.js +245 -0
- package/src/lib/rules/require-list-item-virtualization-props/require-list-item-virtualization-props.js.map +1 -0
- package/src/lib/rules/require-optional-prop-initialization/require-optional-prop-initialization.d.ts +17 -0
- package/src/lib/rules/require-optional-prop-initialization/require-optional-prop-initialization.js +133 -0
- package/src/lib/rules/require-optional-prop-initialization/require-optional-prop-initialization.js.map +1 -0
- package/src/lib/rules/require-optional-prop-initialization/suggestion-utils.d.ts +12 -0
- package/src/lib/rules/require-optional-prop-initialization/suggestion-utils.js +128 -0
- package/src/lib/rules/require-optional-prop-initialization/suggestion-utils.js.map +1 -0
- package/src/lib/rules-map.d.ts +66 -0
- package/src/lib/rules-map.js +34 -0
- package/src/lib/rules-map.js.map +1 -0
- package/src/lib/utils/ast-utils.d.ts +85 -0
- package/src/lib/utils/ast-utils.js +530 -0
- package/src/lib/utils/ast-utils.js.map +1 -0
- package/src/lib/utils/classname-utils.d.ts +150 -0
- package/src/lib/utils/classname-utils.js +492 -0
- package/src/lib/utils/classname-utils.js.map +1 -0
- package/src/lib/utils/file-utils.d.ts +14 -0
- package/src/lib/utils/file-utils.js +106 -0
- package/src/lib/utils/file-utils.js.map +1 -0
- package/src/lib/utils/import-utils.d.ts +85 -0
- package/src/lib/utils/import-utils.js +193 -0
- package/src/lib/utils/import-utils.js.map +1 -0
- package/src/lib/utils/nx-utils.d.ts +59 -0
- package/src/lib/utils/nx-utils.js +103 -0
- package/src/lib/utils/nx-utils.js.map +1 -0
- package/src/lib/utils/package-utils.d.ts +38 -0
- package/src/lib/utils/package-utils.js +74 -0
- package/src/lib/utils/package-utils.js.map +1 -0
- package/src/lib/utils/typescript-utils.d.ts +29 -0
- package/src/lib/utils/typescript-utils.js +213 -0
- package/src/lib/utils/typescript-utils.js.map +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configs = void 0;
|
|
4
|
+
const base_1 = require("./presets/base");
|
|
5
|
+
const react_1 = require("./presets/react");
|
|
6
|
+
exports.configs = {
|
|
7
|
+
base: base_1.base,
|
|
8
|
+
react: react_1.reactPreset,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared plugin instances for ESLint flat config.
|
|
3
|
+
*
|
|
4
|
+
* ESLint flat config requires that the same plugin name always maps to the same
|
|
5
|
+
* object reference. With TypeScript's __importStar() helper (from esModuleInterop),
|
|
6
|
+
* each file that does `import * as foo from "pkg"` gets its own wrapper object.
|
|
7
|
+
* By importing all plugins once here and re-exporting, all presets share the same
|
|
8
|
+
* object references.
|
|
9
|
+
*/
|
|
10
|
+
import * as nx from "@nx/eslint-plugin";
|
|
11
|
+
import * as typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
12
|
+
import * as tsParser from "@typescript-eslint/parser";
|
|
13
|
+
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
14
|
+
import * as importPlugin from "eslint-plugin-import";
|
|
15
|
+
import * as jest from "eslint-plugin-jest";
|
|
16
|
+
import * as jsdoc from "eslint-plugin-jsdoc";
|
|
17
|
+
import * as noNull from "eslint-plugin-no-null";
|
|
18
|
+
import * as react from "eslint-plugin-react";
|
|
19
|
+
import * as reactHooks from "eslint-plugin-react-hooks";
|
|
20
|
+
import * as storybook from "eslint-plugin-storybook";
|
|
21
|
+
import * as testingLibrary from "eslint-plugin-testing-library";
|
|
22
|
+
import * as globals from "globals";
|
|
23
|
+
import * as jsoncParser from "jsonc-eslint-parser";
|
|
24
|
+
export declare const localRulesPlugin: {
|
|
25
|
+
rules: {
|
|
26
|
+
"cva-merge-base-classes-as-array": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"stringNeedsArray" | "arrayNeedsSplit", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
"no-internal-barrel-files": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"noInternalBarrel", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
"no-typescript-assertion": {
|
|
33
|
+
meta: import("eslint").Rule.RuleMetaData;
|
|
34
|
+
create: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
35
|
+
};
|
|
36
|
+
"no-internal-graphql-when-tagged-with-gql-public": {
|
|
37
|
+
meta: import("eslint").Rule.RuleMetaData;
|
|
38
|
+
create: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
39
|
+
};
|
|
40
|
+
"design-guideline-button-icon-size-match": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectIconSize", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
"no-template-strings-in-classname-prop": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"templateStringInClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
"require-classname-alternatives": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"bannedClassAutoFix" | "bannedClassSuggest" | "suggestReplacement", [({
|
|
47
|
+
alternatives: Record<string, Array<string>>;
|
|
48
|
+
prefixes?: Array<string>;
|
|
49
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
52
|
+
"no-jest-mock-trackunit-react-core-hooks": import("eslint").Rule.RuleModule;
|
|
53
|
+
"prefer-destructured-imports": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"preferDestructured" | "preferDestructuredGlobal", [({
|
|
54
|
+
packages: Record<string, string>;
|
|
55
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
"prefer-mouse-event-handler-in-react-props": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"suggestMouseEventHandler" | "preferMouseEventHandler", [{
|
|
59
|
+
allowedNames?: ReadonlyArray<string>;
|
|
60
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
61
|
+
name: string;
|
|
62
|
+
};
|
|
63
|
+
"prefer-event-specific-callback-naming": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<import("../rules/prefer-event-specific-callback-naming/strategies/string-based").NameBasedMessageIds | import("../rules/prefer-event-specific-callback-naming/strategies/type-based").TypeBasedMessageIds, [{
|
|
64
|
+
allowedNames?: ReadonlyArray<string>;
|
|
65
|
+
events?: ReadonlyArray<string>;
|
|
66
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
67
|
+
name: string;
|
|
68
|
+
};
|
|
69
|
+
"require-optional-prop-initialization": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<import("../rules/require-optional-prop-initialization/suggestion-utils").MessageIds, [{
|
|
70
|
+
allowNullableObject?: boolean;
|
|
71
|
+
allowNullableBoolean?: boolean;
|
|
72
|
+
allowNullableString?: boolean;
|
|
73
|
+
allowNullableNumber?: boolean;
|
|
74
|
+
allowNullableEnum?: boolean;
|
|
75
|
+
allowNullableStringLiteralUnion?: boolean;
|
|
76
|
+
onlyRequireUsedProps?: boolean;
|
|
77
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
|
+
"prefer-field-components": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"preferFieldComponent", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
"require-list-item-virtualization-props": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"requireVirtualizationProps" | "spreadListItemProps" | "useSemanticListItem", [{
|
|
84
|
+
allowCustomComponents?: boolean;
|
|
85
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
86
|
+
name: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export { eslintConfigPrettier, globals, importPlugin, jest, jsdoc, jsoncParser, noNull, nx, react, reactHooks, storybook, testingLibrary, tsParser, typescriptEslint, };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Shared plugin instances for ESLint flat config.
|
|
7
|
+
*
|
|
8
|
+
* ESLint flat config requires that the same plugin name always maps to the same
|
|
9
|
+
* object reference. With TypeScript's __importStar() helper (from esModuleInterop),
|
|
10
|
+
* each file that does `import * as foo from "pkg"` gets its own wrapper object.
|
|
11
|
+
* By importing all plugins once here and re-exporting, all presets share the same
|
|
12
|
+
* object references.
|
|
13
|
+
*/
|
|
14
|
+
const nx = tslib_1.__importStar(require("@nx/eslint-plugin"));
|
|
15
|
+
exports.nx = nx;
|
|
16
|
+
const typescriptEslint = tslib_1.__importStar(require("@typescript-eslint/eslint-plugin"));
|
|
17
|
+
exports.typescriptEslint = typescriptEslint;
|
|
18
|
+
const tsParser = tslib_1.__importStar(require("@typescript-eslint/parser"));
|
|
19
|
+
exports.tsParser = tsParser;
|
|
20
|
+
const flat_1 = tslib_1.__importDefault(require("eslint-config-prettier/flat"));
|
|
21
|
+
exports.eslintConfigPrettier = flat_1.default;
|
|
22
|
+
const importPlugin = tslib_1.__importStar(require("eslint-plugin-import"));
|
|
23
|
+
exports.importPlugin = importPlugin;
|
|
24
|
+
const jest = tslib_1.__importStar(require("eslint-plugin-jest"));
|
|
25
|
+
exports.jest = jest;
|
|
26
|
+
const jsdoc = tslib_1.__importStar(require("eslint-plugin-jsdoc"));
|
|
27
|
+
exports.jsdoc = jsdoc;
|
|
28
|
+
const noNull = tslib_1.__importStar(require("eslint-plugin-no-null"));
|
|
29
|
+
exports.noNull = noNull;
|
|
30
|
+
const react = tslib_1.__importStar(require("eslint-plugin-react"));
|
|
31
|
+
exports.react = react;
|
|
32
|
+
const reactHooks = tslib_1.__importStar(require("eslint-plugin-react-hooks"));
|
|
33
|
+
exports.reactHooks = reactHooks;
|
|
34
|
+
const storybook = tslib_1.__importStar(require("eslint-plugin-storybook"));
|
|
35
|
+
exports.storybook = storybook;
|
|
36
|
+
const testingLibrary = tslib_1.__importStar(require("eslint-plugin-testing-library"));
|
|
37
|
+
exports.testingLibrary = testingLibrary;
|
|
38
|
+
const globals = tslib_1.__importStar(require("globals"));
|
|
39
|
+
exports.globals = globals;
|
|
40
|
+
const jsoncParser = tslib_1.__importStar(require("jsonc-eslint-parser"));
|
|
41
|
+
exports.jsoncParser = jsoncParser;
|
|
42
|
+
const rules_map_1 = require("../rules-map");
|
|
43
|
+
exports.localRulesPlugin = { rules: rules_map_1.rulesMap };
|
|
44
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { nx } from "../plugins";
|
|
2
|
+
export declare const base: (import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
3
|
+
plugins: {
|
|
4
|
+
"@nx": typeof nx;
|
|
5
|
+
"@trackunit": {
|
|
6
|
+
rules: {
|
|
7
|
+
"cva-merge-base-classes-as-array": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"stringNeedsArray" | "arrayNeedsSplit", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
"no-internal-barrel-files": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"noInternalBarrel", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
"no-typescript-assertion": {
|
|
14
|
+
meta: import("eslint").Rule.RuleMetaData;
|
|
15
|
+
create: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
16
|
+
};
|
|
17
|
+
"no-internal-graphql-when-tagged-with-gql-public": {
|
|
18
|
+
meta: import("eslint").Rule.RuleMetaData;
|
|
19
|
+
create: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
20
|
+
};
|
|
21
|
+
"design-guideline-button-icon-size-match": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectIconSize", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
"no-template-strings-in-classname-prop": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"templateStringInClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
"require-classname-alternatives": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"bannedClassAutoFix" | "bannedClassSuggest" | "suggestReplacement", [({
|
|
28
|
+
alternatives: Record<string, Array<string>>;
|
|
29
|
+
prefixes?: Array<string>;
|
|
30
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
"no-jest-mock-trackunit-react-core-hooks": import("eslint").Rule.RuleModule;
|
|
34
|
+
"prefer-destructured-imports": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"preferDestructured" | "preferDestructuredGlobal", [({
|
|
35
|
+
packages: Record<string, string>;
|
|
36
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
"prefer-mouse-event-handler-in-react-props": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"suggestMouseEventHandler" | "preferMouseEventHandler", [{
|
|
40
|
+
allowedNames?: ReadonlyArray<string>;
|
|
41
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
44
|
+
"prefer-event-specific-callback-naming": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<import("../../rules/prefer-event-specific-callback-naming/strategies/string-based").NameBasedMessageIds | import("../../rules/prefer-event-specific-callback-naming/strategies/type-based").TypeBasedMessageIds, [{
|
|
45
|
+
allowedNames?: ReadonlyArray<string>;
|
|
46
|
+
events?: ReadonlyArray<string>;
|
|
47
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
48
|
+
name: string;
|
|
49
|
+
};
|
|
50
|
+
"require-optional-prop-initialization": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<import("../../rules/require-optional-prop-initialization/suggestion-utils").MessageIds, [{
|
|
51
|
+
allowNullableObject?: boolean;
|
|
52
|
+
allowNullableBoolean?: boolean;
|
|
53
|
+
allowNullableString?: boolean;
|
|
54
|
+
allowNullableNumber?: boolean;
|
|
55
|
+
allowNullableEnum?: boolean;
|
|
56
|
+
allowNullableStringLiteralUnion?: boolean;
|
|
57
|
+
onlyRequireUsedProps?: boolean;
|
|
58
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
59
|
+
name: string;
|
|
60
|
+
};
|
|
61
|
+
"prefer-field-components": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"preferFieldComponent", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
62
|
+
name: string;
|
|
63
|
+
};
|
|
64
|
+
"require-list-item-virtualization-props": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"requireVirtualizationProps" | "spreadListItemProps" | "useSemanticListItem", [{
|
|
65
|
+
allowCustomComponents?: boolean;
|
|
66
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
67
|
+
name: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
"@typescript-eslint": {
|
|
72
|
+
configs: Record<string, ClassicConfig.Config>;
|
|
73
|
+
meta: FlatConfig.PluginMeta;
|
|
74
|
+
rules: typeof import("@typescript-eslint/eslint-plugin/rules");
|
|
75
|
+
};
|
|
76
|
+
"no-null": {
|
|
77
|
+
rules: Record<string, import("eslint").Rule.RuleModule>;
|
|
78
|
+
};
|
|
79
|
+
"import-x": import("eslint").ESLint.Plugin & {
|
|
80
|
+
meta: {
|
|
81
|
+
name: string;
|
|
82
|
+
version: string;
|
|
83
|
+
};
|
|
84
|
+
configs: {
|
|
85
|
+
"recommended": import("eslint").Linter.LegacyConfig;
|
|
86
|
+
"errors": import("eslint").Linter.LegacyConfig;
|
|
87
|
+
"warnings": import("eslint").Linter.LegacyConfig;
|
|
88
|
+
"stage-0": import("eslint").Linter.LegacyConfig;
|
|
89
|
+
"react": import("eslint").Linter.LegacyConfig;
|
|
90
|
+
"react-native": import("eslint").Linter.LegacyConfig;
|
|
91
|
+
"electron": import("eslint").Linter.LegacyConfig;
|
|
92
|
+
"typescript": import("eslint").Linter.LegacyConfig;
|
|
93
|
+
};
|
|
94
|
+
flatConfigs: {
|
|
95
|
+
"recommended": import("eslint").Linter.FlatConfig;
|
|
96
|
+
"errors": import("eslint").Linter.FlatConfig;
|
|
97
|
+
"warnings": import("eslint").Linter.FlatConfig;
|
|
98
|
+
"stage-0": import("eslint").Linter.FlatConfig;
|
|
99
|
+
"react": import("eslint").Linter.FlatConfig;
|
|
100
|
+
"react-native": import("eslint").Linter.FlatConfig;
|
|
101
|
+
"electron": import("eslint").Linter.FlatConfig;
|
|
102
|
+
"typescript": import("eslint").Linter.FlatConfig;
|
|
103
|
+
};
|
|
104
|
+
rules: {
|
|
105
|
+
[key: string]: import("eslint").Rule.RuleModule;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
jsdoc: {
|
|
109
|
+
rules: Record<string, import("eslint").Rule.RuleModule>;
|
|
110
|
+
configs: Record<string, import("eslint").Linter.Config>;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
rules: {
|
|
114
|
+
[x: string]: import("eslint").Linter.RuleEntry<any[]>;
|
|
115
|
+
"@trackunit/no-internal-graphql-when-tagged-with-gql-public"?: undefined;
|
|
116
|
+
"@typescript-eslint/no-require-imports"?: undefined;
|
|
117
|
+
"@nx/enforce-module-boundaries"?: undefined;
|
|
118
|
+
};
|
|
119
|
+
files?: undefined;
|
|
120
|
+
languageOptions?: undefined;
|
|
121
|
+
} | {
|
|
122
|
+
files: string[];
|
|
123
|
+
languageOptions: {
|
|
124
|
+
ecmaVersion: number;
|
|
125
|
+
sourceType: string;
|
|
126
|
+
parser: import("eslint").Linter.Parser;
|
|
127
|
+
parserOptions: {
|
|
128
|
+
project: string[];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
rules: {
|
|
132
|
+
"@trackunit/no-internal-barrel-files": string;
|
|
133
|
+
"@trackunit/no-typescript-assertion": string;
|
|
134
|
+
"constructor-super": string;
|
|
135
|
+
curly: string;
|
|
136
|
+
"default-case": string;
|
|
137
|
+
"id-match": string;
|
|
138
|
+
"no-caller": string;
|
|
139
|
+
"no-debugger": string;
|
|
140
|
+
"no-duplicate-imports": string;
|
|
141
|
+
"no-empty": string;
|
|
142
|
+
"no-eval": string;
|
|
143
|
+
"no-console": string;
|
|
144
|
+
"no-var": string;
|
|
145
|
+
"prefer-const": string;
|
|
146
|
+
"no-template-curly-in-string": string;
|
|
147
|
+
eqeqeq: string[];
|
|
148
|
+
"no-undef-init": string;
|
|
149
|
+
"no-invalid-this": string;
|
|
150
|
+
"no-null/no-null": string;
|
|
151
|
+
"no-underscore-dangle": string;
|
|
152
|
+
"no-redeclare": string;
|
|
153
|
+
"no-empty-function": string;
|
|
154
|
+
"no-unused-expressions": string;
|
|
155
|
+
"no-shadow": string;
|
|
156
|
+
"@trackunit/no-internal-graphql-when-tagged-with-gql-public"?: undefined;
|
|
157
|
+
"@typescript-eslint/no-require-imports"?: undefined;
|
|
158
|
+
"@nx/enforce-module-boundaries"?: undefined;
|
|
159
|
+
};
|
|
160
|
+
plugins?: undefined;
|
|
161
|
+
} | {
|
|
162
|
+
files: string[];
|
|
163
|
+
languageOptions: {
|
|
164
|
+
parser: import("eslint").Linter.Parser;
|
|
165
|
+
ecmaVersion?: undefined;
|
|
166
|
+
sourceType?: undefined;
|
|
167
|
+
parserOptions?: undefined;
|
|
168
|
+
};
|
|
169
|
+
plugins: {
|
|
170
|
+
"@trackunit": {
|
|
171
|
+
rules: {
|
|
172
|
+
"cva-merge-base-classes-as-array": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"stringNeedsArray" | "arrayNeedsSplit", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
173
|
+
name: string;
|
|
174
|
+
};
|
|
175
|
+
"no-internal-barrel-files": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"noInternalBarrel", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
176
|
+
name: string;
|
|
177
|
+
};
|
|
178
|
+
"no-typescript-assertion": {
|
|
179
|
+
meta: import("eslint").Rule.RuleMetaData;
|
|
180
|
+
create: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
181
|
+
};
|
|
182
|
+
"no-internal-graphql-when-tagged-with-gql-public": {
|
|
183
|
+
meta: import("eslint").Rule.RuleMetaData;
|
|
184
|
+
create: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
185
|
+
};
|
|
186
|
+
"design-guideline-button-icon-size-match": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectIconSize", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
187
|
+
name: string;
|
|
188
|
+
};
|
|
189
|
+
"no-template-strings-in-classname-prop": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"templateStringInClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
190
|
+
name: string;
|
|
191
|
+
};
|
|
192
|
+
"require-classname-alternatives": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"bannedClassAutoFix" | "bannedClassSuggest" | "suggestReplacement", [({
|
|
193
|
+
alternatives: Record<string, Array<string>>;
|
|
194
|
+
prefixes?: Array<string>;
|
|
195
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
196
|
+
name: string;
|
|
197
|
+
};
|
|
198
|
+
"no-jest-mock-trackunit-react-core-hooks": import("eslint").Rule.RuleModule;
|
|
199
|
+
"prefer-destructured-imports": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"preferDestructured" | "preferDestructuredGlobal", [({
|
|
200
|
+
packages: Record<string, string>;
|
|
201
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
202
|
+
name: string;
|
|
203
|
+
};
|
|
204
|
+
"prefer-mouse-event-handler-in-react-props": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"suggestMouseEventHandler" | "preferMouseEventHandler", [{
|
|
205
|
+
allowedNames?: ReadonlyArray<string>;
|
|
206
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
207
|
+
name: string;
|
|
208
|
+
};
|
|
209
|
+
"prefer-event-specific-callback-naming": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<import("../../rules/prefer-event-specific-callback-naming/strategies/string-based").NameBasedMessageIds | import("../../rules/prefer-event-specific-callback-naming/strategies/type-based").TypeBasedMessageIds, [{
|
|
210
|
+
allowedNames?: ReadonlyArray<string>;
|
|
211
|
+
events?: ReadonlyArray<string>;
|
|
212
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
213
|
+
name: string;
|
|
214
|
+
};
|
|
215
|
+
"require-optional-prop-initialization": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<import("../../rules/require-optional-prop-initialization/suggestion-utils").MessageIds, [{
|
|
216
|
+
allowNullableObject?: boolean;
|
|
217
|
+
allowNullableBoolean?: boolean;
|
|
218
|
+
allowNullableString?: boolean;
|
|
219
|
+
allowNullableNumber?: boolean;
|
|
220
|
+
allowNullableEnum?: boolean;
|
|
221
|
+
allowNullableStringLiteralUnion?: boolean;
|
|
222
|
+
onlyRequireUsedProps?: boolean;
|
|
223
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
224
|
+
name: string;
|
|
225
|
+
};
|
|
226
|
+
"prefer-field-components": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"preferFieldComponent", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
227
|
+
name: string;
|
|
228
|
+
};
|
|
229
|
+
"require-list-item-virtualization-props": import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"requireVirtualizationProps" | "spreadListItemProps" | "useSemanticListItem", [{
|
|
230
|
+
allowCustomComponents?: boolean;
|
|
231
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
232
|
+
name: string;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
"@nx"?: undefined;
|
|
237
|
+
"@typescript-eslint"?: undefined;
|
|
238
|
+
"no-null"?: undefined;
|
|
239
|
+
"import-x"?: undefined;
|
|
240
|
+
jsdoc?: undefined;
|
|
241
|
+
};
|
|
242
|
+
rules: {
|
|
243
|
+
"@trackunit/no-internal-graphql-when-tagged-with-gql-public": string;
|
|
244
|
+
"@typescript-eslint/no-require-imports"?: undefined;
|
|
245
|
+
"@nx/enforce-module-boundaries"?: undefined;
|
|
246
|
+
};
|
|
247
|
+
} | {
|
|
248
|
+
files: string[];
|
|
249
|
+
rules: {
|
|
250
|
+
"@typescript-eslint/no-require-imports": string;
|
|
251
|
+
"@trackunit/no-internal-graphql-when-tagged-with-gql-public"?: undefined;
|
|
252
|
+
"@nx/enforce-module-boundaries"?: undefined;
|
|
253
|
+
};
|
|
254
|
+
plugins?: undefined;
|
|
255
|
+
languageOptions?: undefined;
|
|
256
|
+
} | {
|
|
257
|
+
files: string[];
|
|
258
|
+
rules: {
|
|
259
|
+
"@nx/enforce-module-boundaries": string;
|
|
260
|
+
"@trackunit/no-internal-graphql-when-tagged-with-gql-public"?: undefined;
|
|
261
|
+
"@typescript-eslint/no-require-imports"?: undefined;
|
|
262
|
+
};
|
|
263
|
+
plugins?: undefined;
|
|
264
|
+
languageOptions?: undefined;
|
|
265
|
+
})[];
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.base = void 0;
|
|
4
|
+
const create_skip_when_1 = require("../../config-helpers/create-skip-when");
|
|
5
|
+
const ignores_1 = require("../fragments/ignores");
|
|
6
|
+
const import_rules_1 = require("../fragments/import-rules");
|
|
7
|
+
const jest_overrides_1 = require("../fragments/jest-overrides");
|
|
8
|
+
const jsdoc_rules_1 = require("../fragments/jsdoc-rules");
|
|
9
|
+
const module_boundaries_1 = require("../fragments/module-boundaries");
|
|
10
|
+
const restricted_imports_1 = require("../fragments/restricted-imports");
|
|
11
|
+
const typescript_rules_1 = require("../fragments/typescript-rules");
|
|
12
|
+
const plugins_1 = require("../plugins");
|
|
13
|
+
const utils_1 = require("../utils");
|
|
14
|
+
exports.base = [
|
|
15
|
+
ignores_1.globalIgnores,
|
|
16
|
+
{
|
|
17
|
+
plugins: {
|
|
18
|
+
"@nx": plugins_1.nx,
|
|
19
|
+
"@trackunit": plugins_1.localRulesPlugin,
|
|
20
|
+
"@typescript-eslint": plugins_1.typescriptEslint,
|
|
21
|
+
"no-null": plugins_1.noNull,
|
|
22
|
+
"import-x": plugins_1.importPlugin,
|
|
23
|
+
jsdoc: plugins_1.jsdoc,
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
...module_boundaries_1.moduleBoundaryRules,
|
|
27
|
+
...restricted_imports_1.restrictedImportRules,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
(0, create_skip_when_1.createSkipWhen)({
|
|
31
|
+
when: { tags: ["scope:tool"] },
|
|
32
|
+
plugins: {
|
|
33
|
+
"import-x": plugins_1.importPlugin,
|
|
34
|
+
},
|
|
35
|
+
rules: {
|
|
36
|
+
"import-x/no-extraneous-dependencies": [
|
|
37
|
+
"error",
|
|
38
|
+
{
|
|
39
|
+
packageDir: (0, utils_1.findMonorepoRoot)(),
|
|
40
|
+
devDependencies: [
|
|
41
|
+
"**/*.cy.{ts,tsx}",
|
|
42
|
+
"**/cypress/**",
|
|
43
|
+
"**/*.spec.{ts,tsx}",
|
|
44
|
+
"**/*.test.{ts,tsx}",
|
|
45
|
+
"**/jest.setup.*",
|
|
46
|
+
"**/test/**",
|
|
47
|
+
"**/tests/**",
|
|
48
|
+
"**/testing/**",
|
|
49
|
+
"**/test-setup/**",
|
|
50
|
+
"**/test-utils/**",
|
|
51
|
+
"**/__tests__/**",
|
|
52
|
+
"**/__mocks__/**",
|
|
53
|
+
"**/mocks.{ts,tsx}",
|
|
54
|
+
"**/core-contexts-test/**",
|
|
55
|
+
"**/*.stories.{ts,tsx}",
|
|
56
|
+
"**/storybookUtils.{ts,tsx}",
|
|
57
|
+
"**/.storybook/**",
|
|
58
|
+
"**/scripts/**",
|
|
59
|
+
"**/tools/**",
|
|
60
|
+
"**/*.config.{ts,js,cjs,mjs}",
|
|
61
|
+
"**/css/tailwind/**",
|
|
62
|
+
"**/css/tailwind-custom-properties-plugin/**",
|
|
63
|
+
"**/css/component-tokens/**",
|
|
64
|
+
],
|
|
65
|
+
optionalDependencies: false,
|
|
66
|
+
peerDependencies: true,
|
|
67
|
+
bundledDependencies: true,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
}),
|
|
72
|
+
{
|
|
73
|
+
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
|
|
74
|
+
languageOptions: {
|
|
75
|
+
ecmaVersion: 5,
|
|
76
|
+
sourceType: "script",
|
|
77
|
+
parser: plugins_1.tsParser,
|
|
78
|
+
parserOptions: {
|
|
79
|
+
project: ["./tsconfig.*?.json"],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
rules: {
|
|
83
|
+
"constructor-super": "error",
|
|
84
|
+
curly: "error",
|
|
85
|
+
"default-case": "error",
|
|
86
|
+
"id-match": "error",
|
|
87
|
+
"no-caller": "error",
|
|
88
|
+
"no-debugger": "error",
|
|
89
|
+
"no-duplicate-imports": "error",
|
|
90
|
+
"no-empty": "error",
|
|
91
|
+
"no-eval": "error",
|
|
92
|
+
"no-console": "error",
|
|
93
|
+
"no-var": "error",
|
|
94
|
+
"prefer-const": "error",
|
|
95
|
+
"no-template-curly-in-string": "error",
|
|
96
|
+
eqeqeq: ["error", "always"],
|
|
97
|
+
"no-undef-init": "error",
|
|
98
|
+
"no-invalid-this": "off",
|
|
99
|
+
"no-null/no-null": "off",
|
|
100
|
+
"no-underscore-dangle": "off",
|
|
101
|
+
"no-redeclare": "off",
|
|
102
|
+
"no-empty-function": "off",
|
|
103
|
+
"no-unused-expressions": "off",
|
|
104
|
+
"no-shadow": "off",
|
|
105
|
+
...jsdoc_rules_1.basicJsdocRules,
|
|
106
|
+
"@trackunit/no-internal-barrel-files": "error",
|
|
107
|
+
"@trackunit/no-typescript-assertion": "warn",
|
|
108
|
+
...import_rules_1.importRules,
|
|
109
|
+
...typescript_rules_1.typescriptRules,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
files: ["**/project.json"],
|
|
114
|
+
languageOptions: {
|
|
115
|
+
parser: plugins_1.jsoncParser,
|
|
116
|
+
},
|
|
117
|
+
plugins: {
|
|
118
|
+
"@trackunit": plugins_1.localRulesPlugin,
|
|
119
|
+
},
|
|
120
|
+
rules: {
|
|
121
|
+
"@trackunit/no-internal-graphql-when-tagged-with-gql-public": "error",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
jest_overrides_1.baseJestOverrides,
|
|
125
|
+
{
|
|
126
|
+
files: [
|
|
127
|
+
"**/eslint.config.cjs",
|
|
128
|
+
"**/iris-app-manifest.ts",
|
|
129
|
+
"**/rspack.config.ts",
|
|
130
|
+
"**/rspack.config.js",
|
|
131
|
+
"**/webpack.config.ts",
|
|
132
|
+
],
|
|
133
|
+
rules: {
|
|
134
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
plugins_1.eslintConfigPrettier,
|
|
138
|
+
{
|
|
139
|
+
files: ["**/*.stories.{ts,tsx,js,jsx}", "**/*.demo.{ts,tsx,js,jsx}"],
|
|
140
|
+
rules: {
|
|
141
|
+
"@nx/enforce-module-boundaries": "off",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../../../../libs/eslint/plugin-trackunit/src/lib/config/presets/base.ts"],"names":[],"mappings":"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","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"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.e2e = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cypress = tslib_1.__importStar(require("eslint-plugin-cypress/flat"));
|
|
6
|
+
exports.e2e = [
|
|
7
|
+
cypress.configs.recommended,
|
|
8
|
+
{
|
|
9
|
+
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
ecmaVersion: 5,
|
|
12
|
+
sourceType: "script",
|
|
13
|
+
parserOptions: {
|
|
14
|
+
project: ["./tsconfig.*?.json", "./tsconfig.json", "./cypress/tsconfig.json"],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
//# sourceMappingURL=e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|