orc-scripts 4.0.0-dev.0 → 4.0.0-dev.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orc-scripts",
3
- "version": "4.0.0-dev.0",
3
+ "version": "4.0.0-dev.10",
4
4
  "description": "Scripts toolbox for Orckestra",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -38,17 +38,21 @@
38
38
  },
39
39
  "homepage": "https://github.com/Orckestra/orc-scripts#readme",
40
40
  "dependencies": {
41
- "@babel/cli": "^7.0.0",
42
- "@babel/core": "^7.0.0",
43
- "@babel/plugin-proposal-class-properties": "^7.8.3",
44
- "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
45
- "@babel/plugin-proposal-optional-chaining": "^7.9.0",
41
+ "@babel/cli": "^7.24.7",
42
+ "@babel/core": "^7.24.7",
43
+ "@babel/eslint-parser": "^7.24.7",
46
44
  "@babel/plugin-syntax-dynamic-import": "^7.0.0",
47
- "@babel/plugin-transform-computed-properties": "^7.0.0",
48
- "@babel/plugin-transform-destructuring": "^7.8.3",
49
- "@babel/plugin-transform-react-jsx": "^7.0.0",
50
- "@babel/plugin-transform-template-literals": "^7.0.0",
51
- "@babel/preset-env": "^7.0.0",
45
+ "@babel/plugin-transform-class-properties": "^7.24.7",
46
+ "@babel/plugin-transform-computed-properties": "^7.24.7",
47
+ "@babel/plugin-transform-destructuring": "^7.24.7",
48
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
49
+ "@babel/plugin-transform-numeric-separator": "^7.24.7",
50
+ "@babel/plugin-transform-object-rest-spread": "^7.24.7",
51
+ "@babel/plugin-transform-optional-chaining": "^7.24.7",
52
+ "@babel/plugin-transform-private-methods": "^7.24.7",
53
+ "@babel/plugin-transform-react-jsx": "^7.24.7",
54
+ "@babel/plugin-transform-template-literals": "^7.24.7",
55
+ "@babel/preset-env": "^7.24.7",
52
56
  "@formatjs/intl-getcanonicallocales": "^1.4.6",
53
57
  "@formatjs/intl-pluralrules": "^3.4.10",
54
58
  "@gustavnikolaj/async-main-wrap": "^3.0.1",
@@ -56,12 +60,13 @@
56
60
  "@loadable/component": "5.13.1",
57
61
  "@material-ui/core": "^4.9.14",
58
62
  "@material-ui/lab": "^4.0.0-alpha.57",
59
- "@typescript-eslint/eslint-plugin": "^2.34.0",
60
- "@typescript-eslint/parser": "^2.0.0",
63
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
64
+ "@typescript-eslint/parser": "^7.14.1",
61
65
  "@welldone-software/why-did-you-render": "^4.2.5",
66
+ "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
62
67
  "babel-core": "7.0.0-bridge.0",
63
- "babel-eslint": "^10.0.1",
64
68
  "babel-loader": "^8.3.0",
69
+ "babel-plugin-formatjs": "^10.5.16",
65
70
  "babel-plugin-react-intl-auto": "^3.1.0",
66
71
  "babel-plugin-root-import": "^6.5.0",
67
72
  "babel-plugin-styled-components": "^1.10.6",
@@ -74,17 +79,17 @@
74
79
  "date-fns": "^2",
75
80
  "dotenv": "^8.0.0",
76
81
  "enzyme": "^3.11.0",
77
- "enzyme-adapter-react-16": "^1.15.2",
78
- "eslint": "^6.1.0",
79
- "eslint-config-react-app": "^5.1.0",
80
- "eslint-plugin-flowtype": "^4.7.0",
81
- "eslint-plugin-import": "^2.14.0",
82
- "eslint-plugin-jsx-a11y": "^6.1.2",
83
- "eslint-plugin-react": "^7.11.1",
84
- "eslint-plugin-react-hooks": "^2.5.1",
82
+ "eslint": "^8.57.0",
83
+ "eslint-config-react-app": "^7.0.1",
84
+ "eslint-plugin-flowtype": "^8.0.3",
85
+ "eslint-plugin-import": "^2.29.1",
86
+ "eslint-plugin-jsx-a11y": "^6.9.0",
87
+ "eslint-plugin-react": "^7.34.3",
88
+ "eslint-plugin-react-hooks": "^4.6.2",
85
89
  "extract-react-intl-messages": "^4.1.1",
86
90
  "file-loader": "^6.2.0",
87
91
  "full-icu": "^1.3.1",
92
+ "globals": "^15.8.0",
88
93
  "husky": "^4.0.0",
89
94
  "icu4c-data": "^0.64.2",
90
95
  "identity-obj-proxy": "^3.0.0",
@@ -102,11 +107,11 @@
102
107
  "normalizr": "^3.3.0",
103
108
  "pkg-dir": "^4.0.0",
104
109
  "polished": "^3.4.2",
105
- "prettier": "^2.0.2",
106
- "react": "^16.12.0",
107
- "react-big-calendar": "^0.33.2",
110
+ "prettier": "^3.3.2",
111
+ "react": "^17.0.2",
112
+ "react-big-calendar": "^1.13.0",
108
113
  "react-datepicker": "^3.0.0",
109
- "react-dom": "^16.12.0",
114
+ "react-dom": "^17.0.2",
110
115
  "react-hot-loader": "^4.12.18",
111
116
  "react-intl": "5.6.5",
112
117
  "react-measure": "^2.1.2",
@@ -149,7 +154,7 @@
149
154
  },
