@elliemae/pui-cli 9.0.0-alpha.1 → 9.0.0-alpha.11
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 +43 -0
- package/app.tsconfig.json +1 -1
- package/build/docs/404.html +16 -0
- package/build/docs/api/functions/loadRoutes/index.html +22 -0
- package/build/docs/api/index.html +22 -0
- package/build/docs/api/type-aliases/LIB_NAME/index.html +17 -0
- package/build/docs/api/variables/babelConfig/index.html +40 -0
- package/build/docs/api/variables/commitlintConfig/index.html +20 -0
- package/build/docs/api/variables/eslintBaseConfig/index.html +132 -0
- package/build/docs/api/variables/eslintConfig/index.html +180 -0
- package/build/docs/api/variables/eslintFlatBaseConfig/index.html +18 -0
- package/build/docs/api/variables/eslintFlatBaseConfigStrict/index.html +18 -0
- package/build/docs/api/variables/eslintFlatConfig/index.html +18 -0
- package/build/docs/api/variables/eslintFlatConfigStrict/index.html +18 -0
- package/build/docs/api/variables/jestConfig/index.html +98 -0
- package/build/docs/api/variables/jestNodeConfig/index.html +98 -0
- package/build/docs/api/variables/lintStagedConfig/index.html +24 -0
- package/build/docs/api/variables/prettierConfig/index.html +30 -0
- package/build/docs/api/variables/stylelintConfig/index.html +17 -0
- package/build/docs/api/variables/vitestConfig/index.html +17 -0
- package/build/docs/assets/css/styles.74603f39.css +1 -0
- package/build/docs/assets/js/04ee7372.eaa386ed.js +1 -0
- package/build/docs/assets/js/0551d4dd.ebb18f4f.js +1 -0
- package/build/docs/assets/js/0a1d0315.fc8f91a7.js +1 -0
- package/build/docs/assets/js/1126.fa547e9c.js +1 -0
- package/build/docs/assets/js/1127.f28430e6.js +1 -0
- package/build/docs/assets/js/1298.fb0939c9.js +1 -0
- package/build/docs/assets/js/13097d8d.af480dfd.js +1 -0
- package/build/docs/assets/js/1617.b2623271.js +1 -0
- package/build/docs/assets/js/16b7bc88.c3779e27.js +1 -0
- package/build/docs/assets/js/1700.4f7a9007.js +1 -0
- package/build/docs/assets/js/17896441.84339068.js +1 -0
- package/build/docs/assets/js/1b9df811.aaa95da1.js +1 -0
- package/build/docs/assets/js/213.e69351b3.js +1 -0
- package/build/docs/assets/js/2297.e63290f4.js +1 -0
- package/build/docs/assets/js/232a0286.33b2782b.js +1 -0
- package/build/docs/assets/js/2399.cc5803e0.js +1 -0
- package/build/docs/assets/js/242.73516ab6.js +1 -0
- package/build/docs/assets/js/247.e1522e52.js +1 -0
- package/build/docs/assets/js/2673.da75a556.js +1 -0
- package/build/docs/assets/js/2805.f0505f8c.js +1 -0
- package/build/docs/assets/js/3395.eb3dad5b.js +1 -0
- package/build/docs/assets/js/3499.2d5c6821.js +1 -0
- package/build/docs/assets/js/3552.9272c0d9.js +1 -0
- package/build/docs/assets/js/3720.8e7f36d4.js +2 -0
- package/build/docs/assets/js/3720.8e7f36d4.js.LICENSE.txt +9 -0
- package/build/docs/assets/js/37d86055.47211796.js +1 -0
- package/build/docs/assets/js/3992.0ac29b2f.js +2 -0
- package/build/docs/assets/js/3992.0ac29b2f.js.LICENSE.txt +1 -0
- package/build/docs/assets/js/4069.301f1115.js +1 -0
- package/build/docs/assets/js/4134.553b3645.js +1 -0
- package/build/docs/assets/js/4257.9afce6ac.js +1 -0
- package/build/docs/assets/js/4772.6294b364.js +1 -0
- package/build/docs/assets/js/4884.9dbe23e5.js +1 -0
- package/build/docs/assets/js/4fb6949f.369cc1b9.js +1 -0
- package/build/docs/assets/js/5196.98f7e06a.js +1 -0
- package/build/docs/assets/js/5248.ee436cea.js +1 -0
- package/build/docs/assets/js/5428.71752e9a.js +1 -0
- package/build/docs/assets/js/5964.0728ed91.js +1 -0
- package/build/docs/assets/js/5968.5f4ccba7.js +1 -0
- package/build/docs/assets/js/5befad71.5f19afb5.js +1 -0
- package/build/docs/assets/js/5d5f1db0.c5aa5afa.js +1 -0
- package/build/docs/assets/js/5e8c322a.ef3b894b.js +1 -0
- package/build/docs/assets/js/5e95c892.f550b901.js +1 -0
- package/build/docs/assets/js/5fb3c522.da5628e8.js +1 -0
- package/build/docs/assets/js/6486.68ae0007.js +1 -0
- package/build/docs/assets/js/6704.2615a5c6.js +1 -0
- package/build/docs/assets/js/6bd11e52.08b95209.js +1 -0
- package/build/docs/assets/js/6e96545e.30c1b801.js +1 -0
- package/build/docs/assets/js/7080.efd5ba6c.js +1 -0
- package/build/docs/assets/js/71f6d02b.cfd98385.js +1 -0
- package/build/docs/assets/js/7201.e90ba636.js +1 -0
- package/build/docs/assets/js/7344.95656e38.js +1 -0
- package/build/docs/assets/js/7516.b6668d60.js +1 -0
- package/build/docs/assets/js/7525.a8d0db87.js +1 -0
- package/build/docs/assets/js/7540.7a4353cf.js +1 -0
- package/build/docs/assets/js/7985.8c6943d6.js +1 -0
- package/build/docs/assets/js/8049.8ba75278.js +1 -0
- package/build/docs/assets/js/80e87108.f9507b95.js +1 -0
- package/build/docs/assets/js/8152.f2bebb2f.js +1 -0
- package/build/docs/assets/js/821.8d4e2a80.js +1 -0
- package/build/docs/assets/js/8290.a4f7a2ca.js +1 -0
- package/build/docs/assets/js/8355.864847a1.js +1 -0
- package/build/docs/assets/js/8389.26a9caca.js +1 -0
- package/build/docs/assets/js/8585.3cb09ff7.js +1 -0
- package/build/docs/assets/js/8788.03856709.js +1 -0
- package/build/docs/assets/js/9178.50ac2954.js +1 -0
- package/build/docs/assets/js/9210.1ac21da8.js +1 -0
- package/build/docs/assets/js/9354.37ad86f9.js +1 -0
- package/build/docs/assets/js/936.c151b43f.js +1 -0
- package/build/docs/assets/js/9574.b172d607.js +1 -0
- package/build/docs/assets/js/97.70eddfb5.js +1 -0
- package/build/docs/assets/js/9852.f77caf52.js +1 -0
- package/build/docs/assets/js/9953.f6278635.js +1 -0
- package/build/docs/assets/js/a7bd4aaa.30ffad02.js +1 -0
- package/build/docs/assets/js/a94703ab.f1796514.js +1 -0
- package/build/docs/assets/js/aba21aa0.3bbcf0cc.js +1 -0
- package/build/docs/assets/js/b7b585d8.6d53e73f.js +1 -0
- package/build/docs/assets/js/b8ac1d98.62684003.js +1 -0
- package/build/docs/assets/js/bde5209a.f5bca8b2.js +1 -0
- package/build/docs/assets/js/c377a04b.0f8625c6.js +1 -0
- package/build/docs/assets/js/dfd75424.51c4e2cb.js +1 -0
- package/build/docs/assets/js/e5f79924.c793a74d.js +1 -0
- package/build/docs/assets/js/f736c962.dbd0d004.js +1 -0
- package/build/docs/assets/js/main.7f815b7e.js +2 -0
- package/build/docs/assets/js/main.7f815b7e.js.LICENSE.txt +51 -0
- package/build/docs/assets/js/runtime~main.f7c5bef0.js +1 -0
- package/build/docs/eslint-rules-migration/index.html +135 -0
- package/build/docs/img/favicon.ico +0 -0
- package/build/docs/img/logo.jpeg +0 -0
- package/build/docs/img/logo.svg +22 -0
- package/build/docs/img/readme.md +1 -0
- package/build/docs/index.html +179 -0
- package/build/docs/pui-cli-9-migration/index.html +180 -0
- package/build/docs/readme.md +1 -0
- package/build/docs/sitemap.xml +1 -0
- package/build/docs/ssl-certificate-setup/index.html +284 -0
- package/build/docs/stylelint-migration/index.html +57 -0
- package/build/docs/usage-guide/index.html +439 -0
- package/dist/cjs/cli.js +3 -13
- 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 +206 -0
- package/dist/cjs/commands/start.js +1 -2
- package/dist/cjs/commands/storybook.js +1 -12
- package/dist/cjs/commands/test.js +1 -13
- package/dist/cjs/commands/tscheck.js +1 -2
- package/dist/cjs/commands/utils.js +16 -12
- package/dist/cjs/commands/version.js +1 -12
- package/dist/cjs/commands/vitest.js +1 -13
- package/dist/cjs/index.cjs +13 -1
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/lint-config/eslint/common.cjs +1 -1
- package/dist/cjs/lint-config/eslint/flat/common.mjs +169 -0
- package/dist/cjs/lint-config/eslint/flat/compat.mjs +27 -0
- package/dist/cjs/lint-config/eslint/flat/index.mjs +21 -0
- package/dist/cjs/lint-config/eslint/flat/non-react-export.mjs +10 -0
- package/dist/cjs/lint-config/eslint/flat/non-react.mjs +6 -0
- package/dist/cjs/lint-config/eslint/flat/presets.mjs +96 -0
- package/dist/cjs/lint-config/eslint/flat/react-export.mjs +7 -0
- package/dist/cjs/lint-config/eslint/flat/react.mjs +59 -0
- package/dist/cjs/lint-config/eslint/flat/rules.mjs +185 -0
- package/dist/cjs/lint-config/eslint/typescript/non-react.cjs +1 -1
- package/dist/cjs/lint-config/eslint/typescript/react.cjs +1 -1
- 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 +16 -8
- package/dist/cjs/monorepo/utils.js +5 -8
- package/dist/cjs/{release.config.cjs → release.config.mjs} +3 -2
- package/dist/cjs/{semantic-release-plugin.cjs → semantic-release-plugin.mjs} +3 -3
- package/dist/cjs/skills/migrate-to-pui-cli-9/SKILL.md +309 -0
- package/dist/cjs/testing/jest.config.cjs +4 -4
- package/dist/cjs/testing/resolver.cjs +1 -1
- package/dist/cjs/testing/setup-react-env.js +1 -1
- package/dist/cjs/testing/vitest.config.js +2 -1
- package/dist/cjs/transpile/esbuild.js +1 -1
- package/dist/cjs/webpack/csp-plugin.js +2 -4
- package/dist/cjs/webpack/prop-types-shim.js +0 -1
- package/dist/cjs/webpack/webpack.lib.base.babel.js +0 -8
- package/dist/esm/cli.js +3 -13
- 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 +175 -0
- package/dist/esm/commands/start.js +1 -2
- package/dist/esm/commands/storybook.js +1 -2
- package/dist/esm/commands/test.js +1 -3
- package/dist/esm/commands/tscheck.js +1 -2
- package/dist/esm/commands/utils.js +17 -13
- package/dist/esm/commands/version.js +1 -2
- package/dist/esm/commands/vitest.js +1 -3
- package/dist/esm/index.cjs +13 -1
- package/dist/esm/index.js +13 -1
- package/dist/esm/lint-config/eslint/common.cjs +1 -1
- package/dist/esm/lint-config/eslint/flat/common.mjs +169 -0
- package/dist/esm/lint-config/eslint/flat/compat.mjs +27 -0
- package/dist/esm/lint-config/eslint/flat/index.mjs +21 -0
- package/dist/esm/lint-config/eslint/flat/non-react-export.mjs +10 -0
- package/dist/esm/lint-config/eslint/flat/non-react.mjs +6 -0
- package/dist/esm/lint-config/eslint/flat/presets.mjs +96 -0
- package/dist/esm/lint-config/eslint/flat/react-export.mjs +7 -0
- package/dist/esm/lint-config/eslint/flat/react.mjs +59 -0
- package/dist/esm/lint-config/eslint/flat/rules.mjs +185 -0
- package/dist/esm/lint-config/eslint/typescript/non-react.cjs +1 -1
- package/dist/esm/lint-config/eslint/typescript/react.cjs +1 -1
- 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 +16 -8
- package/dist/esm/monorepo/utils.js +5 -8
- package/dist/esm/{release.config.cjs → release.config.mjs} +3 -2
- package/dist/esm/{semantic-release-plugin.cjs → semantic-release-plugin.mjs} +3 -3
- package/dist/esm/skills/migrate-to-pui-cli-9/SKILL.md +309 -0
- package/dist/esm/testing/jest.config.cjs +4 -4
- package/dist/esm/testing/resolver.cjs +1 -1
- package/dist/esm/testing/setup-react-env.js +1 -1
- package/dist/esm/testing/vitest.config.js +2 -1
- package/dist/esm/transpile/esbuild.js +1 -1
- package/dist/esm/webpack/csp-plugin.js +2 -4
- package/dist/esm/webpack/prop-types-shim.js +0 -1
- package/dist/esm/webpack/webpack.lib.base.babel.js +0 -8
- 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 +11 -0
- 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 +6 -2
- package/dist/types/lib/index.d.ts +5 -1
- package/dist/types/lib/lint-config/eslint/flat/common.d.mts +6 -0
- package/dist/types/lib/lint-config/eslint/flat/compat.d.mts +9 -0
- package/dist/types/lib/lint-config/eslint/flat/index.d.mts +6 -0
- package/dist/types/lib/lint-config/eslint/flat/non-react-export.d.mts +4 -0
- package/dist/types/lib/lint-config/eslint/flat/non-react.d.mts +3 -0
- package/dist/types/lib/lint-config/eslint/flat/presets.d.mts +34 -0
- package/dist/types/lib/lint-config/eslint/flat/react-export.d.mts +4 -0
- package/dist/types/lib/lint-config/eslint/flat/react.d.mts +4 -0
- package/dist/types/lib/lint-config/eslint/flat/rules.d.mts +361 -0
- 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/lib/release.config.d.mts +10 -0
- package/dist/types/lib/semantic-release-plugin.d.mts +4 -0
- package/dist/types/lib/server/appRoutes.d.ts +1 -1
- package/dist/types/lib/server/csp.d.ts +1 -1
- package/dist/types/lib/server/middlewares.d.ts +1 -1
- package/dist/types/lib/webpack/csp-plugin.d.ts +3 -3
- package/dist/types/lib/webpack/helpers.d.ts +1 -1
- package/dist/types/lib/webpack/interceptor-middleware.d.ts +2 -2
- package/dist/types/lib/webpack/webpack.base.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.lib.base.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.lib.prod.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.prod.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.storybook.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/lib/lint-config/commitlint.config.cjs +1 -0
- package/lib/lint-config/eslint/common.cjs +164 -0
- package/lib/lint-config/eslint/flat/common.mjs +169 -0
- package/lib/lint-config/eslint/flat/compat.mjs +27 -0
- package/lib/lint-config/eslint/flat/index.mjs +21 -0
- package/lib/lint-config/eslint/flat/non-react-export.mjs +10 -0
- package/lib/lint-config/eslint/flat/non-react.mjs +6 -0
- package/lib/lint-config/eslint/flat/presets.mjs +96 -0
- package/lib/lint-config/eslint/flat/react-export.mjs +7 -0
- package/lib/lint-config/eslint/flat/react.mjs +59 -0
- package/lib/lint-config/eslint/flat/rules.mjs +185 -0
- package/lib/lint-config/eslint/non-react.cjs +14 -0
- package/lib/lint-config/eslint/react.cjs +26 -0
- package/lib/lint-config/eslint/typescript/common.cjs +49 -0
- package/lib/lint-config/eslint/typescript/non-react.cjs +12 -0
- package/lib/lint-config/eslint/typescript/react.cjs +19 -0
- package/lib/lint-config/lint-staged.config.js +15 -0
- package/lib/lint-config/prettier.config.cjs +8 -0
- 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 -0
- package/lib/release.config.mjs +28 -0
- package/lib/semantic-release-plugin.mjs +30 -0
- package/lib/skills/migrate-to-pui-cli-9/SKILL.md +309 -0
- package/library.tsconfig.json +1 -1
- package/package.json +95 -90
- package/dist/types/lib/release.config.d.cts +0 -7
- package/dist/types/lib/semantic-release-plugin.d.cts +0 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,21 +15,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var vitest_exports = {};
|
|
30
20
|
__export(vitest_exports, {
|
|
31
21
|
vitestCmd: () => vitestCmd
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(vitest_exports);
|
|
34
|
-
var import_yargs = __toESM(require("yargs"), 1);
|
|
35
24
|
var import_utils = require("./utils.js");
|
|
36
25
|
const test = async (commandOptions) => {
|
|
37
26
|
await (0, import_utils.exec)(`vitest ${commandOptions}`);
|
|
@@ -64,7 +53,6 @@ const cmdArgs = {
|
|
|
64
53
|
}
|
|
65
54
|
};
|
|
66
55
|
const vitestCmd = {
|
|
67
|
-
// eslint-disable-next-line max-statements
|
|
68
56
|
handler: async (argv) => {
|
|
69
57
|
let commandOptions = "--coverage";
|
|
70
58
|
if (argv.fix) commandOptions = "-u";
|
|
@@ -80,7 +68,7 @@ const vitestCmd = {
|
|
|
80
68
|
(0, import_utils.logSuccess)("Unit test execution completed");
|
|
81
69
|
} catch (err) {
|
|
82
70
|
(0, import_utils.logError)("Unit test execution failed", err);
|
|
83
|
-
|
|
71
|
+
process.exit(1);
|
|
84
72
|
}
|
|
85
73
|
},
|
|
86
74
|
command: "vitest [options]",
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
const { babelConfig } = require('./babel.config.cjs');
|
|
2
|
+
const {
|
|
3
|
+
eslintFlatBaseConfig,
|
|
4
|
+
eslintFlatBaseConfigStrict,
|
|
5
|
+
} = require('./lint-config/eslint/flat/non-react-export.mjs');
|
|
6
|
+
const {
|
|
7
|
+
eslintFlatConfig,
|
|
8
|
+
eslintFlatConfigStrict,
|
|
9
|
+
} = require('./lint-config/eslint/flat/react-export.mjs');
|
|
2
10
|
const {
|
|
3
11
|
esConfig: eslintBaseConfig,
|
|
4
12
|
} = require('./lint-config/eslint/non-react.cjs');
|
|
5
13
|
const {
|
|
6
14
|
esReactConfig: eslintConfig,
|
|
7
15
|
} = require('./lint-config/eslint/react.cjs');
|
|
8
|
-
const { stylelintConfig } = require('./lint-config/stylelint.
|
|
16
|
+
const { stylelintConfig } = require('./lint-config/stylelint/export.mjs');
|
|
9
17
|
const { prettierConfig } = require('./lint-config/prettier.config.cjs');
|
|
10
18
|
const { commitlintConfig } = require('./lint-config/commitlint.config.cjs');
|
|
11
19
|
const { jestConfig } = require('./testing/jest.config.cjs');
|
|
@@ -13,6 +21,10 @@ const { jestNodeConfig } = require('./testing/jest.node.config.cjs');
|
|
|
13
21
|
|
|
14
22
|
module.exports = {
|
|
15
23
|
babelConfig,
|
|
24
|
+
eslintFlatBaseConfig,
|
|
25
|
+
eslintFlatBaseConfigStrict,
|
|
26
|
+
eslintFlatConfig,
|
|
27
|
+
eslintFlatConfigStrict,
|
|
16
28
|
eslintBaseConfig,
|
|
17
29
|
eslintConfig,
|
|
18
30
|
stylelintConfig,
|
package/dist/cjs/index.js
CHANGED
|
@@ -22,19 +22,25 @@ __export(index_exports, {
|
|
|
22
22
|
commitlintConfig: () => import_commitlint_config.commitlintConfig,
|
|
23
23
|
eslintBaseConfig: () => import_non_react.esConfig,
|
|
24
24
|
eslintConfig: () => import_react.esReactConfig,
|
|
25
|
+
eslintFlatBaseConfig: () => import_non_react_export.eslintFlatBaseConfig,
|
|
26
|
+
eslintFlatBaseConfigStrict: () => import_non_react_export.eslintFlatBaseConfigStrict,
|
|
27
|
+
eslintFlatConfig: () => import_react_export.eslintFlatConfig,
|
|
28
|
+
eslintFlatConfigStrict: () => import_react_export.eslintFlatConfigStrict,
|
|
25
29
|
jestConfig: () => import_jest_config.jestConfig,
|
|
26
30
|
jestNodeConfig: () => import_jest_node_config.jestNodeConfig,
|
|
27
31
|
lintStagedConfig: () => import_lint_staged_config.lintStagedConfig,
|
|
28
32
|
loadRoutes: () => import_appRoutes.loadRoutes,
|
|
29
33
|
prettierConfig: () => import_prettier_config.prettierConfig,
|
|
30
|
-
stylelintConfig: () =>
|
|
34
|
+
stylelintConfig: () => import_export.stylelintConfig,
|
|
31
35
|
vitestConfig: () => import_vitest_config.vitestConfig
|
|
32
36
|
});
|
|
33
37
|
module.exports = __toCommonJS(index_exports);
|
|
34
38
|
var import_babel_config = require("./babel.config.cjs");
|
|
39
|
+
var import_non_react_export = require("./lint-config/eslint/flat/non-react-export.mjs");
|
|
40
|
+
var import_react_export = require("./lint-config/eslint/flat/react-export.mjs");
|
|
35
41
|
var import_non_react = require("./lint-config/eslint/non-react.cjs");
|
|
36
42
|
var import_react = require("./lint-config/eslint/react.cjs");
|
|
37
|
-
var
|
|
43
|
+
var import_export = require("./lint-config/stylelint/export.mjs");
|
|
38
44
|
var import_prettier_config = require("./lint-config/prettier.config.cjs");
|
|
39
45
|
var import_commitlint_config = require("./lint-config/commitlint.config.cjs");
|
|
40
46
|
var import_jest_config = require("./testing/jest.config.cjs");
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import { defineConfig } from 'eslint/config';
|
|
3
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
4
|
+
import importX from 'eslint-plugin-import-x';
|
|
5
|
+
import jest from 'eslint-plugin-jest';
|
|
6
|
+
import testingLibrary from 'eslint-plugin-testing-library';
|
|
7
|
+
import globals from 'globals';
|
|
8
|
+
import tseslint from 'typescript-eslint';
|
|
9
|
+
import {
|
|
10
|
+
jestRecommendedRules,
|
|
11
|
+
sharedCoreRules,
|
|
12
|
+
testFiles,
|
|
13
|
+
testFixtureFiles,
|
|
14
|
+
testJsxFiles,
|
|
15
|
+
testingLibraryDomRules,
|
|
16
|
+
testingLibraryReactRules,
|
|
17
|
+
wdioGlobals,
|
|
18
|
+
wdioPlugin,
|
|
19
|
+
wdioRecommendedRules,
|
|
20
|
+
wdioSpecFiles,
|
|
21
|
+
} from './presets.mjs';
|
|
22
|
+
import {
|
|
23
|
+
ignorePatterns,
|
|
24
|
+
jsRules,
|
|
25
|
+
typescriptRules,
|
|
26
|
+
typescriptStrictRules,
|
|
27
|
+
testFixtureRelaxedRules,
|
|
28
|
+
typescriptTestRelaxedRules,
|
|
29
|
+
} from './rules.mjs';
|
|
30
|
+
|
|
31
|
+
const tsconfigRootDir = process.cwd();
|
|
32
|
+
|
|
33
|
+
const typescriptParserOptions = {
|
|
34
|
+
projectService: true,
|
|
35
|
+
tsconfigRootDir,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** Cached flat config arrays (only two variants: default + strict). */
|
|
39
|
+
const configCache = new Map();
|
|
40
|
+
|
|
41
|
+
/** @param {Record<string, unknown>} tsRules - `typescriptRules` or `typescriptStrictRules` */
|
|
42
|
+
export function createBaseFlatConfigs(tsRules) {
|
|
43
|
+
if (configCache.has(tsRules)) {
|
|
44
|
+
return configCache.get(tsRules);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const config = defineConfig(
|
|
48
|
+
{ ignores: ignorePatterns },
|
|
49
|
+
eslint.configs.recommended,
|
|
50
|
+
eslintConfigPrettier,
|
|
51
|
+
{
|
|
52
|
+
plugins: {
|
|
53
|
+
'import-x': importX,
|
|
54
|
+
},
|
|
55
|
+
languageOptions: {
|
|
56
|
+
ecmaVersion: 'latest',
|
|
57
|
+
sourceType: 'module',
|
|
58
|
+
parserOptions: {
|
|
59
|
+
ecmaFeatures: { jsx: true },
|
|
60
|
+
},
|
|
61
|
+
globals: {
|
|
62
|
+
...globals.browser,
|
|
63
|
+
...globals.node,
|
|
64
|
+
...globals.es2021,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
settings: {
|
|
68
|
+
'import-x/resolver': {
|
|
69
|
+
node: { extensions: ['.js', '.jsx', '.ts', '.tsx'] },
|
|
70
|
+
typescript: { alwaysTryTypes: true },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
rules: sharedCoreRules,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
files: ['**/*.{js,jsx,mjs,cjs}'],
|
|
77
|
+
rules: jsRules,
|
|
78
|
+
},
|
|
79
|
+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
|
|
80
|
+
...config,
|
|
81
|
+
files: ['**/*.{ts,tsx}'],
|
|
82
|
+
})),
|
|
83
|
+
{
|
|
84
|
+
files: ['**/*.{ts,tsx}'],
|
|
85
|
+
rules: tsRules,
|
|
86
|
+
languageOptions: {
|
|
87
|
+
parserOptions: typescriptParserOptions,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
files: testFiles,
|
|
92
|
+
plugins: {
|
|
93
|
+
jest,
|
|
94
|
+
'testing-library': testingLibrary,
|
|
95
|
+
},
|
|
96
|
+
languageOptions: {
|
|
97
|
+
globals: globals.jest,
|
|
98
|
+
},
|
|
99
|
+
settings: {
|
|
100
|
+
jest: { version: 'detect' },
|
|
101
|
+
},
|
|
102
|
+
rules: {
|
|
103
|
+
...jestRecommendedRules,
|
|
104
|
+
...testingLibraryDomRules,
|
|
105
|
+
'testing-library/no-node-access': 'off',
|
|
106
|
+
...typescriptTestRelaxedRules,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
files: testJsxFiles,
|
|
111
|
+
rules: {
|
|
112
|
+
...testingLibraryReactRules,
|
|
113
|
+
'testing-library/no-node-access': 'off',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
files: testFixtureFiles,
|
|
118
|
+
rules: testFixtureRelaxedRules,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
files: wdioSpecFiles,
|
|
122
|
+
plugins: { wdio: wdioPlugin, jest },
|
|
123
|
+
languageOptions: { globals: wdioGlobals },
|
|
124
|
+
rules: {
|
|
125
|
+
...wdioRecommendedRules,
|
|
126
|
+
// JS e2e specs are not type-checked; use await-expect instead of no-floating-promise.
|
|
127
|
+
'wdio/await-expect': 'error',
|
|
128
|
+
'wdio/no-floating-promise': 'off',
|
|
129
|
+
'jest/valid-expect': 'off',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
files: ['**/eslint.config.{mjs,cjs,js}'],
|
|
134
|
+
rules: { 'import-x/no-unresolved': 'off' },
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
files: ['**/scripts/**', '**/ci_cd/**'],
|
|
138
|
+
rules: {
|
|
139
|
+
'no-console': 'off',
|
|
140
|
+
'max-lines': 'off',
|
|
141
|
+
complexity: 'off',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
files: ['**/lint-config/**'],
|
|
146
|
+
rules: {
|
|
147
|
+
'max-lines': 'off',
|
|
148
|
+
'import-x/no-named-as-default-member': 'off',
|
|
149
|
+
'import-x/default': 'off',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
files: ['**/*.d.ts'],
|
|
154
|
+
rules: {
|
|
155
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
156
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
configCache.set(tsRules, config);
|
|
162
|
+
return config;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** Default flat base — `no-unsafe-*` as warn in application TypeScript. */
|
|
166
|
+
export const baseFlatConfigs = createBaseFlatConfigs(typescriptRules);
|
|
167
|
+
|
|
168
|
+
/** Strict flat base — `no-unsafe-*` as error in application TypeScript. */
|
|
169
|
+
export const baseFlatConfigsStrict = createBaseFlatConfigs(typescriptStrictRules);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESLint 10 removed deprecated context APIs (e.g. getSourceCode, getScope, getFilename).
|
|
3
|
+
* Wrap legacy plugins via @eslint/compat v2 (ESLint 10–aware fixupPluginRules).
|
|
4
|
+
*/
|
|
5
|
+
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
|
|
6
|
+
import react from 'eslint-plugin-react';
|
|
7
|
+
import reduxSaga from 'eslint-plugin-redux-saga';
|
|
8
|
+
import storybook from 'eslint-plugin-storybook';
|
|
9
|
+
|
|
10
|
+
const storybookFlat =
|
|
11
|
+
storybook.configs['flat/recommended'] ??
|
|
12
|
+
storybook.configs.recommended ??
|
|
13
|
+
[];
|
|
14
|
+
|
|
15
|
+
/** React — uses context.getFilename / getScope (eslint-plugin-react@7). */
|
|
16
|
+
/** @type {import('eslint').ESLint.Plugin} */
|
|
17
|
+
export const reactPlugin = fixupPluginRules(react);
|
|
18
|
+
|
|
19
|
+
/** Redux-saga — uses context.getScope in no-yield-in-race. */
|
|
20
|
+
/** @type {import('eslint').ESLint.Plugin} */
|
|
21
|
+
export const reduxSagaPlugin = fixupPluginRules(reduxSaga);
|
|
22
|
+
|
|
23
|
+
/** Storybook flat presets — uses legacy context APIs (eslint-plugin-storybook@0.12). */
|
|
24
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
25
|
+
export const storybookFlatConfigs = fixupConfigRules(
|
|
26
|
+
Array.isArray(storybookFlat) ? storybookFlat : [storybookFlat],
|
|
27
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { eslintFlatConfig, eslintFlatConfigStrict } from './react-export.mjs';
|
|
2
|
+
export {
|
|
3
|
+
eslintFlatBaseConfig,
|
|
4
|
+
eslintFlatBaseConfigStrict,
|
|
5
|
+
} from './non-react-export.mjs';
|
|
6
|
+
export { reactFlatConfigs, reactFlatConfigsStrict } from './react.mjs';
|
|
7
|
+
export {
|
|
8
|
+
nonReactFlatConfigs,
|
|
9
|
+
nonReactFlatConfigsStrict,
|
|
10
|
+
} from './non-react.mjs';
|
|
11
|
+
export {
|
|
12
|
+
baseFlatConfigs,
|
|
13
|
+
baseFlatConfigsStrict,
|
|
14
|
+
createBaseFlatConfigs,
|
|
15
|
+
} from './common.mjs';
|
|
16
|
+
export {
|
|
17
|
+
storybookFiles,
|
|
18
|
+
testFiles,
|
|
19
|
+
testFixtureFiles,
|
|
20
|
+
testJsxFiles,
|
|
21
|
+
} from './presets.mjs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
nonReactFlatConfigs,
|
|
3
|
+
nonReactFlatConfigsStrict,
|
|
4
|
+
} from './non-react.mjs';
|
|
5
|
+
|
|
6
|
+
/** Flat ESLint config for non-React TypeScript libraries and services. */
|
|
7
|
+
export const eslintFlatBaseConfig = nonReactFlatConfigs;
|
|
8
|
+
|
|
9
|
+
/** Strict flat ESLint config for non-React TypeScript (`no-unsafe-*` as error). */
|
|
10
|
+
export const eslintFlatBaseConfigStrict = nonReactFlatConfigsStrict;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset rule bundles and file globs computed once at module load (not per config factory call).
|
|
3
|
+
*/
|
|
4
|
+
import importX from 'eslint-plugin-import-x';
|
|
5
|
+
import jest from 'eslint-plugin-jest';
|
|
6
|
+
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
7
|
+
import react from 'eslint-plugin-react';
|
|
8
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
9
|
+
import reduxSaga from 'eslint-plugin-redux-saga';
|
|
10
|
+
import testingLibrary from 'eslint-plugin-testing-library';
|
|
11
|
+
import wdio from 'eslint-plugin-wdio';
|
|
12
|
+
import { storybookFlatConfigs } from './compat.mjs';
|
|
13
|
+
|
|
14
|
+
/** Application and integration tests (Jest + relaxed type-checked rules). */
|
|
15
|
+
export const testFiles = [
|
|
16
|
+
'**/*.{test,spec}.{js,jsx,ts,tsx}',
|
|
17
|
+
'**/__tests__/**',
|
|
18
|
+
'**/lib/testing/**',
|
|
19
|
+
'**/mocks/**',
|
|
20
|
+
// PUI libs/apps co-locate tests under lib/ (e.g. pui-app-sdk, pui-app-loader).
|
|
21
|
+
'lib/**/tests/**',
|
|
22
|
+
'app/**/tests/**',
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generated or vendored JS under test trees (checksum bundles, MSW endpoints, pinned assets).
|
|
27
|
+
* Not maintained source — relax structural rules only.
|
|
28
|
+
*/
|
|
29
|
+
export const testFixtureFiles = [
|
|
30
|
+
'**/*.checksum*.js',
|
|
31
|
+
'**/*.endpoint.js',
|
|
32
|
+
'**/tests/**/latest/*.{js,cjs,mjs}',
|
|
33
|
+
'**/tests/**/[0-9]*.[0-9]*/*.{js,cjs,mjs}',
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export const testJsxFiles = ['**/*.{test,spec}.{jsx,tsx}'];
|
|
37
|
+
|
|
38
|
+
export const wdioSpecFiles = [
|
|
39
|
+
'**/*.func.spec.js',
|
|
40
|
+
'**/*.visual.spec.js',
|
|
41
|
+
'**/*e2e*.{js,ts}',
|
|
42
|
+
'**/e2e/**',
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
export const storybookFiles = [
|
|
46
|
+
'**/*.stories.{js,jsx,ts,tsx}',
|
|
47
|
+
'**/.storybook/**',
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
51
|
+
export const sharedCoreRules = {
|
|
52
|
+
...importX.configs.recommended.rules,
|
|
53
|
+
'import-x/named': 'off',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
57
|
+
export const jestRecommendedRules = jest.configs.recommended.rules;
|
|
58
|
+
|
|
59
|
+
const testingLibraryDom =
|
|
60
|
+
testingLibrary.configs['flat/dom'] ?? testingLibrary.configs.dom;
|
|
61
|
+
const testingLibraryReact =
|
|
62
|
+
testingLibrary.configs['flat/react'] ?? testingLibrary.configs.react;
|
|
63
|
+
|
|
64
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
65
|
+
export const testingLibraryDomRules = testingLibraryDom?.rules ?? {};
|
|
66
|
+
|
|
67
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
68
|
+
export const testingLibraryReactRules = testingLibraryReact?.rules ?? {};
|
|
69
|
+
|
|
70
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
71
|
+
export const reactPresetRules = {
|
|
72
|
+
...react.configs.recommended.rules,
|
|
73
|
+
...reactHooks.configs.recommended.rules,
|
|
74
|
+
...jsxA11y.flatConfigs.recommended.rules,
|
|
75
|
+
...reduxSaga.configs.recommended.rules,
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* eslint-plugin-wdio v9 default export exposes config severities as `rules` when
|
|
80
|
+
* typescript-eslint is installed. Use flat/recommended's nested plugin instead.
|
|
81
|
+
*/
|
|
82
|
+
const wdioFlatRecommended =
|
|
83
|
+
wdio.configs['flat/recommended'] ?? wdio.configs.recommended;
|
|
84
|
+
|
|
85
|
+
export const wdioPlugin = wdioFlatRecommended.plugins?.wdio ?? wdio;
|
|
86
|
+
|
|
87
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
88
|
+
export const wdioRecommendedRules = wdioFlatRecommended.rules ?? {};
|
|
89
|
+
|
|
90
|
+
/** @type {Record<string, boolean>} */
|
|
91
|
+
export const wdioGlobals =
|
|
92
|
+
wdioFlatRecommended.languageOptions?.globals ??
|
|
93
|
+
wdio.configs.recommended.globals ??
|
|
94
|
+
{};
|
|
95
|
+
|
|
96
|
+
export { storybookFlatConfigs };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { reactFlatConfigs, reactFlatConfigsStrict } from './react.mjs';
|
|
2
|
+
|
|
3
|
+
/** Flat ESLint config for React + TypeScript PUI apps. */
|
|
4
|
+
export const eslintFlatConfig = reactFlatConfigs;
|
|
5
|
+
|
|
6
|
+
/** Strict flat ESLint config for React + TypeScript (errors on `no-unsafe-*` and `exhaustive-deps`). */
|
|
7
|
+
export const eslintFlatConfigStrict = reactFlatConfigsStrict;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineConfig } from 'eslint/config';
|
|
2
|
+
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
|
+
import { baseFlatConfigs, baseFlatConfigsStrict } from './common.mjs';
|
|
5
|
+
import { reactPlugin, reduxSagaPlugin } from './compat.mjs';
|
|
6
|
+
import {
|
|
7
|
+
reactPresetRules,
|
|
8
|
+
storybookFiles,
|
|
9
|
+
storybookFlatConfigs,
|
|
10
|
+
} from './presets.mjs';
|
|
11
|
+
import { reactRules, reactStrictRules } from './rules.mjs';
|
|
12
|
+
|
|
13
|
+
const reactPluginBlock = {
|
|
14
|
+
plugins: {
|
|
15
|
+
react: reactPlugin,
|
|
16
|
+
'react-hooks': reactHooks,
|
|
17
|
+
'jsx-a11y': jsxA11y,
|
|
18
|
+
'redux-saga': reduxSagaPlugin,
|
|
19
|
+
},
|
|
20
|
+
settings: {
|
|
21
|
+
react: { version: 'detect' },
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {import('eslint').Linter.Config[]} baseConfigs
|
|
27
|
+
* @param {typeof reactRules} puiReactRules
|
|
28
|
+
*/
|
|
29
|
+
function createReactFlatConfigs(baseConfigs, puiReactRules) {
|
|
30
|
+
return defineConfig(
|
|
31
|
+
...baseConfigs,
|
|
32
|
+
{
|
|
33
|
+
...reactPluginBlock,
|
|
34
|
+
rules: {
|
|
35
|
+
...reactPresetRules,
|
|
36
|
+
...puiReactRules,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
...storybookFlatConfigs,
|
|
40
|
+
{
|
|
41
|
+
files: storybookFiles,
|
|
42
|
+
rules: {
|
|
43
|
+
'react/jsx-props-no-spreading': 'off',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Default React flat config — migration-friendly type-safety warnings. */
|
|
50
|
+
export const reactFlatConfigs = createReactFlatConfigs(
|
|
51
|
+
baseFlatConfigs,
|
|
52
|
+
reactRules,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
/** Strict React flat config — `no-unsafe-*` and `exhaustive-deps` as error. */
|
|
56
|
+
export const reactFlatConfigsStrict = createReactFlatConfigs(
|
|
57
|
+
baseFlatConfigsStrict,
|
|
58
|
+
reactStrictRules,
|
|
59
|
+
);
|