@elliemae/pui-cli 6.0.0-beta.32 → 6.0.0-beta.36

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.
@@ -4,6 +4,7 @@ const webpackConfig = require('../../webpack/webpack.prod.babel');
4
4
 
5
5
  exports.baseExtends = [
6
6
  'plugin:eslint-comments/recommended',
7
+ 'plugin:import/recommended',
7
8
  'plugin:prettier/recommended',
8
9
  'plugin:jest/recommended',
9
10
  'plugin:jsdoc/recommended',
@@ -12,7 +13,8 @@ exports.baseExtends = [
12
13
  'plugin:storybook/recommended',
13
14
  ];
14
15
 
15
- const basePlugins = ['testing-library', 'jest', 'jsdoc', 'wdio'];
16
+ const basePlugins = ['testing-library', 'jest', 'jsdoc', 'wdio', 'import'];
17
+ exports.basePlugins = basePlugins;
16
18
 
17
19
  exports.baseOverrides = [
18
20
  {
@@ -105,6 +107,10 @@ const reactRules = {
105
107
  1,
106
108
  { extensions: ['.js', '.jsx', '.tsx', '.mdx'] },
107
109
  ],
110
+ 'react/function-component-definition': [
111
+ 2,
112
+ { namedComponents: 'arrow-function' },
113
+ ],
108
114
  'redux-saga/no-yield-in-race': 2,
109
115
  'redux-saga/yield-effects': 2,
110
116
  };
@@ -1,7 +1,8 @@
1
- const { baseExtends } = require('../common');
1
+ const { baseExtends, basePlugins } = require('../common');
2
2
 
3
3
  exports.tsBaseExtends = [
4
4
  'plugin:@typescript-eslint/recommended',
5
+ 'plugin:import/typescript',
5
6
  'plugin:@typescript-eslint/recommended-requiring-type-checking',
6
7
  ].concat(baseExtends);
7
8
 
@@ -24,6 +25,7 @@ exports.tsBaseRules = {
24
25
  exports.tsBaseConfig = {
25
26
  files: ['*.ts', '*.tsx'],
26
27
  parser: '@typescript-eslint/parser',
28
+ plugins: ['@typescript-eslint'].concat(basePlugins),
27
29
  parserOptions: {
28
30
  tsconfigRootDir: process.cwd(),
29
31
  project: 'tsconfig.json',
@@ -34,5 +36,8 @@ exports.tsBaseConfig = {
34
36
  alwaysTryTypes: true,
35
37
  },
36
38
  },
39
+ 'import/parsers': {
40
+ '@typescript-eslint/parser': ['.ts', '.tsx'],
41
+ },
37
42
  },
38
43
  };
@@ -4,7 +4,7 @@ const { tsBaseExtends, tsBaseRules, tsBaseConfig } = require('./common');
4
4
 
5
5
  exports.tsConfig = {
6
6
  ...tsBaseConfig,
7
- extends: ['airbnb-typescript/base'].concat(tsBaseExtends),
7
+ extends: ['airbnb-base', 'airbnb-typescript/base'].concat(tsBaseExtends),
8
8
  rules: {
9
9
  ...baseRules,
10
10
  ...tsBaseRules,
@@ -4,7 +4,12 @@ const { tsBaseExtends, tsBaseRules, tsBaseConfig } = require('./common');
4
4
 
5
5
  exports.tsReactConfig = {
6
6
  ...tsBaseConfig,
7
- extends: ['airbnb-typescript'].concat(tsBaseExtends),
7
+ extends: [
8
+ 'airbnb',
9
+ 'airbnb/hooks',
10
+ 'plugin:redux-saga/recommended',
11
+ 'airbnb-typescript',
12
+ ].concat(tsBaseExtends),
8
13
  rules: {
9
14
  ...baseRules,
10
15
  ...tsBaseRules,
@@ -1,6 +1,11 @@
1
+ const path = require('path');
2
+
1
3
  module.exports = {
2
4
  '*.{ts,tsx}': [
3
- 'node @elliemae/pui-cli/lib/typescript/tsc-files --noEmit --emitDeclarationOnly false',
5
+ `node ${path.resolve(
6
+ __dirname,
7
+ '../typescript/tsc-files/index.js',
8
+ )} --noEmit --emitDeclarationOnly false`,
4
9
  ],
5
10
  '*.{js,ts,jsx,tsx}': [
6
11
  'npm run lint:fix',
@@ -1,7 +1,8 @@
1
- const { spawnSync } = require('child_process');
1
+ const execa = require('execa');
2
2
  const fs = require('fs');
3
+ const path = require('path');
3
4
 
4
- const { randomChars, resolveFromModule, resolveFromRoot } = require('./utils');
5
+ const { randomChars, resolveFromRoot } = require('./utils');
5
6
 
6
7
  const args = process.argv.slice(2);
7
8
  const argsProjectIndex = args.findIndex((arg) =>
@@ -46,16 +47,20 @@ const tmpTsconfig = {
46
47
  fs.writeFileSync(tmpTsconfigPath, JSON.stringify(tmpTsconfig, null, 2));
47
48
 
48
49
  // Type-check our files
49
- const { status } = spawnSync(
50
- resolveFromModule(
51
- 'typescript',
52
- `../.bin/tsc${process.platform === 'win32' ? '.cmd' : ''}`,
53
- ),
54
- ['-p', tmpTsconfigPath, ...remainingArgsToForward],
55
- { stdio: 'inherit' },
56
- );
50
+ let status = 0;
51
+ try {
52
+ execa.sync(
53
+ path.resolve(
54
+ process.cwd(),
55
+ `./node_modules/.bin/tsc${process.platform === 'win32' ? '.cmd' : ''}`,
56
+ ),
57
+ ['-p', tmpTsconfigPath, ...remainingArgsToForward],
58
+ { stdio: 'inherit' },
59
+ );
60
+ } catch (ex) {
61
+ status = ex.exitCode;
62
+ }
57
63
 
58
64
  // Delete temp config file
59
65
  fs.unlinkSync(tmpTsconfigPath);
60
-
61
66
  process.exit(status);
@@ -72,6 +72,7 @@ const devConfig = {
72
72
 
73
73
  // Add development plugins
74
74
  plugins: [
75
+ new webpack.ProgressPlugin(),
75
76
  new webpack.HotModuleReplacementPlugin(), // Tell webpack we want hot reloading
76
77
  new ReactRefreshWebpackPlugin({
77
78
  overlay: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.32",
3
+ "version": "6.0.0-beta.36",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -34,7 +34,7 @@
34
34
  "release": "semantic-release",
35
35
  "test": "ts-node -r tsconfig-paths/register ./lib/cli test -p",
36
36
  "test:staged": "jest --coverage --passWithNoTests --bail --findRelatedTests",
37
- "setup": "rimraf -r node_modules && rimraf package-lock.json && npm i",
37
+ "setup": "rimraf -r node_modules && rimraf pnpm-lock.yaml && pnpm i",
38
38
  "storybook:build": "exit 0",
39
39
  "storybook:docs:build": "exit 0",
40
40
  "upgrade": "ncu -u && npm run setup",
@@ -83,17 +83,17 @@
83
83
  "@stylelint/postcss-css-in-js": "~0.37.2",
84
84
  "@svgr/webpack": "~6.1.2",
85
85
  "@swc/cli": "~0.1.55",
86
- "@swc/core": "~1.2.124",
86
+ "@swc/core": "~1.2.126",
87
87
  "@swc/jest": "~0.2.15",
88
88
  "@testing-library/jest-dom": "~5.16.1",
89
89
  "@testing-library/react": "~12.1.2",
90
90
  "@testing-library/react-hooks": "~7.0.2",
91
91
  "@types/jest": "~27.4.0",
92
- "@types/node": "~17.0.6",
92
+ "@types/node": "~17.0.7",
93
93
  "@types/rimraf": "~3.0.2",
94
94
  "@types/testing-library__jest-dom": "~5.14.2",
95
- "@typescript-eslint/eslint-plugin": "~5.8.1",
96
- "@typescript-eslint/parser": "~5.8.1",
95
+ "@typescript-eslint/eslint-plugin": "~5.9.0",
96
+ "@typescript-eslint/parser": "~5.9.0",
97
97
  "autoprefixer": "~10.4.1",
98
98
  "axe-core": "~4.3.5",
99
99
  "babel-loader": "~8.2.3",
@@ -134,19 +134,19 @@
134
134
  "esbuild-loader": "~2.18.0",
135
135
  "esbuild-plugin-svgr": "~1.0.0",
136
136
  "eslint": "~8.6.0",
137
- "eslint-config-airbnb": "~18.2.1",
137
+ "eslint-config-airbnb": "~19.0.4",
138
138
  "eslint-config-airbnb-base": "~15.0.0",
139
- "eslint-config-airbnb-typescript": "~15.0.0",
139
+ "eslint-config-airbnb-typescript": "~16.1.0",
140
140
  "eslint-config-prettier": "~8.3.0",
141
- "eslint-config-react-app": "~6.0.0",
141
+ "eslint-config-react-app": "~7.0.0",
142
142
  "eslint-import-resolver-babel-module": "~5.3.1",
143
143
  "eslint-import-resolver-typescript": "~2.5.0",
144
144
  "eslint-import-resolver-webpack": "~0.13.2",
145
- "eslint-plugin-compat": "~3.13.0",
145
+ "eslint-plugin-compat": "~4.0.0",
146
146
  "eslint-plugin-eslint-comments": "~3.2.0",
147
- "eslint-plugin-import": "~2.25.3",
148
- "eslint-plugin-jest": "~25.3.3",
149
- "eslint-plugin-jsdoc": "~37.5.0",
147
+ "eslint-plugin-import": "~2.25.4",
148
+ "eslint-plugin-jest": "~25.3.4",
149
+ "eslint-plugin-jsdoc": "~37.5.1",
150
150
  "eslint-plugin-jsx-a11y": "~6.5.1",
151
151
  "eslint-plugin-mdx": "~1.16.0",
152
152
  "eslint-plugin-prettier": "~4.0.0",
@@ -178,7 +178,7 @@
178
178
  "jest-styled-components": "~7.0.8",
179
179
  "jscodeshift": "~0.13.0",
180
180
  "jsdoc": "~3.6.7",
181
- "lint-staged": "~12.1.4",
181
+ "lint-staged": "~12.1.5",
182
182
  "mini-css-extract-plugin": "~2.4.5",
183
183
  "minimist": "~1.2.5",
184
184
  "moment": "~2.29.1",
@@ -187,7 +187,7 @@
187
187
  "node-gyp": "~8.4.1",
188
188
  "node-plop": "~0.30.0",
189
189
  "nodemon": "~2.0.15",
190
- "npm-check-updates": "12.0.5",
190
+ "npm-check-updates": "12.1.0",
191
191
  "null-loader": "~4.0.1",
192
192
  "pino": "~7.6.2",
193
193
  "pino-pretty": "~7.3.0",
@@ -199,7 +199,7 @@
199
199
  "postcss-markdown": "~1.2.0",
200
200
  "postcss-syntax": "~0.36.2",
201
201
  "postcss-loader": "~6.2.1",
202
- "postcss-preset-env": "~7.1.0",
202
+ "postcss-preset-env": "~7.2.0",
203
203
  "prettier": "~2.5.1",
204
204
  "pug": "~3.0.2",
205
205
  "pug-loader": "~2.4.0",