150
155
  "sideEffects": false,
151
156
  "lint-staged": {
152
- "*.{js,json,md}": [
157
+ "*.{js,json,md,mjs}": [
153
158
  "prettier --write"
154
159
  ],
155
160
  "*.js": [
@@ -0,0 +1,64 @@
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+ import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
4
+ import pluginReactHookConfig from "eslint-plugin-react-hooks";
5
+
6
+ export default [
7
+ { files: ["**/*.{js,mjs,cjs,jsx}"] },
8
+ { languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
9
+ { files: ["**/*.js"], languageOptions: { sourceType: "module" } },
10
+ { languageOptions: { globals: { ...globals.browser, ...globals.node, ...{ Intl: false } } } },
11
+ pluginJs.configs.recommended,
12
+ pluginReactConfig,
13
+ {
14
+ plugins: {
15
+ "react-hooks": pluginReactHookConfig,
16
+ },
17
+ rules: pluginReactHookConfig.configs.recommended.rules,
18
+ },
19
+ {
20
+ files: ["**/*.test.js"],
21
+ languageOptions: { globals: { ...globals.jest } },
22
+ rules: {
23
+ "react/jsx-key": "off",
24
+ },
25
+ },
26
+ {
27
+ files: ["**/*.js"],
28
+ rules: {
29
+ "no-unused-vars": [
30
+ "error",
31
+ {
32
+ vars: "all",
33
+ args: "none",
34
+ caughtErrors: "all",
35
+ ignoreRestSiblings: false,
36
+ },
37
+ ],
38
+ },
39
+ },
40
+ {
41
+ settings: {
42
+ react: {
43
+ version: "detect",
44
+ },
45
+ },
46
+ languageOptions: {
47
+ globals: {
48
+ SUPPORTED_LOCALES: false,
49
+ OVERTURE_APPLICATION: false,
50
+ DEPENDENCIES: false,
51
+ BUILD_ID: false,
52
+ BUILD_NUMBER: false,
53
+ },
54
+ },
55
+ rules: {
56
+ "jsx-a11y/href-no-hash": "off",
57
+ "react/prop-types": "off",
58
+ "react/no-children-prop": "off",
59
+ "react/display-name": "off",
60
+ "no-mixed-spaces-and-tabs": "off",
61
+ "no-case-declarations": "off",
62
+ },
63
+ },
64
+ ];
@@ -1,4 +1,4 @@
1
1
  import Enzyme from "enzyme";
2
- import Adapter from "enzyme-adapter-react-16";
2
+ import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
3
3
 
4
4
  Enzyme.configure({ adapter: new Adapter() });
@@ -1,9 +1,11 @@
1
- module.exports = {
1
+ const config = {
2
2
  useTabs: true,
3
+ tabWidth: 2,
3
4
  trailingComma: "all",
4
5
  printWidth: 120,
5
6
  arrowParens: "avoid",
6
7
  endOfLine: "auto",
7
- tabWidth: 2,
8
8
  semi: true,
9
9
  };
10
+
11
+ export default config;
@@ -91,7 +91,7 @@ module.exports = {
91
91
  type: "Combination",
92
92
  fields: expect.it("to be an array").and("to have items satisfying", "to be a form field"),
93
93
  };
94
- if (subject.hasOwnProperty("proportions")) {
94
+ if (Object.prototype.hasOwnProperty.call(subject, "proportions")) {
95
95
  pattern.proportions = expect
96
96
  .it("to be an array")
97
97
  .and("to have items satisfying", expect.it("to be a string").or("to be a number"))
@@ -109,17 +109,17 @@ module.exports = {
109
109
  name: expect.it("to be a string"),
110
110
  rowField: expect.it("to be a form field").or("to be a form combination field"),
111
111
  };
112
- if (subject.hasOwnProperty("rowCount")) {
112
+ if (Object.prototype.hasOwnProperty.call(subject, "rowCount")) {
113
113
  pattern.rowCount = expect.it("to be a number");
114
114
  }
115
- if (subject.hasOwnProperty("add")) {
115
+ if (Object.prototype.hasOwnProperty.call(subject, "add")) {
116
116
  if (subject.rowCount) {
117
117
  expect.errorMode = "nested";
118
118
  return expect.fail("Form list with row count cannot have 'add' label");
119
119
  }
120
120
  pattern.add = expect.it("to be a label");
121
121
  }
122
- if (subject.hasOwnProperty("staticValues")) {
122
+ if (Object.prototype.hasOwnProperty.call(subject, "staticValues")) {
123
123
  if (!subject.rowCount) {
124
124
  expect.errorMode = "nested";
125
125
  return expect.fail("Form list without row count cannot have static values");
@@ -173,135 +173,135 @@ module.exports = {
173
173
  };
174
174
 
175
175
  const addLabelProp = (expect, subject, pattern) => {
176
- if (subject.hasOwnProperty("label")) {
176
+ if (Object.prototype.hasOwnProperty.call(subject, "label")) {
177
177
  pattern.label = expect.it("to be a label");
178
178
  }
179
179
  };
180
180
 
181
181
  const addMultipleProp = (expect, subject, pattern) => {
182
- if (subject.hasOwnProperty("multiple")) {
182
+ if (Object.prototype.hasOwnProperty.call(subject, "multiple")) {
183
183
  pattern.multiple = expect.it("to be a boolean");
184
184
  }
185
185
  };
186
186
 
187
187
  const addButtonProps = (expect, subject, pattern, small) => {
188
- if (subject.hasOwnProperty("primary")) {
188
+ if (Object.prototype.hasOwnProperty.call(subject, "primary")) {
189
189
  pattern.primary = expect.it("to be a boolean");
190
190
  }
191
- if (subject.hasOwnProperty("active")) {
191
+ if (Object.prototype.hasOwnProperty.call(subject, "active")) {
192
192
  pattern.active = expect.it("to be a boolean");
193
193
  }
194
194
  if (small) {
195
195
  pattern.altText = expect.it("to be a label");
196
196
  pattern.icon = expect.it("to be a string");
197
197
  } else {
198
- if (subject.hasOwnProperty("buttonText")) {
198
+ if (Object.prototype.hasOwnProperty.call(subject, "buttonText")) {
199
199
  pattern.buttonText = expect.it("to be a label");
200
200
  }
201
- if (subject.hasOwnProperty("icon")) {
201
+ if (Object.prototype.hasOwnProperty.call(subject, "icon")) {
202
202
  pattern.icon = expect.it("to be a string");
203
203
  }
204
204
  }
205
- if (subject.hasOwnProperty("autofocus")) {
205
+ if (Object.prototype.hasOwnProperty.call(subject, "autofocus")) {
206
206
  pattern.autofocus = expect.it("to be a boolean");
207
207
  }
208
- if (subject.hasOwnProperty("disabled")) {
208
+ if (Object.prototype.hasOwnProperty.call(subject, "disabled")) {
209
209
  pattern.disabled = expect.it("to be a boolean");
210
210
  }
211
211
  };
212
212
 
213
213
  const addInputProps = (expect, subject, pattern, textual = true) => {
214
- if (textual && subject.hasOwnProperty("autocomplete")) {
214
+ if (textual && Object.prototype.hasOwnProperty.call(subject, "autocomplete")) {
215
215
  pattern.autocomplete = expect.it("to be a string");
216
216
  }
217
- if (subject.hasOwnProperty("autofocus")) {
217
+ if (Object.prototype.hasOwnProperty.call(subject, "autofocus")) {
218
218
  pattern.autofocus = expect.it("to be a boolean");
219
219
  }
220
- if (subject.hasOwnProperty("disabled")) {
220
+ if (Object.prototype.hasOwnProperty.call(subject, "disabled")) {
221
221
  pattern.disabled = expect.it("to be a boolean");
222
222
  }
223
- if (textual && subject.hasOwnProperty("readOnly")) {
223
+ if (textual && Object.prototype.hasOwnProperty.call(subject, "readOnly")) {
224
224
  pattern.readOnly = expect.it("to be a boolean");
225
225
  }
226
- if (subject.hasOwnProperty("required")) {
226
+ if (Object.prototype.hasOwnProperty.call(subject, "required")) {
227
227
  pattern.required = expect.it("to be a label");
228
228
  }
229
- if (subject.hasOwnProperty("tabindex")) {
229
+ if (Object.prototype.hasOwnProperty.call(subject, "tabindex")) {
230
230
  pattern.tabindex = expect.it("to be a number");
231
231
  }
232
232
  };
233
233
 
234
234
  const addTextInputProps = (expect, subject, pattern) => {
235
- if (subject.hasOwnProperty("maxlength")) {
235
+ if (Object.prototype.hasOwnProperty.call(subject, "maxlength")) {
236
236
  pattern.maxlength = expect.it("to be a number").and("to be greater than", 0);
237
237
  }
238
- if (subject.hasOwnProperty("minlength")) {
238
+ if (Object.prototype.hasOwnProperty.call(subject, "minlength")) {
239
239
  pattern.minlength = expect.it("to be a number").and("to be greater than", 0);
240
240
  }
241
- if (subject.hasOwnProperty("pattern")) {
241
+ if (Object.prototype.hasOwnProperty.call(subject, "pattern")) {
242
242
  pattern.pattern = expect.it("to be a regular expression");
243
243
  }
244
- if (subject.hasOwnProperty("placeholder")) {
244
+ if (Object.prototype.hasOwnProperty.call(subject, "placeholder")) {
245
245
  pattern.placeholder = expect.it("to be a label");
246
246
  }
247
- if (subject.hasOwnProperty("size")) {
247
+ if (Object.prototype.hasOwnProperty.call(subject, "size")) {
248
248
  pattern.size = expect.it("to be a number").and("to be greater than", 0);
249
249
  }
250
- if (subject.hasOwnProperty("spellcheck")) {
250
+ if (Object.prototype.hasOwnProperty.call(subject, "spellcheck")) {
251
251
  pattern.spellcheck = expect.it("to be a boolean").or("to be", "");
252
252
  }
253
253
  };
254
254
 
255
255
  const addNumberInputProps = (expect, subject, pattern) => {
256
- if (subject.hasOwnProperty("max")) {
256
+ if (Object.prototype.hasOwnProperty.call(subject, "max")) {
257
257
  pattern.max = expect.it("to be a number");
258
258
  }
259
- if (subject.hasOwnProperty("min")) {
259
+ if (Object.prototype.hasOwnProperty.call(subject, "min")) {
260
260
  pattern.min = expect.it("to be a number");
261
261
  }
262
- if (subject.hasOwnProperty("step")) {
262
+ if (Object.prototype.hasOwnProperty.call(subject, "step")) {
263
263
  pattern.step = expect.it("to be a number");
264
264
  }
265
- if (subject.hasOwnProperty("placeholder")) {
265
+ if (Object.prototype.hasOwnProperty.call(subject, "placeholder")) {
266
266
  pattern.placeholder = expect.it("to be a label");
267
267
  }
268
268
  };
269
269
 
270
270
  const addDateInputProps = (expect, subject, pattern) => {
271
- if (subject.hasOwnProperty("max")) {
271
+ if (Object.prototype.hasOwnProperty.call(subject, "max")) {
272
272
  pattern.max = expect.it("to be a string").and("to match", /^\d{4}-\d{2}-\d{2}$/);
273
273
  }
274
- if (subject.hasOwnProperty("min")) {
274
+ if (Object.prototype.hasOwnProperty.call(subject, "min")) {
275
275
  pattern.min = expect.it("to be a string").and("to match", /^\d{4}-\d{2}-\d{2}$/);
276
276
  }
277
- if (subject.hasOwnProperty("step")) {
277
+ if (Object.prototype.hasOwnProperty.call(subject, "step")) {
278
278
  pattern.step = expect.it("to be a number");
279
279
  }
280
280
  };
281
281
 
282
282
  const addTimeInputProps = (expect, subject, pattern) => {
283
- if (subject.hasOwnProperty("max")) {
283
+ if (Object.prototype.hasOwnProperty.call(subject, "max")) {
284
284
  pattern.max = expect.it("to be a string").and("to match", /^\d{2}:\d{2}(?::\d{2})?$/);
285
285
  }
286
- if (subject.hasOwnProperty("min")) {
286
+ if (Object.prototype.hasOwnProperty.call(subject, "min")) {
287
287
  pattern.min = expect.it("to be a string").and("to match", /^\d{2}:\d{2}(?::\d{2})?$/);
288
288
  }
289
- if (subject.hasOwnProperty("step")) {
289
+ if (Object.prototype.hasOwnProperty.call(subject, "step")) {
290
290
  pattern.step = expect.it("to be a number").or("to be", "any");
291
291
  }
292
292
  };
293
293
 
294
294
  const addSwitchInputProps = (expect, subject, pattern) => {
295
- if (subject.hasOwnProperty("onCaption")) {
295
+ if (Object.prototype.hasOwnProperty.call(subject, "onCaption")) {
296
296
  pattern.onCaption = expect.it("to be a label");
297
297
  }
298
- if (subject.hasOwnProperty("offCaption")) {
298
+ if (Object.prototype.hasOwnProperty.call(subject, "offCaption")) {
299
299
  pattern.offCaption = expect.it("to be a label");
300
300
  }
301
- if (subject.hasOwnProperty("onColor")) {
301
+ if (Object.prototype.hasOwnProperty.call(subject, "onColor")) {
302
302
  pattern.onColor = expect.it("to be a string");
303
303
  }
304
- if (subject.hasOwnProperty("offColor")) {
304
+ if (Object.prototype.hasOwnProperty.call(subject, "offColor")) {
305
305
  pattern.offColor = expect.it("to be a string");
306
306
  }
307
307
  };
@@ -69,10 +69,10 @@ global.expect = unexpected
69
69
  .or("to be an array")
70
70
  .and("to have items satisfying", expect.it("to be a string").or("to be a number")),
71
71
  };
72
- if (subject.hasOwnProperty("width")) {
72
+ if (Object.prototype.hasOwnProperty.call(subject, "width")) {
73
73
  pattern.width = expect.it("to be a string").and("not to match", /[;:{[]/);
74
74
  }
75
- if (subject.hasOwnProperty("type")) {
75
+ if (Object.prototype.hasOwnProperty.call(subject, "type")) {
76
76
  pattern.type = expect
77
77
  .it("to be", "number")
78
78
  .or("to be", "date")
@@ -87,26 +87,26 @@ global.expect = unexpected
87
87
  .or("to be an array")
88
88
  .and("to have items satisfying", "to be a string");
89
89
  }
90
- if (subject.type === "switch" && subject.hasOwnProperty("switch")) {
90
+ if (subject.type === "switch" && Object.prototype.hasOwnProperty.call(subject, "switch")) {
91
91
  pattern.switch = expect.it("to be an object");
92
92
  }
93
93
  if (subject.type === "custom") {
94
94
  pattern.component = expect.it("to be a function");
95
- if (subject.hasOwnProperty("funcs")) {
95
+ if (Object.prototype.hasOwnProperty.call(subject, "funcs")) {
96
96
  pattern.funcs = expect.it("to have values satisfying", "to be a function");
97
97
  }
98
98
  }
99
99
  }
100
- if (subject.hasOwnProperty("transform")) {
100
+ if (Object.prototype.hasOwnProperty.call(subject, "transform")) {
101
101
  pattern.transform = expect.it("to be a function");
102
102
  }
103
- if (subject.hasOwnProperty("label")) {
103
+ if (Object.prototype.hasOwnProperty.call(subject, "label")) {
104
104
  pattern.label = expect.it("to be a label");
105
105
  }
106
- if (subject.hasOwnProperty("sort")) {
106
+ if (Object.prototype.hasOwnProperty.call(subject, "sort")) {
107
107
  pattern.sort = expect.it("to be a function");
108
108
  }
109
- if (subject.hasOwnProperty("defaultValue")) {
109
+ if (Object.prototype.hasOwnProperty.call(subject, "defaultValue")) {
110
110
  pattern.defaultValue = expect.it("to be defined");
111
111
  }
112
112
  return expect(subject, "to exhaustively satisfy", pattern);
package/src/index.js CHANGED
@@ -7,7 +7,7 @@ global.amOrcScripts = /orc-scripts$/.test(require("pkg-dir").sync() || "");
7
7
  let shouldThrow;
8
8
  try {
9
9
  shouldThrow = Number(process.version.slice(1).split(".")[0]) < 10;
10
- } catch (error) {
10
+ } catch {
11
11
  // ignore
12
12
  }
13
13
 
package/src/run-script.js CHANGED
@@ -76,7 +76,7 @@ function spawnScript() {
76
76
  function attemptResolve(...resolveArgs) {
77
77
  try {
78
78
  return require.resolve(...resolveArgs);
79
- } catch (error) {
79
+ } catch {
80
80
  return null;
81
81
  }
82
82
  }
@@ -65,7 +65,9 @@ async function build(repos) {
65
65
 
66
66
  try {
67
67
  await makeDir("builds");
68
- } catch (_) {}
68
+ } catch {
69
+ // don't do anything
70
+ }
69
71
 
70
72
  const releaseArgs = ["--branch", releaseBranch, "--single-branch"];
71
73
 
@@ -20,7 +20,9 @@ async function prep() {
20
20
  copyFile(contentDir, path.resolve(distDir, "content")),
21
21
  copyFile(mockDir, path.resolve(distDir, "__mocks__")),
22
22
  ]);
23
- } catch (_) {}
23
+ } catch {
24
+ // don't do anything
25
+ }
24
26
 
25
27
  if (process.env.NODE_ENV === "production") {
26
28
  // production build will not copy the static files
@@ -28,7 +30,9 @@ async function prep() {
28
30
  try {
29
31
  const files = await readdir(staticDir);
30
32
  await Promise.all(files.map(file => copyFile(path.resolve(staticDir, file), path.resolve(distDir, file))));
31
- } catch (_) {}
33
+ } catch {
34
+ // don't do anything
35
+ }
32
36
  }
33
37
 
34
38
  if (existsSync(projectSpecificPrep)) {
package/src/utils.js CHANGED
@@ -4,7 +4,8 @@ const arrify = require("arrify");
4
4
  const which = require("which");
5
5
  const readPkgUp = require("read-pkg-up");
6
6
 
7
- const hasOwn = (obj, key) => obj.hasOwnProperty(key) && obj[key] !== null && obj[key] !== undefined;
7
+ const hasOwn = (obj, key) =>
8
+ Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== null && obj[key] !== undefined;
8
9
 
9
10
  const hasPath = (obj, keys) => {
10
11
  const [key, ...tail] = keys;
@@ -46,7 +47,7 @@ function parseEnv(name, def) {
46
47
  if (envIsSet(name)) {
47
48
  try {
48
49
  return JSON.parse(process.env[name] || "<fail>");
49
- } catch (err) {
50
+ } catch {
50
51
  return process.env[name];
51
52
  }
52
53
  }
@@ -54,14 +55,16 @@ function parseEnv(name, def) {
54
55
  }
55
56
 
56
57
  function envIsSet(name) {
57
- return process.env.hasOwnProperty(name) && process.env[name] && process.env[name] !== "undefined";
58
+ return (
59
+ Object.prototype.hasOwnProperty.call(process.env, name) && process.env[name] && process.env[name] !== "undefined"
60
+ );
58
61
  }
59
62
 
60
63
  function resolveBin(modName, { executable = modName, cwd = process.cwd() } = {}) {
61
64
  let pathFromWhich;
62
65
  try {
63
66
  pathFromWhich = fs.realpathSync(which.sync(executable));
64
- } catch (_error) {
67
+ } catch {
65
68
  // ignore _error
66
69
  }
67
70
  try {
package/eslint.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./src/config/eslintrc");
package/prettier.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./src/config/prettier.config");
@@ -1,15 +0,0 @@
1
- const eslintrc = {
2
- extends: ["react-app"],
3
- rules: {
4
- "jsx-a11y/href-no-hash": "off",
5
- },
6
- globals: {
7
- SUPPORTED_LOCALES: false,
8
- OVERTURE_APPLICATION: false,
9
- DEPENDENCIES: false,
10
- BUILD_ID: false,
11
- BUILD_NUMBER: false,
12
- },
13
- };
14
-
15
- module.exports = eslintrc;