@elliemae/pui-cli 9.0.0-alpha.2 → 9.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/lint-config/eslint/flat/common.mjs +6 -5
- package/dist/cjs/lint-config/eslint/flat/index.mjs +1 -0
- package/dist/cjs/lint-config/eslint/flat/presets.mjs +16 -0
- package/dist/cjs/lint-config/eslint/flat/rules.mjs +18 -17
- package/dist/esm/lint-config/eslint/flat/common.mjs +6 -5
- package/dist/esm/lint-config/eslint/flat/index.mjs +1 -0
- package/dist/esm/lint-config/eslint/flat/presets.mjs +16 -0
- package/dist/esm/lint-config/eslint/flat/rules.mjs +18 -17
- package/dist/types/lib/lint-config/eslint/flat/index.d.mts +1 -1
- package/dist/types/lib/lint-config/eslint/flat/presets.d.mts +6 -0
- package/dist/types/lib/lint-config/eslint/flat/rules.d.mts +19 -12
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/lib/lint-config/eslint/flat/common.mjs +6 -5
- package/lib/lint-config/eslint/flat/index.mjs +1 -0
- package/lib/lint-config/eslint/flat/presets.mjs +16 -0
- package/lib/lint-config/eslint/flat/rules.mjs +18 -17
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ import tseslint from 'typescript-eslint';
|
|
|
11
11
|
import {
|
|
12
12
|
jestRecommendedRules,
|
|
13
13
|
sharedCoreRules,
|
|
14
|
-
storybookFiles,
|
|
15
14
|
testFiles,
|
|
15
|
+
testFixtureFiles,
|
|
16
16
|
testJsxFiles,
|
|
17
17
|
testingLibraryDomRules,
|
|
18
18
|
testingLibraryReactRules,
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
jsRules,
|
|
26
26
|
typescriptRules,
|
|
27
27
|
typescriptStrictRules,
|
|
28
|
+
testFixtureRelaxedRules,
|
|
28
29
|
typescriptTestRelaxedRules,
|
|
29
30
|
} from './rules.mjs';
|
|
30
31
|
|
|
@@ -114,6 +115,10 @@ export function createBaseFlatConfigs(tsRules) {
|
|
|
114
115
|
'testing-library/no-node-access': 'off',
|
|
115
116
|
},
|
|
116
117
|
},
|
|
118
|
+
{
|
|
119
|
+
files: testFixtureFiles,
|
|
120
|
+
rules: testFixtureRelaxedRules,
|
|
121
|
+
},
|
|
117
122
|
{
|
|
118
123
|
files: wdioSpecFiles,
|
|
119
124
|
plugins: { wdio, jest },
|
|
@@ -135,10 +140,6 @@ export function createBaseFlatConfigs(tsRules) {
|
|
|
135
140
|
complexity: 'off',
|
|
136
141
|
},
|
|
137
142
|
},
|
|
138
|
-
{
|
|
139
|
-
files: storybookFiles,
|
|
140
|
-
rules: { 'import-x/no-extraneous-dependencies': 'off' },
|
|
141
|
-
},
|
|
142
143
|
{
|
|
143
144
|
files: ['**/lint-config/**'],
|
|
144
145
|
rules: {
|
|
@@ -12,11 +12,26 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
12
12
|
import testingLibrary from 'eslint-plugin-testing-library';
|
|
13
13
|
import wdio from 'eslint-plugin-wdio';
|
|
14
14
|
|
|
15
|
+
/** Application and integration tests (Jest + relaxed type-checked rules). */
|
|
15
16
|
export const testFiles = [
|
|
16
17
|
'**/*.{test,spec}.{js,jsx,ts,tsx}',
|
|
17
18
|
'**/__tests__/**',
|
|
18
19
|
'**/lib/testing/**',
|
|
19
20
|
'**/mocks/**',
|
|
21
|
+
// PUI libs/apps co-locate tests under lib/ (e.g. pui-app-sdk, pui-app-loader).
|
|
22
|
+
'lib/**/tests/**',
|
|
23
|
+
'app/**/tests/**',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Generated or vendored JS under test trees (checksum bundles, MSW endpoints, pinned assets).
|
|
28
|
+
* Not maintained source — relax structural rules only.
|
|
29
|
+
*/
|
|
30
|
+
export const testFixtureFiles = [
|
|
31
|
+
'**/*.checksum*.js',
|
|
32
|
+
'**/*.endpoint.js',
|
|
33
|
+
'**/tests/**/latest/*.{js,cjs,mjs}',
|
|
34
|
+
'**/tests/**/[0-9]*.[0-9]*/*.{js,cjs,mjs}',
|
|
20
35
|
];
|
|
21
36
|
|
|
22
37
|
export const testJsxFiles = ['**/*.{test,spec}.{jsx,tsx}'];
|
|
@@ -25,6 +40,7 @@ export const wdioSpecFiles = [
|
|
|
25
40
|
'**/*.func.spec.js',
|
|
26
41
|
'**/*.visual.spec.js',
|
|
27
42
|
'**/*e2e*.{js,ts}',
|
|
43
|
+
'**/e2e/**',
|
|
28
44
|
];
|
|
29
45
|
|
|
30
46
|
export const storybookFiles = [
|
|
@@ -6,23 +6,8 @@ export const baseRules = {
|
|
|
6
6
|
'import-x/imports-first': 'off',
|
|
7
7
|
'import-x/newline-after-import': 'off',
|
|
8
8
|
'import-x/no-dynamic-require': 'off',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
devDependencies: [
|
|
13
|
-
'**/*.{test,spec,stories}.{js,jsx,ts,tsx}',
|
|
14
|
-
'**/.storybook/**',
|
|
15
|
-
'**/eslint.config.{mjs,cjs,js}',
|
|
16
|
-
'**/*.{config,conf}.{ts,js,cjs,mjs}',
|
|
17
|
-
'**/scripts/**',
|
|
18
|
-
'**/ci_cd/**',
|
|
19
|
-
'**/lint-config/**',
|
|
20
|
-
'**/lib/testing/**',
|
|
21
|
-
'**/lib/transpile/**',
|
|
22
|
-
'**/mocks/**',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
],
|
|
9
|
+
// Off — legacy parity; PUI apps import via @elliemae/app-react-dependencies (not direct package.json entries).
|
|
10
|
+
'import-x/no-extraneous-dependencies': 'off',
|
|
26
11
|
'import-x/no-named-as-default': 'off',
|
|
27
12
|
'import-x/no-unresolved': [
|
|
28
13
|
'error',
|
|
@@ -64,6 +49,22 @@ export const typescriptTestRelaxedRules = {
|
|
|
64
49
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
65
50
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
66
51
|
'@typescript-eslint/unbound-method': 'off',
|
|
52
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
53
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
54
|
+
'@typescript-eslint/await-thenable': 'off',
|
|
55
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
56
|
+
'no-constant-binary-expression': 'off',
|
|
57
|
+
'valid-typeof': 'off',
|
|
58
|
+
'prefer-const': 'off',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Relaxed core rules for generated test fixture JS (checksum mocks, etc.). */
|
|
62
|
+
export const testFixtureRelaxedRules = {
|
|
63
|
+
'no-unused-vars': 'off',
|
|
64
|
+
'no-console': 'off',
|
|
65
|
+
'max-lines': 'off',
|
|
66
|
+
'max-statements': 'off',
|
|
67
|
+
complexity: 'off',
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
export const jsRules = {
|
|
@@ -11,8 +11,8 @@ import tseslint from 'typescript-eslint';
|
|
|
11
11
|
import {
|
|
12
12
|
jestRecommendedRules,
|
|
13
13
|
sharedCoreRules,
|
|
14
|
-
storybookFiles,
|
|
15
14
|
testFiles,
|
|
15
|
+
testFixtureFiles,
|
|
16
16
|
testJsxFiles,
|
|
17
17
|
testingLibraryDomRules,
|
|
18
18
|
testingLibraryReactRules,
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
jsRules,
|
|
26
26
|
typescriptRules,
|
|
27
27
|
typescriptStrictRules,
|
|
28
|
+
testFixtureRelaxedRules,
|
|
28
29
|
typescriptTestRelaxedRules,
|
|
29
30
|
} from './rules.mjs';
|
|
30
31
|
|
|
@@ -114,6 +115,10 @@ export function createBaseFlatConfigs(tsRules) {
|
|
|
114
115
|
'testing-library/no-node-access': 'off',
|
|
115
116
|
},
|
|
116
117
|
},
|
|
118
|
+
{
|
|
119
|
+
files: testFixtureFiles,
|
|
120
|
+
rules: testFixtureRelaxedRules,
|
|
121
|
+
},
|
|
117
122
|
{
|
|
118
123
|
files: wdioSpecFiles,
|
|
119
124
|
plugins: { wdio, jest },
|
|
@@ -135,10 +140,6 @@ export function createBaseFlatConfigs(tsRules) {
|
|
|
135
140
|
complexity: 'off',
|
|
136
141
|
},
|
|
137
142
|
},
|
|
138
|
-
{
|
|
139
|
-
files: storybookFiles,
|
|
140
|
-
rules: { 'import-x/no-extraneous-dependencies': 'off' },
|
|
141
|
-
},
|
|
142
143
|
{
|
|
143
144
|
files: ['**/lint-config/**'],
|
|
144
145
|
rules: {
|
|
@@ -12,11 +12,26 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
12
12
|
import testingLibrary from 'eslint-plugin-testing-library';
|
|
13
13
|
import wdio from 'eslint-plugin-wdio';
|
|
14
14
|
|
|
15
|
+
/** Application and integration tests (Jest + relaxed type-checked rules). */
|
|
15
16
|
export const testFiles = [
|
|
16
17
|
'**/*.{test,spec}.{js,jsx,ts,tsx}',
|
|
17
18
|
'**/__tests__/**',
|
|
18
19
|
'**/lib/testing/**',
|
|
19
20
|
'**/mocks/**',
|
|
21
|
+
// PUI libs/apps co-locate tests under lib/ (e.g. pui-app-sdk, pui-app-loader).
|
|
22
|
+
'lib/**/tests/**',
|
|
23
|
+
'app/**/tests/**',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Generated or vendored JS under test trees (checksum bundles, MSW endpoints, pinned assets).
|
|
28
|
+
* Not maintained source — relax structural rules only.
|
|
29
|
+
*/
|
|
30
|
+
export const testFixtureFiles = [
|
|
31
|
+
'**/*.checksum*.js',
|
|
32
|
+
'**/*.endpoint.js',
|
|
33
|
+
'**/tests/**/latest/*.{js,cjs,mjs}',
|
|
34
|
+
'**/tests/**/[0-9]*.[0-9]*/*.{js,cjs,mjs}',
|
|
20
35
|
];
|
|
21
36
|
|
|
22
37
|
export const testJsxFiles = ['**/*.{test,spec}.{jsx,tsx}'];
|
|
@@ -25,6 +40,7 @@ export const wdioSpecFiles = [
|
|
|
25
40
|
'**/*.func.spec.js',
|
|
26
41
|
'**/*.visual.spec.js',
|
|
27
42
|
'**/*e2e*.{js,ts}',
|
|
43
|
+
'**/e2e/**',
|
|
28
44
|
];
|
|
29
45
|
|
|
30
46
|
export const storybookFiles = [
|
|
@@ -6,23 +6,8 @@ export const baseRules = {
|
|
|
6
6
|
'import-x/imports-first': 'off',
|
|
7
7
|
'import-x/newline-after-import': 'off',
|
|
8
8
|
'import-x/no-dynamic-require': 'off',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
devDependencies: [
|
|
13
|
-
'**/*.{test,spec,stories}.{js,jsx,ts,tsx}',
|
|
14
|
-
'**/.storybook/**',
|
|
15
|
-
'**/eslint.config.{mjs,cjs,js}',
|
|
16
|
-
'**/*.{config,conf}.{ts,js,cjs,mjs}',
|
|
17
|
-
'**/scripts/**',
|
|
18
|
-
'**/ci_cd/**',
|
|
19
|
-
'**/lint-config/**',
|
|
20
|
-
'**/lib/testing/**',
|
|
21
|
-
'**/lib/transpile/**',
|
|
22
|
-
'**/mocks/**',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
],
|
|
9
|
+
// Off — legacy parity; PUI apps import via @elliemae/app-react-dependencies (not direct package.json entries).
|
|
10
|
+
'import-x/no-extraneous-dependencies': 'off',
|
|
26
11
|
'import-x/no-named-as-default': 'off',
|
|
27
12
|
'import-x/no-unresolved': [
|
|
28
13
|
'error',
|
|
@@ -64,6 +49,22 @@ export const typescriptTestRelaxedRules = {
|
|
|
64
49
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
65
50
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
66
51
|
'@typescript-eslint/unbound-method': 'off',
|
|
52
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
53
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
54
|
+
'@typescript-eslint/await-thenable': 'off',
|
|
55
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
56
|
+
'no-constant-binary-expression': 'off',
|
|
57
|
+
'valid-typeof': 'off',
|
|
58
|
+
'prefer-const': 'off',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Relaxed core rules for generated test fixture JS (checksum mocks, etc.). */
|
|
62
|
+
export const testFixtureRelaxedRules = {
|
|
63
|
+
'no-unused-vars': 'off',
|
|
64
|
+
'no-console': 'off',
|
|
65
|
+
'max-lines': 'off',
|
|
66
|
+
'max-statements': 'off',
|
|
67
|
+
complexity: 'off',
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
export const jsRules = {
|
|
@@ -3,4 +3,4 @@ export { eslintFlatBaseConfig, eslintFlatBaseConfigStrict } from "./non-react-ex
|
|
|
3
3
|
export { reactFlatConfigs, reactFlatConfigsStrict } from "./react.mjs";
|
|
4
4
|
export { nonReactFlatConfigs, nonReactFlatConfigsStrict } from "./non-react.mjs";
|
|
5
5
|
export { baseFlatConfigs, baseFlatConfigsStrict, createBaseFlatConfigs } from "./common.mjs";
|
|
6
|
-
export { storybookFiles, testFiles, testJsxFiles } from "./presets.mjs";
|
|
6
|
+
export { storybookFiles, testFiles, testFixtureFiles, testJsxFiles } from "./presets.mjs";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/** Application and integration tests (Jest + relaxed type-checked rules). */
|
|
1
2
|
export const testFiles: string[];
|
|
3
|
+
/**
|
|
4
|
+
* Generated or vendored JS under test trees (checksum bundles, MSW endpoints, pinned assets).
|
|
5
|
+
* Not maintained source — relax structural rules only.
|
|
6
|
+
*/
|
|
7
|
+
export const testFixtureFiles: string[];
|
|
2
8
|
export const testJsxFiles: string[];
|
|
3
9
|
export const wdioSpecFiles: string[];
|
|
4
10
|
export const storybookFiles: string[];
|
|
@@ -5,9 +5,7 @@ export const baseRules: {
|
|
|
5
5
|
'import-x/imports-first': string;
|
|
6
6
|
'import-x/newline-after-import': string;
|
|
7
7
|
'import-x/no-dynamic-require': string;
|
|
8
|
-
'import-x/no-extraneous-dependencies':
|
|
9
|
-
devDependencies: string[];
|
|
10
|
-
})[];
|
|
8
|
+
'import-x/no-extraneous-dependencies': string;
|
|
11
9
|
'import-x/no-named-as-default': string;
|
|
12
10
|
'import-x/no-unresolved': (string | {
|
|
13
11
|
caseSensitive: boolean;
|
|
@@ -56,6 +54,21 @@ export const typescriptTestRelaxedRules: {
|
|
|
56
54
|
'@typescript-eslint/no-unsafe-argument': string;
|
|
57
55
|
'@typescript-eslint/no-unsafe-return': string;
|
|
58
56
|
'@typescript-eslint/unbound-method': string;
|
|
57
|
+
'@typescript-eslint/no-unsafe-declaration-merging': string;
|
|
58
|
+
'@typescript-eslint/no-unsafe-enum-comparison': string;
|
|
59
|
+
'@typescript-eslint/await-thenable': string;
|
|
60
|
+
'@typescript-eslint/prefer-promise-reject-errors': string;
|
|
61
|
+
'no-constant-binary-expression': string;
|
|
62
|
+
'valid-typeof': string;
|
|
63
|
+
'prefer-const': string;
|
|
64
|
+
};
|
|
65
|
+
/** Relaxed core rules for generated test fixture JS (checksum mocks, etc.). */
|
|
66
|
+
export const testFixtureRelaxedRules: {
|
|
67
|
+
'no-unused-vars': string;
|
|
68
|
+
'no-console': string;
|
|
69
|
+
'max-lines': string;
|
|
70
|
+
'max-statements': string;
|
|
71
|
+
complexity: string;
|
|
59
72
|
};
|
|
60
73
|
export const jsRules: {
|
|
61
74
|
'max-lines': (string | {
|
|
@@ -68,9 +81,7 @@ export const jsRules: {
|
|
|
68
81
|
'import-x/imports-first': string;
|
|
69
82
|
'import-x/newline-after-import': string;
|
|
70
83
|
'import-x/no-dynamic-require': string;
|
|
71
|
-
'import-x/no-extraneous-dependencies':
|
|
72
|
-
devDependencies: string[];
|
|
73
|
-
})[];
|
|
84
|
+
'import-x/no-extraneous-dependencies': string;
|
|
74
85
|
'import-x/no-named-as-default': string;
|
|
75
86
|
'import-x/no-unresolved': (string | {
|
|
76
87
|
caseSensitive: boolean;
|
|
@@ -155,9 +166,7 @@ export const typescriptRules: {
|
|
|
155
166
|
'import-x/imports-first': string;
|
|
156
167
|
'import-x/newline-after-import': string;
|
|
157
168
|
'import-x/no-dynamic-require': string;
|
|
158
|
-
'import-x/no-extraneous-dependencies':
|
|
159
|
-
devDependencies: string[];
|
|
160
|
-
})[];
|
|
169
|
+
'import-x/no-extraneous-dependencies': string;
|
|
161
170
|
'import-x/no-named-as-default': string;
|
|
162
171
|
'import-x/no-unresolved': (string | {
|
|
163
172
|
caseSensitive: boolean;
|
|
@@ -243,9 +252,7 @@ export const typescriptStrictRules: {
|
|
|
243
252
|
'import-x/imports-first': string;
|
|
244
253
|
'import-x/newline-after-import': string;
|
|
245
254
|
'import-x/no-dynamic-require': string;
|
|
246
|
-
'import-x/no-extraneous-dependencies':
|
|
247
|
-
devDependencies: string[];
|
|
248
|
-
})[];
|
|
255
|
+
'import-x/no-extraneous-dependencies': string;
|
|
249
256
|
'import-x/no-named-as-default': string;
|
|
250
257
|
'import-x/no-unresolved': (string | {
|
|
251
258
|
caseSensitive: boolean;
|