@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
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/** Shared rule sets migrated from legacy eslintrc (common.cjs + typescript/*.cjs). */
|
|
2
|
+
|
|
3
|
+
export const baseRules = {
|
|
4
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
5
|
+
'class-methods-use-this': 'off',
|
|
6
|
+
'import-x/imports-first': 'off',
|
|
7
|
+
'import-x/newline-after-import': 'off',
|
|
8
|
+
'import-x/no-dynamic-require': 'off',
|
|
9
|
+
// Off — legacy parity; PUI apps import via @elliemae/app-react-dependencies (not direct package.json entries).
|
|
10
|
+
'import-x/no-extraneous-dependencies': 'off',
|
|
11
|
+
'import-x/no-named-as-default': 'off',
|
|
12
|
+
'import-x/no-unresolved': [
|
|
13
|
+
'error',
|
|
14
|
+
{ caseSensitive: true, caseSensitiveStrict: true },
|
|
15
|
+
],
|
|
16
|
+
'import-x/no-webpack-loader-syntax': 'off',
|
|
17
|
+
'import-x/prefer-default-export': 'off',
|
|
18
|
+
'import-x/default': 'off',
|
|
19
|
+
'import-x/namespace': 'off',
|
|
20
|
+
'import-x/extensions': [
|
|
21
|
+
'error',
|
|
22
|
+
'never',
|
|
23
|
+
{
|
|
24
|
+
json: 'ignorePackages',
|
|
25
|
+
js: 'ignorePackages',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
complexity: ['error', { max: 10 }],
|
|
29
|
+
'max-depth': ['error', { max: 4 }],
|
|
30
|
+
'max-lines-per-function': 'off',
|
|
31
|
+
'max-nested-callbacks': ['error', { max: 3 }],
|
|
32
|
+
'max-params': ['error', { max: 3 }],
|
|
33
|
+
'max-statements': ['error', { max: 20 }],
|
|
34
|
+
'max-len': 'off',
|
|
35
|
+
'newline-per-chained-call': 'off',
|
|
36
|
+
'no-confusing-arrow': 'off',
|
|
37
|
+
'no-console': 'warn',
|
|
38
|
+
'no-param-reassign': ['error', { props: false }],
|
|
39
|
+
'prefer-template': 'error',
|
|
40
|
+
'require-yield': 'off',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Relaxed type-checked rules for test files (shared by default and strict configs). */
|
|
44
|
+
export const typescriptTestRelaxedRules = {
|
|
45
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
46
|
+
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
47
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
48
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
49
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
50
|
+
'@typescript-eslint/unbound-method': 'off',
|
|
51
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
52
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
53
|
+
'@typescript-eslint/await-thenable': 'off',
|
|
54
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
55
|
+
'no-constant-binary-expression': 'off',
|
|
56
|
+
'valid-typeof': 'off',
|
|
57
|
+
'prefer-const': 'off',
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** Relaxed core rules for generated test fixture JS (checksum mocks, etc.). */
|
|
61
|
+
export const testFixtureRelaxedRules = {
|
|
62
|
+
'no-unused-vars': 'off',
|
|
63
|
+
'no-console': 'off',
|
|
64
|
+
'max-lines': 'off',
|
|
65
|
+
'max-statements': 'off',
|
|
66
|
+
complexity: 'off',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const jsRules = {
|
|
70
|
+
...baseRules,
|
|
71
|
+
'max-lines': ['error', { max: 120, skipComments: true }],
|
|
72
|
+
'no-unused-vars': 'error',
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const typescriptRules = {
|
|
76
|
+
...baseRules,
|
|
77
|
+
'max-lines': ['error', { max: 200, skipComments: true }],
|
|
78
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
79
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
80
|
+
'@typescript-eslint/no-use-before-define': [
|
|
81
|
+
'error',
|
|
82
|
+
{ functions: false, classes: true, variables: true, typedefs: true },
|
|
83
|
+
],
|
|
84
|
+
'@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
|
|
85
|
+
'@typescript-eslint/no-floating-promises': ['error', { ignoreIIFE: true }],
|
|
86
|
+
'@typescript-eslint/no-misused-promises': [
|
|
87
|
+
'error',
|
|
88
|
+
{ checksVoidReturn: { attributes: false } },
|
|
89
|
+
],
|
|
90
|
+
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
91
|
+
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
92
|
+
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
93
|
+
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
94
|
+
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
95
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
96
|
+
'error',
|
|
97
|
+
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
|
|
98
|
+
],
|
|
99
|
+
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
100
|
+
'no-unused-vars': 'off',
|
|
101
|
+
'@typescript-eslint/no-unused-vars': [
|
|
102
|
+
'error',
|
|
103
|
+
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/** Stricter TypeScript rules (error on unsafe any usage). */
|
|
108
|
+
export const typescriptStrictRules = {
|
|
109
|
+
...typescriptRules,
|
|
110
|
+
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
111
|
+
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
112
|
+
'@typescript-eslint/no-unsafe-call': 'error',
|
|
113
|
+
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
114
|
+
'@typescript-eslint/no-unsafe-return': 'error',
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const reactRules = {
|
|
118
|
+
'jsx-a11y/aria-props': 'error',
|
|
119
|
+
'jsx-a11y/heading-has-content': 'off',
|
|
120
|
+
'jsx-a11y/label-has-associated-control': [
|
|
121
|
+
'error',
|
|
122
|
+
{
|
|
123
|
+
controlComponents: ['Input'],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
'jsx-a11y/label-has-for': 'off',
|
|
127
|
+
'jsx-a11y/mouse-events-have-key-events': 'error',
|
|
128
|
+
'jsx-a11y/role-has-required-aria-props': 'error',
|
|
129
|
+
'jsx-a11y/role-supports-aria-props': 'error',
|
|
130
|
+
'react/destructuring-assignment': 'off',
|
|
131
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
132
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
133
|
+
'react/jsx-closing-tag-location': 'off',
|
|
134
|
+
'react/forbid-prop-types': 'off',
|
|
135
|
+
'react/jsx-first-prop-new-line': ['error', 'multiline'],
|
|
136
|
+
'react/jsx-no-target-blank': 'off',
|
|
137
|
+
'react/jsx-props-no-spreading': 'off',
|
|
138
|
+
'react/jsx-uses-vars': 'error',
|
|
139
|
+
'react/require-default-props': 'off',
|
|
140
|
+
'react/require-extension': 'off',
|
|
141
|
+
'react/self-closing-comp': 'off',
|
|
142
|
+
'react/sort-comp': 'off',
|
|
143
|
+
'react/react-in-jsx-scope': 'off',
|
|
144
|
+
'react/jsx-filename-extension': [
|
|
145
|
+
'warn',
|
|
146
|
+
{ extensions: ['.js', '.jsx', '.tsx', '.mdx'] },
|
|
147
|
+
],
|
|
148
|
+
'react/function-component-definition': [
|
|
149
|
+
'error',
|
|
150
|
+
{ namedComponents: 'arrow-function' },
|
|
151
|
+
],
|
|
152
|
+
'react/prop-types': 'off',
|
|
153
|
+
'redux-saga/no-yield-in-race': 'error',
|
|
154
|
+
'redux-saga/yield-effects': 'error',
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/** Stricter React rules (exhaustive-deps as error). */
|
|
158
|
+
export const reactStrictRules = {
|
|
159
|
+
...reactRules,
|
|
160
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const ignorePatterns = [
|
|
164
|
+
'**/build/**',
|
|
165
|
+
'**/node_modules/**',
|
|
166
|
+
'**/dist/**',
|
|
167
|
+
'**/reports/**',
|
|
168
|
+
'**/allure-report/**',
|
|
169
|
+
'**/coverage/**',
|
|
170
|
+
'**/demo/**',
|
|
171
|
+
'**/docs/**',
|
|
172
|
+
'**/docs/api/**',
|
|
173
|
+
'**/temp/**',
|
|
174
|
+
'**/.tmp/**',
|
|
175
|
+
'**/public/**',
|
|
176
|
+
'**/webroot/**',
|
|
177
|
+
'**/cdn/**',
|
|
178
|
+
'**/.docusaurus/**',
|
|
179
|
+
'**/vendor/*.js',
|
|
180
|
+
'**/.nx/**',
|
|
181
|
+
'**/pnpm-lock.yaml',
|
|
182
|
+
'**/.scannerwork/**',
|
|
183
|
+
'**/stats.json',
|
|
184
|
+
'**/jsconfig.json',
|
|
185
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const {
|
|
2
|
+
baseExtends,
|
|
3
|
+
baseRules,
|
|
4
|
+
baseOverrides,
|
|
5
|
+
baseConfig,
|
|
6
|
+
} = require('./common.cjs');
|
|
7
|
+
const { tsConfig } = require('./typescript/non-react.cjs');
|
|
8
|
+
|
|
9
|
+
exports.esConfig = {
|
|
10
|
+
...baseConfig,
|
|
11
|
+
extends: ['airbnb-base'].concat(baseExtends),
|
|
12
|
+
rules: baseRules,
|
|
13
|
+
overrides: baseOverrides.concat([tsConfig]),
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const {
|
|
2
|
+
baseExtends,
|
|
3
|
+
baseRules,
|
|
4
|
+
baseOverrides,
|
|
5
|
+
baseConfig,
|
|
6
|
+
reactRules,
|
|
7
|
+
} = require('./common.cjs');
|
|
8
|
+
const { tsReactConfig } = require('./typescript/react.cjs');
|
|
9
|
+
|
|
10
|
+
exports.esReactConfig = {
|
|
11
|
+
...baseConfig,
|
|
12
|
+
extends: ['airbnb', 'airbnb/hooks', 'plugin:redux-saga/recommended'].concat(
|
|
13
|
+
baseExtends,
|
|
14
|
+
),
|
|
15
|
+
rules: {
|
|
16
|
+
...baseRules,
|
|
17
|
+
...reactRules,
|
|
18
|
+
},
|
|
19
|
+
overrides: baseOverrides.concat([
|
|
20
|
+
tsReactConfig,
|
|
21
|
+
{
|
|
22
|
+
files: '*.mdx',
|
|
23
|
+
extends: 'plugin:mdx/recommended',
|
|
24
|
+
},
|
|
25
|
+
]),
|
|
26
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const { baseExtends, basePlugins } = require('../common.cjs');
|
|
2
|
+
|
|
3
|
+
exports.tsBaseExtends = [
|
|
4
|
+
'plugin:@typescript-eslint/recommended',
|
|
5
|
+
'plugin:import/typescript',
|
|
6
|
+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
7
|
+
].concat(baseExtends);
|
|
8
|
+
|
|
9
|
+
exports.tsBaseRules = {
|
|
10
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
11
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
12
|
+
'@typescript-eslint/no-use-before-define': [
|
|
13
|
+
'error',
|
|
14
|
+
{ functions: false, classes: true, variables: true, typedefs: true },
|
|
15
|
+
],
|
|
16
|
+
'max-lines': ['error', { max: 200, skipComments: true }],
|
|
17
|
+
'@typescript-eslint/unbound-method': [
|
|
18
|
+
'error',
|
|
19
|
+
{
|
|
20
|
+
ignoreStatic: true,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
'@typescript-eslint/no-floating-promises': [
|
|
24
|
+
'error',
|
|
25
|
+
{
|
|
26
|
+
ignoreIIFE: true,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.tsBaseConfig = {
|
|
32
|
+
files: ['*.ts', '*.tsx'],
|
|
33
|
+
parser: '@typescript-eslint/parser',
|
|
34
|
+
plugins: ['@typescript-eslint'].concat(basePlugins),
|
|
35
|
+
parserOptions: {
|
|
36
|
+
tsconfigRootDir: process.cwd(),
|
|
37
|
+
project: true,
|
|
38
|
+
},
|
|
39
|
+
settings: {
|
|
40
|
+
'import/resolver': {
|
|
41
|
+
typescript: {
|
|
42
|
+
alwaysTryTypes: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
'import/parsers': {
|
|
46
|
+
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
const { baseRules } = require('../common.cjs');
|
|
3
|
+
const { tsBaseExtends, tsBaseRules, tsBaseConfig } = require('./common.cjs');
|
|
4
|
+
|
|
5
|
+
exports.tsConfig = {
|
|
6
|
+
...tsBaseConfig,
|
|
7
|
+
extends: ['airbnb-base', 'airbnb-typescript/base'].concat(tsBaseExtends),
|
|
8
|
+
rules: {
|
|
9
|
+
...baseRules,
|
|
10
|
+
...tsBaseRules,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
const { baseRules, reactRules } = require('../common.cjs');
|
|
3
|
+
const { tsBaseExtends, tsBaseRules, tsBaseConfig } = require('./common.cjs');
|
|
4
|
+
|
|
5
|
+
exports.tsReactConfig = {
|
|
6
|
+
...tsBaseConfig,
|
|
7
|
+
extends: [
|
|
8
|
+
'airbnb',
|
|
9
|
+
'airbnb/hooks',
|
|
10
|
+
'plugin:redux-saga/recommended',
|
|
11
|
+
'airbnb-typescript',
|
|
12
|
+
].concat(tsBaseExtends),
|
|
13
|
+
rules: {
|
|
14
|
+
...baseRules,
|
|
15
|
+
...tsBaseRules,
|
|
16
|
+
...reactRules,
|
|
17
|
+
'react/prop-types': 0,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
|
|
4
|
+
const npmClient = fs.existsSync(path.join(process.cwd(), "pnpm-lock.yaml"))
|
|
5
|
+
? "pnpm"
|
|
6
|
+
: "npm";
|
|
7
|
+
|
|
8
|
+
export const lintStagedConfig = {
|
|
9
|
+
"*.{js,ts,jsx,tsx,md,mdx,html,css,json}": ["prettier --write"],
|
|
10
|
+
"*.{ts,tsx}": [`${npmClient} run tscheck`],
|
|
11
|
+
"*.{js,ts,jsx,tsx}": [
|
|
12
|
+
`${npmClient} run lint:fix`,
|
|
13
|
+
`${npmClient} run test:staged`,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
@@ -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';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** @type {import('semantic-release').GlobalConfig} */
|
|
2
|
+
export default {
|
|
3
|
+
branches: [
|
|
4
|
+
'+([0-9])?(.{+([0-9]),x}).x',
|
|
5
|
+
'master',
|
|
6
|
+
'main',
|
|
7
|
+
'next-major',
|
|
8
|
+
{ name: 'beta', prerelease: true },
|
|
9
|
+
{ name: 'alpha', prerelease: true },
|
|
10
|
+
{ name: 'rc', prerelease: true },
|
|
11
|
+
{ name: 'hotfix', prerelease: true },
|
|
12
|
+
{ name: 'next', prerelease: true },
|
|
13
|
+
],
|
|
14
|
+
plugins: [
|
|
15
|
+
'@semantic-release/commit-analyzer',
|
|
16
|
+
'@semantic-release/release-notes-generator',
|
|
17
|
+
[
|
|
18
|
+
'@semantic-release/changelog',
|
|
19
|
+
{
|
|
20
|
+
changelogTitle:
|
|
21
|
+
'# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
'@semantic-release/npm',
|
|
25
|
+
'./semantic-release-plugin.mjs',
|
|
26
|
+
'@semantic-release/github',
|
|
27
|
+
],
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Semantic Release plugin to write publish info and set dist tag
|
|
6
|
+
* @see https://semantic-release.gitbook.io/semantic-release/developer-guide/plugin
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
success: async (pluginConfig, context) => {
|
|
10
|
+
const { nextRelease, logger } = context;
|
|
11
|
+
|
|
12
|
+
if (!nextRelease) {
|
|
13
|
+
logger?.log?.('No release information available');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (!nextRelease.channel) {
|
|
18
|
+
nextRelease.channel = 'latest';
|
|
19
|
+
}
|
|
20
|
+
const fname = path.join(process.cwd(), 'publish-info.json');
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
fs.writeFileSync(fname, JSON.stringify(nextRelease, null, 2));
|
|
24
|
+
logger?.log?.(`Wrote publish info to ${fname}`);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
logger?.error?.(`Failed to write publish info: ${error.message}`);
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
};
|