@elliemae/pui-cli 9.0.0-alpha.8 → 9.0.0-alpha.9
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/README.md +1 -1
- package/app.tsconfig.json +1 -1
- package/dist/cjs/cli.js +2 -14
- package/dist/cjs/commands/build.js +1 -2
- package/dist/cjs/commands/buildcdn.js +1 -2
- package/dist/cjs/commands/codemod.js +1 -12
- package/dist/cjs/commands/gendoc.js +1 -2
- package/dist/cjs/commands/lint.js +11 -9
- package/dist/cjs/commands/pack.js +1 -2
- package/dist/cjs/commands/skills.js +1 -2
- package/dist/cjs/commands/start.js +1 -2
- package/dist/cjs/commands/storybook.js +1 -12
- package/dist/cjs/commands/test.js +1 -12
- package/dist/cjs/commands/tscheck.js +1 -2
- package/dist/cjs/commands/utils.js +12 -8
- package/dist/cjs/commands/version.js +1 -12
- package/dist/cjs/commands/vitest.js +1 -12
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/lint-config/eslint/flat/compat.mjs +5 -130
- package/dist/cjs/lint-config/stylelint/config.mjs +27 -0
- package/dist/cjs/lint-config/stylelint/export.mjs +1 -0
- package/dist/cjs/lint-config/stylelint.config.cjs +3 -19
- package/dist/cjs/monorepo/utils.cjs +15 -7
- package/dist/cjs/monorepo/utils.js +5 -8
- package/dist/cjs/skills/migrate-to-pui-cli-9/SKILL.md +115 -11
- package/dist/cjs/testing/vitest.config.js +2 -1
- package/dist/esm/cli.js +2 -14
- package/dist/esm/commands/build.js +1 -2
- package/dist/esm/commands/buildcdn.js +1 -2
- package/dist/esm/commands/codemod.js +1 -2
- package/dist/esm/commands/gendoc.js +1 -2
- package/dist/esm/commands/lint.js +11 -9
- package/dist/esm/commands/pack.js +1 -2
- package/dist/esm/commands/skills.js +1 -2
- package/dist/esm/commands/start.js +1 -2
- package/dist/esm/commands/storybook.js +1 -2
- package/dist/esm/commands/test.js +1 -2
- package/dist/esm/commands/tscheck.js +1 -2
- package/dist/esm/commands/utils.js +13 -9
- package/dist/esm/commands/version.js +1 -2
- package/dist/esm/commands/vitest.js +1 -2
- package/dist/esm/index.cjs +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lint-config/eslint/flat/compat.mjs +5 -130
- package/dist/esm/lint-config/stylelint/config.mjs +27 -0
- package/dist/esm/lint-config/stylelint/export.mjs +1 -0
- package/dist/esm/lint-config/stylelint.config.cjs +3 -19
- package/dist/esm/monorepo/utils.cjs +15 -7
- package/dist/esm/monorepo/utils.js +5 -8
- package/dist/esm/skills/migrate-to-pui-cli-9/SKILL.md +115 -11
- package/dist/esm/testing/vitest.config.js +2 -1
- package/dist/types/lib/commands/build.d.ts +1 -1
- package/dist/types/lib/commands/buildcdn.d.ts +1 -1
- package/dist/types/lib/commands/codemod.d.ts +1 -1
- package/dist/types/lib/commands/gendoc.d.ts +1 -1
- package/dist/types/lib/commands/lint.d.ts +1 -1
- package/dist/types/lib/commands/pack.d.ts +1 -1
- package/dist/types/lib/commands/skills.d.ts +1 -1
- package/dist/types/lib/commands/start.d.ts +1 -1
- package/dist/types/lib/commands/storybook.d.ts +1 -1
- package/dist/types/lib/commands/test.d.ts +1 -1
- package/dist/types/lib/commands/tscheck.d.ts +1 -1
- package/dist/types/lib/commands/utils.d.ts +43 -2
- package/dist/types/lib/commands/version.d.ts +1 -1
- package/dist/types/lib/commands/vitest.d.ts +1 -1
- package/dist/types/lib/index.d.cts +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/lint-config/stylelint/config.d.mts +3 -0
- package/dist/types/lib/lint-config/stylelint/export.d.mts +1 -0
- package/dist/types/lib/lint-config/stylelint.config.d.cts +2 -10
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/lib/lint-config/eslint/flat/compat.mjs +5 -130
- package/lib/lint-config/stylelint/config.mjs +27 -0
- package/lib/lint-config/stylelint/export.mjs +1 -0
- package/lib/lint-config/stylelint.config.cjs +3 -19
- package/lib/skills/migrate-to-pui-cli-9/SKILL.md +115 -11
- package/library.tsconfig.json +1 -1
- package/package.json +21 -21
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ESLint 10 removed deprecated context APIs (e.g. getSourceCode, getScope, getFilename).
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @eslint/compat fixupPluginRules assumes ESLint 9 sourceCode passthroughs that are also
|
|
6
|
-
* unavailable in ESLint 10, so we shim legacy context methods directly on the rule context.
|
|
3
|
+
* Wrap legacy plugins via @eslint/compat v2 (ESLint 10–aware fixupPluginRules).
|
|
7
4
|
*/
|
|
5
|
+
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
|
|
8
6
|
import react from 'eslint-plugin-react';
|
|
9
7
|
import reduxSaga from 'eslint-plugin-redux-saga';
|
|
10
8
|
import storybook from 'eslint-plugin-storybook';
|
|
@@ -14,139 +12,16 @@ const storybookFlat =
|
|
|
14
12
|
storybook.configs.recommended ??
|
|
15
13
|
[];
|
|
16
14
|
|
|
17
|
-
/** @type {WeakMap<import('eslint').ESLint.Plugin, import('eslint').ESLint.Plugin>} */
|
|
18
|
-
const fixedPlugins = new WeakMap();
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @param {import('eslint').Rule.RuleModule['create']} originalCreate
|
|
22
|
-
*/
|
|
23
|
-
function wrapRuleCreateWithLegacyContext(originalCreate) {
|
|
24
|
-
return function create(context) {
|
|
25
|
-
if (
|
|
26
|
-
typeof context.getScope === 'function' &&
|
|
27
|
-
typeof context.getFilename === 'function'
|
|
28
|
-
) {
|
|
29
|
-
return originalCreate(context);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const sourceCode = context.sourceCode;
|
|
33
|
-
let currentNode = sourceCode.ast;
|
|
34
|
-
|
|
35
|
-
const legacyContext = Object.assign(Object.create(context), {
|
|
36
|
-
getFilename() {
|
|
37
|
-
return context.filename;
|
|
38
|
-
},
|
|
39
|
-
getScope() {
|
|
40
|
-
return sourceCode.getScope(currentNode);
|
|
41
|
-
},
|
|
42
|
-
getAncestors() {
|
|
43
|
-
return sourceCode.getAncestors(currentNode);
|
|
44
|
-
},
|
|
45
|
-
getSourceCode() {
|
|
46
|
-
return sourceCode;
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
Object.freeze(legacyContext);
|
|
51
|
-
|
|
52
|
-
const visitor = originalCreate(legacyContext);
|
|
53
|
-
|
|
54
|
-
if (!visitor || typeof visitor !== 'object') {
|
|
55
|
-
return visitor;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
for (const [methodName, method] of Object.entries(visitor)) {
|
|
59
|
-
if (typeof method !== 'function') {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (methodName.startsWith('on')) {
|
|
64
|
-
visitor[methodName] = (...args) => {
|
|
65
|
-
currentNode = args[methodName === 'onCodePathSegmentLoop' ? 2 : 1];
|
|
66
|
-
return method.call(visitor, ...args);
|
|
67
|
-
};
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
visitor[methodName] = (node, ...rest) => {
|
|
72
|
-
currentNode = node;
|
|
73
|
-
return method.call(visitor, node, ...rest);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return visitor;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @param {import('eslint').ESLint.Plugin} plugin
|
|
83
|
-
* @returns {import('eslint').ESLint.Plugin}
|
|
84
|
-
*/
|
|
85
|
-
function fixupLegacyPlugin(plugin) {
|
|
86
|
-
const cached = fixedPlugins.get(plugin);
|
|
87
|
-
if (cached) {
|
|
88
|
-
return cached;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (!plugin.rules) {
|
|
92
|
-
fixedPlugins.set(plugin, plugin);
|
|
93
|
-
return plugin;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const rules = {};
|
|
97
|
-
|
|
98
|
-
for (const [ruleName, ruleDefinition] of Object.entries(plugin.rules)) {
|
|
99
|
-
if (typeof ruleDefinition === 'function') {
|
|
100
|
-
rules[ruleName] = wrapRuleCreateWithLegacyContext(ruleDefinition);
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
rules[ruleName] = {
|
|
105
|
-
...ruleDefinition,
|
|
106
|
-
create: wrapRuleCreateWithLegacyContext(
|
|
107
|
-
ruleDefinition.create.bind(ruleDefinition),
|
|
108
|
-
),
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const fixed = { ...plugin, rules };
|
|
113
|
-
fixedPlugins.set(plugin, fixed);
|
|
114
|
-
return fixed;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** @type {import('eslint').ESLint.Plugin} */
|
|
118
|
-
const storybookPlugin = fixupLegacyPlugin(storybook);
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* @param {import('eslint').Linter.Config[]} configs
|
|
122
|
-
* @returns {import('eslint').Linter.Config[]}
|
|
123
|
-
*/
|
|
124
|
-
function fixupStorybookFlatConfigs(configs) {
|
|
125
|
-
return configs.map((configItem) => {
|
|
126
|
-
if (!configItem.plugins?.storybook) {
|
|
127
|
-
return configItem;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
...configItem,
|
|
132
|
-
plugins: {
|
|
133
|
-
...configItem.plugins,
|
|
134
|
-
storybook: storybookPlugin,
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
|
|
140
15
|
/** React — uses context.getFilename / getScope (eslint-plugin-react@7). */
|
|
141
16
|
/** @type {import('eslint').ESLint.Plugin} */
|
|
142
|
-
export const reactPlugin =
|
|
17
|
+
export const reactPlugin = fixupPluginRules(react);
|
|
143
18
|
|
|
144
19
|
/** Redux-saga — uses context.getScope in no-yield-in-race. */
|
|
145
20
|
/** @type {import('eslint').ESLint.Plugin} */
|
|
146
|
-
export const reduxSagaPlugin =
|
|
21
|
+
export const reduxSagaPlugin = fixupPluginRules(reduxSaga);
|
|
147
22
|
|
|
148
23
|
/** Storybook flat presets — uses legacy context APIs (eslint-plugin-storybook@0.12). */
|
|
149
24
|
/** @type {import('eslint').Linter.Config[]} */
|
|
150
|
-
export const storybookFlatConfigs =
|
|
25
|
+
export const storybookFlatConfigs = fixupConfigRules(
|
|
151
26
|
Array.isArray(storybookFlat) ? storybookFlat : [storybookFlat],
|
|
152
27
|
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @type {import('stylelint').Config} */
|
|
2
|
+
export const stylelintConfig = {
|
|
3
|
+
ignoreFiles: [
|
|
4
|
+
'/dist/**/*',
|
|
5
|
+
'/coverage/**/*',
|
|
6
|
+
'/build/**/*',
|
|
7
|
+
'/reports/**/*',
|
|
8
|
+
'/temp/**/*',
|
|
9
|
+
'/docs/**/*',
|
|
10
|
+
'/demo/**/*',
|
|
11
|
+
'/node_modules/**/*',
|
|
12
|
+
'/vendor/**/*',
|
|
13
|
+
],
|
|
14
|
+
customSyntax: 'postcss-styled-syntax',
|
|
15
|
+
extends: ['stylelint-config-recommended'],
|
|
16
|
+
rules: {
|
|
17
|
+
'selector-type-no-unknown': null,
|
|
18
|
+
'function-no-unknown': null,
|
|
19
|
+
// Formerly from stylelint-config-styled-components (unmaintained; references
|
|
20
|
+
// removed rules like no-missing-end-of-source-newline in Stylelint 17).
|
|
21
|
+
'value-no-vendor-prefix': true,
|
|
22
|
+
'property-no-vendor-prefix': true,
|
|
23
|
+
'no-empty-source': null,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default stylelintConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { stylelintConfig, default } from './config.mjs';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"/coverage/**/*",
|
|
5
|
-
"/build/**/*",
|
|
6
|
-
"/reports/**/*",
|
|
7
|
-
"/temp/**/*",
|
|
8
|
-
"/docs/**/*",
|
|
9
|
-
"/demo/**/*",
|
|
10
|
-
"/node_modules/**/*",
|
|
11
|
-
"/vendor/**/*",
|
|
12
|
-
],
|
|
13
|
-
customSyntax: "postcss-styled-syntax",
|
|
14
|
-
extends: [
|
|
15
|
-
"stylelint-config-recommended",
|
|
16
|
-
"stylelint-config-styled-components",
|
|
17
|
-
],
|
|
18
|
-
rules: { "selector-type-no-unknown": null, "function-no-unknown": null },
|
|
19
|
-
};
|
|
1
|
+
const { stylelintConfig } = require('./stylelint/export.mjs');
|
|
2
|
+
|
|
3
|
+
exports.stylelintConfig = stylelintConfig;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: migrate-to-pui-cli-9
|
|
3
3
|
description: >-
|
|
4
|
-
Migrate a PUI app or library to pui-cli 9 (Node 24, pnpm 11, ESLint
|
|
5
|
-
Use when upgrading @elliemae/pui-cli, migrating from .eslintrc.cjs to
|
|
6
|
-
|
|
4
|
+
Migrate a PUI app or library to pui-cli 9 (Node 24, pnpm 11, ESLint 10 flat config, Stylelint 17,
|
|
5
|
+
Husky 9, Vitest 4). Use when upgrading @elliemae/pui-cli, migrating from .eslintrc.cjs to
|
|
6
|
+
eslint.config.mjs, upgrading Husky 8 hooks, fixing Vitest 4 / coverage-v8 breakages, or adopting
|
|
7
|
+
shared configs from pui-cli. App/library production builds stay on Webpack.
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Migrate to pui-cli 9
|
|
10
11
|
|
|
11
12
|
Upgrades a PUI repo from pui-cli 8 (ESLint 8 + `.eslintrc.cjs`) to pui-cli 9
|
|
12
|
-
(ESLint
|
|
13
|
+
(ESLint 10 + `eslint.config.mjs` + Node 24 + pnpm 11). Production bundling remains Webpack;
|
|
14
|
+
Vitest 4 uses Vite only as the test runner when you run `pui-cli vitest`.
|
|
13
15
|
|
|
14
16
|
## Pre-flight: Toolchain
|
|
15
17
|
|
|
@@ -42,7 +44,7 @@ pnpm add -D @elliemae/pui-cli@9
|
|
|
42
44
|
|
|
43
45
|
Re-run install and smoke-test build/test without ESLint changes yet if the bump is large.
|
|
44
46
|
|
|
45
|
-
### Phase 3 — ESLint
|
|
47
|
+
### Phase 3 — ESLint 10 flat config
|
|
46
48
|
|
|
47
49
|
**React apps and libraries:**
|
|
48
50
|
|
|
@@ -95,13 +97,111 @@ export default [
|
|
|
95
97
|
|
|
96
98
|
Remove overrides in a follow-up debt PR. Do not copy Airbnb or legacy `.eslintrc` rules.
|
|
97
99
|
|
|
98
|
-
### Phase 5 —
|
|
100
|
+
### Phase 5 — Husky 9 (if `.husky/` exists)
|
|
101
|
+
|
|
102
|
+
Skip this phase if the repo has no git hooks. Most PUI apps/libs copied hooks from pui-cli boilerplate and still use Husky 8.
|
|
103
|
+
|
|
104
|
+
1. Upgrade and remove deprecated package:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pnpm add -D husky@9
|
|
108
|
+
pnpm remove husky-init # if present
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
2. Update `package.json` `prepare` script:
|
|
112
|
+
|
|
113
|
+
```diff
|
|
114
|
+
- "prepare": "[ -n \"$CI\" ] || husky install"
|
|
115
|
+
+ "prepare": "[ -n \"$CI\" ] || husky"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
3. Simplify each hook in `.husky/` — remove the shebang and `husky.sh` source. Keep only the command(s):
|
|
119
|
+
|
|
120
|
+
**`.husky/pre-commit`** (typical PUI repo):
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
pnpm -s dlx lint-staged
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**`.husky/commit-msg`** (if commitlint is enabled):
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
pnpm exec commitlint --edit $1
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```diff
|
|
133
|
+
- #!/bin/sh
|
|
134
|
+
- . "$(dirname "$0")/_/husky.sh"
|
|
135
|
+
-
|
|
136
|
+
pnpm -s dlx lint-staged
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
4. Delete `.husky/.gitignore` if present (Husky 9 regenerates `.husky/_` on install).
|
|
140
|
+
|
|
141
|
+
5. Run `pnpm prepare`, then verify hooks with a test commit.
|
|
142
|
+
|
|
143
|
+
**Environment variable changes (Husky 9):**
|
|
144
|
+
|
|
145
|
+
| Husky 8 | Husky 9 |
|
|
146
|
+
| ----------------------------------------- | ------------- |
|
|
147
|
+
| `HUSKY_SKIP_HOOKS` / `HUSKY_SKIP_INSTALL` | `HUSKY=0` |
|
|
148
|
+
| `HUSKY_GIT_PARAMS` in commit-msg hooks | `$1`, `$2`, … |
|
|
149
|
+
|
|
150
|
+
Reference hooks: [pui-cli/.husky](https://git.elliemae.io/platform-ui/pui-cli/tree/master/.husky)
|
|
151
|
+
|
|
152
|
+
### Phase 6 — Stylelint 17 (if CSS / styled-components)
|
|
153
|
+
|
|
154
|
+
1. Simplify `stylelint.config.cjs` — remove `stylelint-config-styled-components` workarounds.
|
|
155
|
+
2. Optional ESM: `stylelint.config.mjs` importing `@elliemae/pui-cli/stylelint`.
|
|
156
|
+
3. Run `pnpm exec pui-cli lint` (CSS pass).
|
|
157
|
+
|
|
158
|
+
See [stylelint-migration.md](https://docs.pui.mortgagetech.q1.ice.com/cli/stylelint-migration) in pui-cli docs.
|
|
159
|
+
|
|
160
|
+
### Phase 7 — Vitest 4 (if using `pui-cli vitest`)
|
|
161
|
+
|
|
162
|
+
Skip if the repo uses Jest (`pui-cli test`) only.
|
|
163
|
+
|
|
164
|
+
1. Align devDependencies with pui-cli 9 (Vitest 4 stack):
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
pnpm add -D vitest@4 @vitest/coverage-v8@4 vite@8 @vitejs/plugin-react@6 vite-tsconfig-paths@6
|
|
168
|
+
pnpm remove @vitest/coverage-c8 @types/uuid # when upgrading uuid to 14+
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
2. Prefer extending shared config:
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
175
|
+
import { vitestConfig } from '@elliemae/pui-cli/vitest';
|
|
176
|
+
|
|
177
|
+
export default mergeConfig(
|
|
178
|
+
vitestConfig,
|
|
179
|
+
defineConfig({
|
|
180
|
+
test: {
|
|
181
|
+
/* overrides */
|
|
182
|
+
},
|
|
183
|
+
}),
|
|
184
|
+
);
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
3. Update custom Vitest 1.x options:
|
|
188
|
+
|
|
189
|
+
| Old | New |
|
|
190
|
+
| ------------------------- | ---------------------------- |
|
|
191
|
+
| `test.deps.optimizer.web` | `test.deps.optimizer.client` |
|
|
192
|
+
| `@vitest/coverage-c8` | `@vitest/coverage-v8` |
|
|
193
|
+
|
|
194
|
+
4. If `tsconfig.json` extends `@elliemae/pui-cli/app.tsconfig.json` or `library.tsconfig.json`, ensure pui-cli 9 is installed — shared tsconfigs use `moduleResolution: "bundler"`. Custom tsconfigs importing `vitest/config` may need the same.
|
|
195
|
+
|
|
196
|
+
5. Smoke-test: `pnpm exec pui-cli vitest --passWithNoTests`
|
|
197
|
+
|
|
198
|
+
### Phase 8 — Verify
|
|
99
199
|
|
|
100
200
|
- [ ] `pnpm exec pui-cli lint` — 0 errors
|
|
101
201
|
- [ ] `pnpm exec pui-cli tscheck --files`
|
|
102
|
-
- [ ] `pnpm test`
|
|
103
|
-
- [ ] `pnpm run build` (or `pui-cli build`)
|
|
104
|
-
- [ ] Pre-commit / lint-staged passes
|
|
202
|
+
- [ ] `pnpm test` (or `pui-cli vitest` if applicable)
|
|
203
|
+
- [ ] `pnpm run build` (or `pui-cli build`) — Webpack, unchanged
|
|
204
|
+
- [ ] Pre-commit / lint-staged passes (after Husky 9 migration if applicable)
|
|
105
205
|
- [ ] CI green on the target branch
|
|
106
206
|
|
|
107
207
|
## Common lint fixes after upgrade
|
|
@@ -114,6 +214,9 @@ Remove overrides in a follow-up debt PR. Do not copy Airbnb or legacy `.eslintrc
|
|
|
114
214
|
| Stale `eslint-disable` comments | Remove disables for rules no longer in config |
|
|
115
215
|
| Test/fixture files flagged | Shared config includes `lib/**/tests/**` globs — ensure pui-cli 9.0.0+ |
|
|
116
216
|
| `.d.ts` files | pui-cli turns off `no-explicit-any` for `**/*.d.ts` |
|
|
217
|
+
| Cannot find module `vite` in tscheck | Set `moduleResolution: "bundler"` or extend pui-cli 9 tsconfig |
|
|
218
|
+
| Vitest `optimizer.web` unknown | Rename to `test.deps.optimizer.client` (Vitest 4) |
|
|
219
|
+
| Coverage fails after upgrade | Remove `@vitest/coverage-c8`; use `@vitest/coverage-v8@4` |
|
|
117
220
|
|
|
118
221
|
Full rule comparison: [eslint-rules-migration.md](https://docs.pui.mortgagetech.q1.ice.com/cli/eslint-rules-migration) (also at `docs/eslint-rules-migration.md` in pui-cli).
|
|
119
222
|
|
|
@@ -130,11 +233,12 @@ Skills are copied to `.cursor/skills/`, `.claude/skills/`, and `.github/skills/`
|
|
|
130
233
|
## What NOT to change
|
|
131
234
|
|
|
132
235
|
- Application business logic — migration is tooling/config only
|
|
133
|
-
- Webpack/babel config
|
|
134
|
-
- Prettier /
|
|
236
|
+
- Webpack/babel production build config — pui-cli 9 does not migrate apps to Vite for bundling
|
|
237
|
+
- Prettier / commitlint configs unless pui-cli 9 bumps those presets
|
|
135
238
|
|
|
136
239
|
## Additional resources
|
|
137
240
|
|
|
138
241
|
- [pui-cli 9 migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/pui-cli-9-migration)
|
|
139
242
|
- [ESLint rules migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/eslint-rules-migration)
|
|
243
|
+
- [Stylelint migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/stylelint-migration)
|
|
140
244
|
- Reference one-liner: `pui-react-boilerplate/eslint.config.mjs`
|
package/library.tsconfig.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.9",
|
|
4
4
|
"description": "ICE MT UI Platform CLI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"./eslint": {
|
|
32
32
|
"import": "./lib/lint-config/eslint/flat/index.mjs",
|
|
33
33
|
"default": "./lib/lint-config/eslint/flat/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./stylelint": {
|
|
36
|
+
"import": "./lib/lint-config/stylelint/export.mjs",
|
|
37
|
+
"default": "./lib/lint-config/stylelint/export.mjs"
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
"files": [
|
|
@@ -81,7 +85,7 @@
|
|
|
81
85
|
"@commitlint/cli": "~21.0.1",
|
|
82
86
|
"@commitlint/config-conventional": "~21.0.1",
|
|
83
87
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.14.4",
|
|
84
|
-
"@eslint/compat": "~1.
|
|
88
|
+
"@eslint/compat": "~2.1.0",
|
|
85
89
|
"@eslint/js": "~10.0.1",
|
|
86
90
|
"@faker-js/faker": "~7.6.0",
|
|
87
91
|
"@nrwl/cli": "~15.9.7",
|
|
@@ -130,13 +134,11 @@
|
|
|
130
134
|
"@types/speed-measure-webpack-plugin": "~1.3.6",
|
|
131
135
|
"@types/supertest": "~2.0.16",
|
|
132
136
|
"@types/testing-library__jest-dom": "~5.14.9",
|
|
133
|
-
"@types/uuid": "~9.0.8",
|
|
134
137
|
"@types/webpack-bundle-analyzer": "~4.7.0",
|
|
135
138
|
"@types/ws": "~8.18.1",
|
|
136
139
|
"@types/yargs": "~17.0.35",
|
|
137
|
-
"@vitejs/plugin-react": "~
|
|
138
|
-
"@vitest/coverage-
|
|
139
|
-
"@vitest/coverage-v8": "~0.34.6",
|
|
140
|
+
"@vitejs/plugin-react": "~6.0.2",
|
|
141
|
+
"@vitest/coverage-v8": "~4.1.7",
|
|
140
142
|
"autoprefixer": "~10.5.0",
|
|
141
143
|
"axe-core": "~4.11.3",
|
|
142
144
|
"babel-plugin-date-fns": "~2.0.0",
|
|
@@ -160,12 +162,12 @@
|
|
|
160
162
|
"compression-webpack-plugin": "~10.0.0",
|
|
161
163
|
"copy-webpack-plugin": "~11.0.0",
|
|
162
164
|
"cors": "~2.8.6",
|
|
163
|
-
"cross-env": "~
|
|
165
|
+
"cross-env": "~10.1.0",
|
|
164
166
|
"css-loader": "~6.11.0",
|
|
165
167
|
"css-minimizer-webpack-plugin": "~5.0.1",
|
|
166
168
|
"depcheck": "~1.4.7",
|
|
167
169
|
"docdash": "~2.0.2",
|
|
168
|
-
"dotenv": "~
|
|
170
|
+
"dotenv": "~17.4.2",
|
|
169
171
|
"dotenv-webpack": "~8.1.1",
|
|
170
172
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
171
173
|
"enhanced-resolve": "~5.21.0",
|
|
@@ -185,23 +187,22 @@
|
|
|
185
187
|
"eslint-plugin-storybook": "~0.12.0",
|
|
186
188
|
"eslint-plugin-testing-library": "~7.16.2",
|
|
187
189
|
"eslint-plugin-wdio": "~9.27.1",
|
|
188
|
-
"execa": "~
|
|
190
|
+
"execa": "~9.6.1",
|
|
189
191
|
"express": "~4.22.1",
|
|
190
192
|
"express-static-gzip": "~2.2.0",
|
|
191
193
|
"fast-glob": "~3.3.3",
|
|
192
194
|
"favicons": "~7.2.0",
|
|
193
195
|
"favicons-webpack-plugin": "~6.0.1",
|
|
194
|
-
"find-up": "~
|
|
195
|
-
"find-up-cli": "~
|
|
196
|
-
"glob": "~
|
|
196
|
+
"find-up": "~8.0.0",
|
|
197
|
+
"find-up-cli": "~6.0.0",
|
|
198
|
+
"glob": "~13.0.6",
|
|
197
199
|
"globals": "~17.6.0",
|
|
198
200
|
"happy-dom": "~12.10.3",
|
|
199
201
|
"helmet": "~8.1.0",
|
|
200
202
|
"html-loader": "~4.2.0",
|
|
201
203
|
"html-webpack-plugin": "~5.6.7",
|
|
202
204
|
"http-server": "~14.1.1",
|
|
203
|
-
"husky": "~
|
|
204
|
-
"husky-init": "~8.0.0",
|
|
205
|
+
"husky": "~9.1.7",
|
|
205
206
|
"imports-loader": "~4.0.1",
|
|
206
207
|
"ip": "~1.1.9",
|
|
207
208
|
"jest-axe": "~7.0.1",
|
|
@@ -255,7 +256,6 @@
|
|
|
255
256
|
"style-loader": "~3.3.4",
|
|
256
257
|
"stylelint": "~17.12.0",
|
|
257
258
|
"stylelint-config-recommended": "~18.0.0",
|
|
258
|
-
"stylelint-config-styled-components": "~0.1.1",
|
|
259
259
|
"supertest": "~6.3.4",
|
|
260
260
|
"swc-loader": "~0.2.7",
|
|
261
261
|
"ts-node": "~10.9.2",
|
|
@@ -265,12 +265,12 @@
|
|
|
265
265
|
"typedoc": "~0.28.19",
|
|
266
266
|
"typescript": "5.9.3",
|
|
267
267
|
"typescript-eslint": "~8.59.4",
|
|
268
|
-
"update-notifier": "~
|
|
268
|
+
"update-notifier": "~7.3.1",
|
|
269
269
|
"url-loader": "~4.1.1",
|
|
270
|
-
"uuid": "~
|
|
271
|
-
"vite": "~
|
|
272
|
-
"vite-tsconfig-paths": "~
|
|
273
|
-
"vitest": "~1.
|
|
270
|
+
"uuid": "~14.0.0",
|
|
271
|
+
"vite": "~8.0.14",
|
|
272
|
+
"vite-tsconfig-paths": "~6.1.1",
|
|
273
|
+
"vitest": "~4.1.7",
|
|
274
274
|
"webpack": "~5.106.2",
|
|
275
275
|
"webpack-bundle-analyzer": "~4.10.2",
|
|
276
276
|
"webpack-cli": "~5.1.4",
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
"whatwg-fetch": "~3.6.20",
|
|
281
281
|
"workbox-webpack-plugin": "~6.6.1",
|
|
282
282
|
"ws": "~8.20.0",
|
|
283
|
-
"yargs": "~
|
|
283
|
+
"yargs": "~18.0.0"
|
|
284
284
|
},
|
|
285
285
|
"devDependencies": {
|
|
286
286
|
"@docusaurus/types": "~3.9.2",
|