@elliemae/pui-cli 7.27.0-beta.2 → 8.0.0-next.1
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/commands/build.js +1 -1
- package/dist/cjs/commands/codemod.js +1 -1
- package/dist/cjs/commands/gendoc.js +1 -1
- package/dist/cjs/commands/lint.js +1 -1
- package/dist/cjs/commands/pack.js +1 -1
- package/dist/cjs/commands/start.js +1 -1
- package/dist/cjs/commands/storybook.js +1 -1
- package/dist/cjs/commands/test.js +1 -1
- package/dist/cjs/commands/tscheck.js +1 -1
- package/dist/cjs/commands/version.js +1 -1
- package/dist/cjs/commands/vitest.js +1 -1
- package/dist/cjs/lint-config/eslint/common.cjs +88 -85
- package/dist/cjs/release.config.cjs +0 -7
- package/dist/cjs/server/appRoutes.js +3 -3
- package/dist/cjs/webpack/webpack.dev.babel.js +2 -2
- package/dist/esm/commands/build.js +1 -1
- package/dist/esm/commands/codemod.js +1 -1
- package/dist/esm/commands/gendoc.js +1 -1
- package/dist/esm/commands/lint.js +1 -1
- package/dist/esm/commands/pack.js +1 -1
- package/dist/esm/commands/start.js +1 -1
- package/dist/esm/commands/storybook.js +1 -1
- package/dist/esm/commands/test.js +1 -1
- package/dist/esm/commands/tscheck.js +1 -1
- package/dist/esm/commands/version.js +1 -1
- package/dist/esm/commands/vitest.js +1 -1
- package/dist/esm/lint-config/eslint/common.cjs +88 -85
- package/dist/esm/release.config.cjs +0 -7
- package/dist/esm/server/appRoutes.js +3 -3
- package/dist/esm/webpack/webpack.dev.babel.js +6 -3
- package/dist/types/commands/build.d.ts +5 -13
- package/dist/types/commands/codemod.d.ts +2 -9
- package/dist/types/commands/gendoc.d.ts +2 -7
- package/dist/types/commands/lint.d.ts +2 -23
- package/dist/types/commands/pack.d.ts +2 -23
- package/dist/types/commands/start.d.ts +2 -13
- package/dist/types/commands/storybook.d.ts +2 -22
- package/dist/types/commands/test.d.ts +2 -38
- package/dist/types/commands/tscheck.d.ts +3 -14
- package/dist/types/commands/version.d.ts +2 -24
- package/dist/types/commands/vitest.d.ts +2 -33
- package/dist/types/lint-config/eslint/common.d.cts +58 -55
- package/dist/types/lint-config/eslint/non-react.d.cts +34 -31
- package/dist/types/lint-config/eslint/react.d.cts +58 -55
- package/dist/types/lint-config/eslint/typescript/non-react.d.cts +28 -28
- package/dist/types/lint-config/eslint/typescript/react.d.cts +52 -52
- package/dist/types/release.config.d.cts +0 -2
- package/dist/types/server/middlewares.d.ts +3 -3
- package/package.json +11 -10
- package/dist/cjs/typescript/app.tsconfig.json +0 -23
- package/dist/cjs/typescript/library.tsconfig.json +0 -23
- package/dist/esm/typescript/app.tsconfig.json +0 -23
- package/dist/esm/typescript/library.tsconfig.json +0 -23
|
@@ -48,7 +48,7 @@ const codemodCmd = {
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
command: "codemod <transform>",
|
|
51
|
-
|
|
51
|
+
describe: "Transforms code",
|
|
52
52
|
builder: (yargsRef) => yargsRef.positional("transform", {
|
|
53
53
|
describe: "path to the transform file. Can be either a local path or url",
|
|
54
54
|
string: true,
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
|
-
const prettierOptions = require(
|
|
2
|
+
const prettierOptions = require("../prettier.config.cjs");
|
|
3
3
|
// const webpackConfig = require('../../webpack/webpack.prod.babel');
|
|
4
4
|
|
|
5
5
|
exports.baseExtends = [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
"plugin:eslint-comments/recommended",
|
|
7
|
+
"plugin:import/recommended",
|
|
8
|
+
"plugin:prettier/recommended",
|
|
9
|
+
"plugin:jest/recommended",
|
|
10
|
+
"plugin:jsdoc/recommended",
|
|
11
|
+
"plugin:wdio/recommended",
|
|
12
|
+
"plugin:testing-library/dom",
|
|
13
|
+
"plugin:storybook/recommended",
|
|
14
14
|
];
|
|
15
15
|
|
|
16
|
-
const basePlugins = [
|
|
16
|
+
const basePlugins = ["testing-library", "jest", "jsdoc", "wdio", "import"];
|
|
17
17
|
exports.basePlugins = basePlugins;
|
|
18
18
|
|
|
19
19
|
exports.baseOverrides = [
|
|
20
20
|
{
|
|
21
|
-
files: [
|
|
21
|
+
files: ["*.func.spec.js", "*.visual.spec.js"],
|
|
22
22
|
rules: {
|
|
23
|
-
|
|
23
|
+
"jest/valid-expect": "off",
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
];
|
|
27
27
|
|
|
28
28
|
const baseRules = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
"prettier/prettier": ["error", prettierOptions],
|
|
30
|
+
"arrow-body-style": [2, "as-needed"],
|
|
31
|
+
"class-methods-use-this": 0,
|
|
32
|
+
"import/imports-first": 0,
|
|
33
|
+
"import/newline-after-import": 0,
|
|
34
|
+
"import/no-dynamic-require": 0,
|
|
35
|
+
"import/no-extraneous-dependencies": 0,
|
|
36
|
+
"import/no-named-as-default": 0,
|
|
37
|
+
"import/no-unresolved": [
|
|
38
38
|
2,
|
|
39
39
|
{ caseSensitive: true, caseSensitiveStrict: true },
|
|
40
40
|
], // Tip: https://github.com/import-js/eslint-plugin-import/issues/1868
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
"import/no-webpack-loader-syntax": 0,
|
|
42
|
+
"import/prefer-default-export": 0,
|
|
43
|
+
"import/extensions": [
|
|
44
44
|
2,
|
|
45
|
-
|
|
45
|
+
"never",
|
|
46
46
|
{
|
|
47
|
-
json:
|
|
48
|
-
js:
|
|
47
|
+
json: "ignorePackages",
|
|
48
|
+
js: "ignorePackages",
|
|
49
49
|
},
|
|
50
50
|
],
|
|
51
51
|
indent: [
|
|
@@ -55,72 +55,72 @@ const baseRules = {
|
|
|
55
55
|
SwitchCase: 1,
|
|
56
56
|
},
|
|
57
57
|
],
|
|
58
|
-
|
|
59
|
-
complexity: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
"max-lines": ["error", { max: 120, skipComments: true }],
|
|
59
|
+
complexity: ["error", { max: 10 }],
|
|
60
|
+
"max-depth": ["error", { max: 4 }],
|
|
61
|
+
"max-lines-per-function": 0,
|
|
62
|
+
"max-nested-callbacks": ["error", { max: 3 }],
|
|
63
|
+
"max-params": ["error", { max: 3 }],
|
|
64
|
+
"max-statements": ["error", { max: 20 }],
|
|
65
|
+
"max-len": 0,
|
|
66
|
+
"newline-per-chained-call": 0,
|
|
67
|
+
"no-confusing-arrow": 0,
|
|
68
|
+
"no-console": 1,
|
|
69
|
+
"no-param-reassign": ["error", { props: false }],
|
|
70
|
+
"no-unused-vars": 2,
|
|
71
|
+
"no-use-before-define": 0,
|
|
72
|
+
"prefer-template": 2,
|
|
73
|
+
"require-yield": 0,
|
|
74
|
+
"jsdoc/require-jsdoc": 0,
|
|
75
|
+
"eslint-comments/disable-enable-pair": 0,
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
exports.baseRules = baseRules;
|
|
79
79
|
|
|
80
80
|
const reactRules = {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
"jsx-a11y/aria-props": 2,
|
|
82
|
+
"jsx-a11y/heading-has-content": 0,
|
|
83
|
+
"jsx-a11y/label-has-associated-control": [
|
|
84
84
|
2,
|
|
85
85
|
{
|
|
86
86
|
// NOTE: If this error triggers, either disable it or add
|
|
87
87
|
// your custom components, labels and attributes via these options
|
|
88
88
|
// See https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md
|
|
89
|
-
controlComponents: [
|
|
89
|
+
controlComponents: ["Input"],
|
|
90
90
|
},
|
|
91
91
|
],
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
92
|
+
"jsx-a11y/label-has-for": 0,
|
|
93
|
+
"jsx-a11y/mouse-events-have-key-events": 2,
|
|
94
|
+
"jsx-a11y/role-has-required-aria-props": 2,
|
|
95
|
+
"jsx-a11y/role-supports-aria-props": 2,
|
|
96
|
+
"react/destructuring-assignment": 0,
|
|
97
|
+
"react-hooks/rules-of-hooks": "error",
|
|
98
|
+
"react/jsx-closing-tag-location": 0,
|
|
99
|
+
"react/forbid-prop-types": 0,
|
|
100
|
+
"react/jsx-first-prop-new-line": [2, "multiline"],
|
|
101
|
+
"react/jsx-no-target-blank": 0,
|
|
102
|
+
"react/jsx-props-no-spreading": 0,
|
|
103
|
+
"react/jsx-uses-vars": 2,
|
|
104
|
+
"react/require-default-props": 0,
|
|
105
|
+
"react/require-extension": 0,
|
|
106
|
+
"react/self-closing-comp": 0,
|
|
107
|
+
"react/sort-comp": 0,
|
|
108
|
+
"react/react-in-jsx-scope": 0,
|
|
109
|
+
"react/jsx-filename-extension": [
|
|
110
110
|
1,
|
|
111
|
-
{ extensions: [
|
|
111
|
+
{ extensions: [".js", ".jsx", ".tsx", ".mdx"] },
|
|
112
112
|
],
|
|
113
|
-
|
|
113
|
+
"react/function-component-definition": [
|
|
114
114
|
2,
|
|
115
|
-
{ namedComponents:
|
|
115
|
+
{ namedComponents: "arrow-function" },
|
|
116
116
|
],
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
"redux-saga/no-yield-in-race": 2,
|
|
118
|
+
"redux-saga/yield-effects": 2,
|
|
119
119
|
};
|
|
120
120
|
exports.reactRules = reactRules;
|
|
121
121
|
|
|
122
122
|
exports.baseConfig = {
|
|
123
|
-
parser:
|
|
123
|
+
parser: "@babel/eslint-parser",
|
|
124
124
|
plugins: basePlugins,
|
|
125
125
|
env: {
|
|
126
126
|
jest: true,
|
|
@@ -129,32 +129,35 @@ exports.baseConfig = {
|
|
|
129
129
|
es2021: true,
|
|
130
130
|
},
|
|
131
131
|
parserOptions: {
|
|
132
|
-
sourceType:
|
|
132
|
+
sourceType: "module",
|
|
133
133
|
ecmaFeatures: {
|
|
134
134
|
jsx: true,
|
|
135
135
|
},
|
|
136
|
+
babelOptions: {
|
|
137
|
+
plugins: ["@babel/plugin-syntax-import-assertions"],
|
|
138
|
+
},
|
|
136
139
|
},
|
|
137
140
|
settings: {
|
|
138
141
|
react: {
|
|
139
|
-
version:
|
|
142
|
+
version: "detect",
|
|
140
143
|
},
|
|
141
144
|
jest: {
|
|
142
145
|
version: 28,
|
|
143
146
|
},
|
|
144
|
-
|
|
147
|
+
"import/resolver": {
|
|
145
148
|
node: {
|
|
146
|
-
extensions: [
|
|
149
|
+
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
147
150
|
},
|
|
148
151
|
},
|
|
149
152
|
},
|
|
150
153
|
ignorePatterns: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
"/build/**/*",
|
|
155
|
+
"/dist/**/*",
|
|
156
|
+
"/reports/**/*",
|
|
157
|
+
"/coverage/**/*",
|
|
158
|
+
"/demo/**/*",
|
|
159
|
+
"/docs/**/*",
|
|
160
|
+
"/temp/**/*",
|
|
161
|
+
"**/vendor/*.js",
|
|
159
162
|
],
|
|
160
163
|
};
|
|
@@ -33,8 +33,8 @@ __export(appRoutes_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(appRoutes_exports);
|
|
34
34
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
35
35
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
36
|
-
const allJS = /\.
|
|
37
|
-
const serviceEndpoints = /\.endpoint\.
|
|
36
|
+
const allJS = /\.js$/;
|
|
37
|
+
const serviceEndpoints = /\.endpoint\.js$/;
|
|
38
38
|
const getFilesMatching = (filePattern) => {
|
|
39
39
|
const getFiles = (dir) => {
|
|
40
40
|
let routeFiles = [];
|
|
@@ -61,7 +61,7 @@ const loadRoutes = async (app) => {
|
|
|
61
61
|
routeFiles.push(...getServiceEndpoints(import_node_path.default.join(process.cwd(), "lib")));
|
|
62
62
|
await Promise.all(
|
|
63
63
|
routeFiles.map(async (routeFile) => {
|
|
64
|
-
const init = await import(routeFile);
|
|
64
|
+
const { default: init } = await import(routeFile);
|
|
65
65
|
try {
|
|
66
66
|
init(app);
|
|
67
67
|
} catch (err) {
|
|
@@ -38,7 +38,6 @@ var import_html_webpack_plugin = __toESM(require("html-webpack-plugin"), 1);
|
|
|
38
38
|
var import_circular_dependency_plugin = __toESM(require("circular-dependency-plugin"), 1);
|
|
39
39
|
var import_mini_css_extract_plugin = __toESM(require("mini-css-extract-plugin"), 1);
|
|
40
40
|
var import_react_refresh_webpack_plugin = __toESM(require("@pmmmwh/react-refresh-webpack-plugin"), 1);
|
|
41
|
-
var import_express_static_gzip = __toESM(require("express-static-gzip"), 1);
|
|
42
41
|
var import_middlewares = require("../server/middlewares.js");
|
|
43
42
|
var import_appRoutes = require("../server/appRoutes.js");
|
|
44
43
|
var import_helpers = require("./helpers.js");
|
|
@@ -145,8 +144,9 @@ const devConfig = {
|
|
|
145
144
|
setupMiddlewares: (middlewares, devServer) => {
|
|
146
145
|
if (devServer.app) {
|
|
147
146
|
(0, import_middlewares.setupDefaultMiddlewares)(devServer.app);
|
|
148
|
-
devServer.app.use((0, import_express_static_gzip.default)("cdn", {}));
|
|
149
147
|
(0, import_appRoutes.loadRoutes)(devServer.app).then(() => {
|
|
148
|
+
if (devServer.app)
|
|
149
|
+
(0, import_middlewares.setupAdditionalMiddlewars)(devServer.app);
|
|
150
150
|
}).catch((err) => {
|
|
151
151
|
console.error(err);
|
|
152
152
|
});
|
|
@@ -15,7 +15,7 @@ const codemodCmd = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
command: "codemod <transform>",
|
|
18
|
-
|
|
18
|
+
describe: "Transforms code",
|
|
19
19
|
builder: (yargsRef) => yargsRef.positional("transform", {
|
|
20
20
|
describe: "path to the transform file. Can be either a local path or url",
|
|
21
21
|
string: true,
|
|
@@ -42,7 +42,7 @@ const startCmd = {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
command: "start [options]",
|
|
45
|
-
|
|
45
|
+
describe: "starts local web server to test the application",
|
|
46
46
|
builder: (yargsRef) => yargsRef.options(cmdArgs).help()
|
|
47
47
|
};
|
|
48
48
|
export {
|