@shopify/shop-minis-react 0.19.0 → 0.20.0
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/eslint/config.cjs +20 -0
- package/package.json +2 -1
package/eslint/config.cjs
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
// Import the plugin directly so consumers don't need to install it separately
|
|
10
10
|
const compatPlugin = require('eslint-plugin-compat')
|
|
11
|
+
const importXPlugin = require('eslint-plugin-import-x')
|
|
11
12
|
const reactPlugin = require('eslint-plugin-react')
|
|
12
13
|
|
|
13
14
|
const shopMinisPlugin = require('./index.cjs')
|
|
@@ -29,6 +30,7 @@ module.exports = {
|
|
|
29
30
|
'shop-minis': shopMinisPlugin,
|
|
30
31
|
react: reactPlugin,
|
|
31
32
|
compat: compatPlugin,
|
|
33
|
+
'import-x': importXPlugin,
|
|
32
34
|
},
|
|
33
35
|
rules: {
|
|
34
36
|
// Console usage
|
|
@@ -37,6 +39,24 @@ module.exports = {
|
|
|
37
39
|
// React security
|
|
38
40
|
'react/no-danger': 'error',
|
|
39
41
|
|
|
42
|
+
// Block phantom-dep imports: every imported package must be declared in
|
|
43
|
+
// package.json. Hoisting can make undeclared imports resolve locally but
|
|
44
|
+
// they break under strict installs (pnpm) in the submission pipeline.
|
|
45
|
+
'import-x/no-extraneous-dependencies': [
|
|
46
|
+
'error',
|
|
47
|
+
{
|
|
48
|
+
devDependencies: [
|
|
49
|
+
'**/*.test.{js,jsx,ts,tsx}',
|
|
50
|
+
'**/*.spec.{js,jsx,ts,tsx}',
|
|
51
|
+
'**/test-setup.{js,ts}',
|
|
52
|
+
'**/test-utils.{js,jsx,ts,tsx}',
|
|
53
|
+
'**/setup-tests.{js,ts}',
|
|
54
|
+
'**/*.config.{js,cjs,mjs,ts}',
|
|
55
|
+
],
|
|
56
|
+
includeTypes: true,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
|
|
40
60
|
// Shop Minis custom rules
|
|
41
61
|
'shop-minis/no-dynamic-asset-paths': 'warn',
|
|
42
62
|
'shop-minis/no-env-without-fallback': 'error',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/shop-minis-react",
|
|
3
3
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.20.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"embla-carousel-react": "8.6.0",
|
|
78
78
|
"eslint": "8.57.0",
|
|
79
79
|
"eslint-plugin-compat": "6.0.2",
|
|
80
|
+
"eslint-plugin-import-x": "4.16.2",
|
|
80
81
|
"eslint-plugin-no-secrets": "2.2.1",
|
|
81
82
|
"eslint-plugin-react": "7.37.5",
|
|
82
83
|
"js-base64": "3.7.7",
|