@graphcommerce/eslint-config-pwa 4.0.4 → 4.0.5

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +49 -89
  2. package/index.js +62 -52
  3. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,26 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name.
8
+
9
+ * [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
10
+
11
+ * Updated dependencies [[`7f71a9eaa`](https://github.com/ho-nl/m2-pwa/commit/7f71a9eaaea7de6ca3fab7cbb55049f1b1cd6427)]:
12
+ - @graphcommerce/prettier-config-pwa@4.0.3
13
+
3
14
  ## 4.0.4
4
15
 
5
16
  ### Patch Changes
6
17
 
7
- - [#1285](https://github.com/ho-nl/m2-pwa/pull/1285)
8
- [`c85294ba6`](https://github.com/ho-nl/m2-pwa/commit/c85294ba6d742ce78c074559a1e95409b25a5017)
9
- Thanks [@paales](https://github.com/paales)! - upgraded dependencies
18
+ - [#1285](https://github.com/ho-nl/m2-pwa/pull/1285) [`c85294ba6`](https://github.com/ho-nl/m2-pwa/commit/c85294ba6d742ce78c074559a1e95409b25a5017) Thanks [@paales](https://github.com/paales)! - upgraded dependencies
10
19
 
11
20
  ## 4.0.3
12
21
 
13
22
  ### Patch Changes
14
23
 
15
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
16
- Thanks [@paales](https://github.com/paales)! - made packages public
24
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
17
25
 
18
- * [#1278](https://github.com/ho-nl/m2-pwa/pull/1278)
19
- [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20)
20
- Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
26
+ * [#1278](https://github.com/ho-nl/m2-pwa/pull/1278) [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
21
27
 
22
- * Updated dependencies
23
- [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
28
+ * Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
24
29
  - @graphcommerce/prettier-config-pwa@4.0.2
25
30
  - @graphcommerce/typescript-config-pwa@4.0.2
26
31
 
@@ -28,32 +33,18 @@
28
33
 
29
34
  ### Patch Changes
30
35
 
31
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
32
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
33
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
34
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
35
- duplicate packages in the node_modules folders.
36
+ - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders.
36
37
 
37
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
38
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
39
- Thanks [@paales](https://github.com/paales)! - Upgraded to
40
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
41
- implementing
42
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
43
- soon.
38
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon.
44
39
 
45
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
46
- frontend to be able to revalidate pages manually.
40
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually.
47
41
 
48
42
  ## 4.0.1
49
43
 
50
44
  ### Patch Changes
51
45
 
52
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
53
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
54
- so that the packages link to back to the website and repository
55
- - Updated dependencies
56
- [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
46
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository
47
+ - Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
57
48
  - @graphcommerce/prettier-config-pwa@4.0.1
58
49
  - @graphcommerce/typescript-config-pwa@4.0.1
59
50
 
@@ -61,40 +52,33 @@
61
52
 
62
53
  ### Major Changes
63
54
 
64
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
65
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
66
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
55
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
67
56
 
68
57
  ### Patch Changes
69
58
 
70
- - Updated dependencies
71
- [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
59
+ - Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
72
60
  - @graphcommerce/typescript-config-pwa@4.0.0
73
61
  - @graphcommerce/prettier-config-pwa@4.0.0
74
62
 
75
- All notable changes to this project will be documented in this file. See
76
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
63
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
77
64
 
78
65
  ## [3.1.5](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/eslint-config-pwa@3.1.4...@graphcommerce/eslint-config-pwa@3.1.5) (2021-11-12)
79
66
 
80
67
  ### Bug Fixes
81
68
 
82
- - eslint doesn't start properly
83
- ([3e01cfb](https://github.com/ho-nl/m2-pwa/commit/3e01cfb89ef73de2b520399c9428b88114844b02))
69
+ - eslint doesn't start properly ([3e01cfb](https://github.com/ho-nl/m2-pwa/commit/3e01cfb89ef73de2b520399c9428b88114844b02))
84
70
 
85
71
  # [3.1.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/eslint-config-pwa@3.0.8...@graphcommerce/eslint-config-pwa@3.1.0) (2021-10-21)
86
72
 
87
73
  ### Features
88
74
 
89
- - **graphql-mesh:** remove the api project and use a single project 🎉👩‍👩‍👦‍👦
90
- ([ea4ad03](https://github.com/ho-nl/m2-pwa/commit/ea4ad0397d4ff289ef3b3253593fb0914c8c5246))
75
+ - **graphql-mesh:** remove the api project and use a single project 🎉👩‍👩‍👦‍👦 ([ea4ad03](https://github.com/ho-nl/m2-pwa/commit/ea4ad0397d4ff289ef3b3253593fb0914c8c5246))
91
76
 
92
77
  ## [3.0.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/eslint-config-pwa@3.0.2...@graphcommerce/eslint-config-pwa@3.0.3) (2021-09-28)
93
78
 
94
79
  ### Bug Fixes
95
80
 
96
- - eslint not working
97
- ([68c76b3](https://github.com/ho-nl/m2-pwa/commit/68c76b3f4bc1f7dbf490b331e72f0d91afc634bf))
81
+ - eslint not working ([68c76b3](https://github.com/ho-nl/m2-pwa/commit/68c76b3f4bc1f7dbf490b331e72f0d91afc634bf))
98
82
 
99
83
  ## [3.0.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/eslint-config-pwa@3.0.0...@graphcommerce/eslint-config-pwa@3.0.1) (2021-09-27)
100
84
 
@@ -104,53 +88,33 @@ All notable changes to this project will be documented in this file. See
104
88
 
105
89
  ### Bug Fixes
106
90
 
107
- - [@typescript-eslint](https://github.com/typescript-eslint) package not found
108
- ([09ccae0](https://github.com/ho-nl/m2-pwa/commit/09ccae09605e0bab83a2168677e9752d16b24e9d))
109
- - disable prefer-default-export for ts files as they are usually libraries
110
- ([7c91b32](https://github.com/ho-nl/m2-pwa/commit/7c91b32d008ffdf1651d5255891f602f7b27e534))
111
- - **eslint-config:** allow console.info
112
- ([ea55b1d](https://github.com/ho-nl/m2-pwa/commit/ea55b1d3fe08bacae8044fb111c74c5497e5a591))
113
- - ignore md files from triggering version updates
114
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
115
- - make eslint config compatible with eslint-config-prettier@8.0.0
116
- ([a4978f9](https://github.com/ho-nl/m2-pwa/commit/a4978f968c0115279e2cb7457d4502f70d7d05d4))
117
- - move back to yarn 1.19.1
118
- ([ce36c53](https://github.com/ho-nl/m2-pwa/commit/ce36c53b94c0f834b5e4da5e0d7e3b2bb02754bf))
119
- - playwright.ts files error
120
- ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
121
- - remove cyclic dependencies
122
- ([8a59389](https://github.com/ho-nl/m2-pwa/commit/8a5938943a97634cce57c68bb369c6e77e7a0288))
123
- - remove unused property from eslint config ignorePatterns
124
- ([a8a7af1](https://github.com/ho-nl/m2-pwa/commit/a8a7af1754542bd5b445e54642e563ac6c386913))
91
+ - [@typescript-eslint](https://github.com/typescript-eslint) package not found ([09ccae0](https://github.com/ho-nl/m2-pwa/commit/09ccae09605e0bab83a2168677e9752d16b24e9d))
92
+ - disable prefer-default-export for ts files as they are usually libraries ([7c91b32](https://github.com/ho-nl/m2-pwa/commit/7c91b32d008ffdf1651d5255891f602f7b27e534))
93
+ - **eslint-config:** allow console.info ([ea55b1d](https://github.com/ho-nl/m2-pwa/commit/ea55b1d3fe08bacae8044fb111c74c5497e5a591))
94
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
95
+ - make eslint config compatible with eslint-config-prettier@8.0.0 ([a4978f9](https://github.com/ho-nl/m2-pwa/commit/a4978f968c0115279e2cb7457d4502f70d7d05d4))
96
+ - move back to yarn 1.19.1 ([ce36c53](https://github.com/ho-nl/m2-pwa/commit/ce36c53b94c0f834b5e4da5e0d7e3b2bb02754bf))
97
+ - playwright.ts files error ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
98
+ - remove cyclic dependencies ([8a59389](https://github.com/ho-nl/m2-pwa/commit/8a5938943a97634cce57c68bb369c6e77e7a0288))
99
+ - remove unused property from eslint config ignorePatterns ([a8a7af1](https://github.com/ho-nl/m2-pwa/commit/a8a7af1754542bd5b445e54642e563ac6c386913))
125
100
 
126
101
  ### Features
127
102
 
128
- - added eslint-plugin-next to have more linting
129
- ([599c9f0](https://github.com/ho-nl/m2-pwa/commit/599c9f0ff7c07cae3791d6bda819beabaed82f4e))
130
- - created stacked-pages package
131
- ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
132
- - **eslint:** no-relative-packages, prevent importing other packages by relative paths
133
- ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
134
- - **framer-next-pages:** enable dragging when the content isn’t scrollable
135
- ([3df9115](https://github.com/ho-nl/m2-pwa/commit/3df9115d3fbf72dbe547780f0bc6ce80e42b9e47))
136
- - next.js 11
137
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
138
- - **playwright:** added new playwright package to enable browser testing
139
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
140
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
141
- [@reachdigital](https://github.com/reachdigital)
142
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
143
- - upgrade to node 14
144
- ([d079a75](https://github.com/ho-nl/m2-pwa/commit/d079a751e9bfd8dc7f5009d2c9f31c336a0c96ab))
145
- - use official nextjs image endpoint
146
- ([0e76ab4](https://github.com/ho-nl/m2-pwa/commit/0e76ab4cece15d4d6f192cb938588a34abaebe8a))
103
+ - added eslint-plugin-next to have more linting ([599c9f0](https://github.com/ho-nl/m2-pwa/commit/599c9f0ff7c07cae3791d6bda819beabaed82f4e))
104
+ - created stacked-pages package ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
105
+ - **eslint:** no-relative-packages, prevent importing other packages by relative paths ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
106
+ - **framer-next-pages:** enable dragging when the content isn’t scrollable ([3df9115](https://github.com/ho-nl/m2-pwa/commit/3df9115d3fbf72dbe547780f0bc6ce80e42b9e47))
107
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
108
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
109
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
110
+ - upgrade to node 14 ([d079a75](https://github.com/ho-nl/m2-pwa/commit/d079a751e9bfd8dc7f5009d2c9f31c336a0c96ab))
111
+ - use official nextjs image endpoint ([0e76ab4](https://github.com/ho-nl/m2-pwa/commit/0e76ab4cece15d4d6f192cb938588a34abaebe8a))
147
112
 
148
113
  ## 2.0.8 (2020-10-28)
149
114
 
150
115
  ### Features
151
116
 
152
- - split into packages
153
- ([2ee7fd6](https://github.com/ho-nl/m2-pwa/commit/2ee7fd6c0056f467d114f04d92c6c0ddf622d151))
117
+ - split into packages ([2ee7fd6](https://github.com/ho-nl/m2-pwa/commit/2ee7fd6c0056f467d114f04d92c6c0ddf622d151))
154
118
 
155
119
  ### BREAKING CHANGES
156
120
 
@@ -160,19 +124,15 @@ All notable changes to this project will be documented in this file. See
160
124
 
161
125
  ### Features
162
126
 
163
- - **eslint:** no-relative-packages, prevent importing other packages by relative paths
164
- ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
127
+ - **eslint:** no-relative-packages, prevent importing other packages by relative paths ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
165
128
 
166
129
  # [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/eslint-config-pwa@2.100.10...@graphcommerce/eslint-config-pwa@2.101.0) (2021-07-26)
167
130
 
168
131
  ### Bug Fixes
169
132
 
170
- - ignore md files from triggering version updates
171
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
172
- - playwright.ts files error
173
- ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
133
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
134
+ - playwright.ts files error ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
174
135
 
175
136
  ### Features
176
137
 
177
- - **playwright:** added new playwright package to enable browser testing
178
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
138
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  env: {
3
3
  browser: true,
4
- es6: true,
4
+ es2022: true,
5
5
  node: true,
6
6
  },
7
7
  extends: [
@@ -29,54 +29,17 @@ module.exports = {
29
29
  },
30
30
  plugins: ['react', '@typescript-eslint', '@next/eslint-plugin-next'],
31
31
  rules: {
32
- '@next/next/no-html-link-for-pages': 'off',
33
- 'import/no-extraneous-dependencies': [
34
- 'error',
35
- {
36
- devDependencies: ['next.config.js', '**/__tests__/**', '**/_playwright/**'],
37
- },
38
- ],
39
- 'import/order': ['warn', { alphabetize: { order: 'asc' } }],
40
- 'import/prefer-default-export': 'off',
41
- 'no-param-reassign': ['error', { props: false }],
42
- 'jsx-a11y/anchor-is-valid': 'off',
32
+ // eslint
43
33
  'default-case': 'off',
44
- '@typescript-eslint/indent': 'off',
45
- 'react/jsx-one-expression-per-line': 'off',
46
- 'react/prop-types': 'off',
47
- 'react/jsx-props-no-spreading': 'off',
48
- 'react/react-in-jsx-scope': 'off',
49
- 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
50
- 'react-hooks/exhaustive-deps': ['error', { additionalHooks: '(useIsomorphicLayoutEffect)' }],
51
- 'react/no-unescaped-entities': 'off',
34
+ 'no-plusplus': 'off',
35
+ 'no-param-reassign': ['error', { props: false }],
52
36
  'no-console': [1, { allow: ['warn', 'error', 'info'] }],
53
- '@typescript-eslint/semi': 'off',
54
- 'spaced-comment': [
55
- 'error',
56
- 'always',
57
- {
58
- markers: ['/'],
59
- },
60
- ],
61
-
37
+ 'spaced-comment': ['error', 'always', { markers: ['/'] }],
38
+ 'prefer-const': ['error', { destructuring: 'all' }],
62
39
  'no-underscore-dangle': [
63
40
  'error',
64
41
  { allow: ['__typename', '__type', '_N_X', '_N_Y', '__N', '__NEXT'] },
65
42
  ],
66
- 'react/jsx-key': ['error', { checkFragmentShorthand: true }],
67
- 'react/jsx-no-duplicate-props': ['error', { ignoreCase: false }],
68
- 'react/require-default-props': 'off',
69
- 'react/destructuring-assignment': 'off',
70
-
71
- '@typescript-eslint/explicit-function-return-type': 'off',
72
- '@typescript-eslint/no-unsafe-assignment': 'off',
73
- '@typescript-eslint/no-unsafe-call': 'off',
74
- '@typescript-eslint/no-unsafe-member-access': 'off',
75
- '@typescript-eslint/no-unsafe-return': 'off',
76
- '@typescript-eslint/restrict-template-expressions': 'off',
77
- '@typescript-eslint/explicit-module-boundary-types': 'off',
78
- '@typescript-eslint/naming-convention': 'off',
79
- 'no-plusplus': 0,
80
43
  'no-restricted-syntax': [
81
44
  'error',
82
45
  {
@@ -96,22 +59,69 @@ module.exports = {
96
59
  },
97
60
  ],
98
61
 
99
- // Remove when fixed: https://github.com/react-hook-form/react-hook-form/issues/2887
100
- '@typescript-eslint/unbound-method': 'off',
101
-
62
+ // plugin:import/recommended & plugin:import/typescript
63
+ 'import/prefer-default-export': 'off',
64
+ 'import/no-extraneous-dependencies': [
65
+ 'error',
66
+ {
67
+ devDependencies: ['next.config.js', '**/__tests__/**', '**/_playwright/**', '**/*.d.ts'],
68
+ },
69
+ ],
70
+ 'import/order': ['warn', { alphabetize: { order: 'asc' } }],
102
71
  'import/no-relative-packages': 'error',
103
72
 
104
- // Remove when fixed: https://github.com/airbnb/javascript/pull/2501/files
73
+ // next
74
+ '@next/next/no-html-link-for-pages': 'off',
75
+
76
+ // jsx-a11y
77
+ 'jsx-a11y/anchor-is-valid': 'off',
78
+
79
+ // react
80
+ 'react/jsx-one-expression-per-line': 'off',
81
+ 'react/prop-types': 'off',
82
+ 'react/jsx-props-no-spreading': 'off',
83
+ 'react/react-in-jsx-scope': 'off',
84
+ 'react/no-unescaped-entities': 'off',
85
+ 'react/require-default-props': 'off',
86
+ 'react/destructuring-assignment': 'off',
87
+ 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
88
+ 'react-hooks/exhaustive-deps': ['error', { additionalHooks: '(useIsomorphicLayoutEffect)' }],
89
+ 'react/jsx-key': ['error', { checkFragmentShorthand: true }],
90
+ 'react/jsx-no-duplicate-props': ['error', { ignoreCase: false }],
105
91
  'react/function-component-definition': 'off',
106
92
 
107
- 'prefer-const': ['error', { destructuring: 'all' }],
93
+ // typescript
94
+ '@typescript-eslint/indent': 'off',
95
+ '@typescript-eslint/semi': 'off',
96
+ '@typescript-eslint/explicit-function-return-type': 'off',
97
+ '@typescript-eslint/no-unsafe-assignment': 'off',
98
+ '@typescript-eslint/no-unsafe-call': 'off',
99
+ '@typescript-eslint/no-unsafe-member-access': 'off',
100
+ '@typescript-eslint/no-unsafe-return': 'off',
101
+ '@typescript-eslint/restrict-template-expressions': 'off',
102
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
103
+ '@typescript-eslint/naming-convention': 'off',
104
+ '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
105
+ '@typescript-eslint/no-restricted-imports': [
106
+ 'error',
107
+ {
108
+ paths: [
109
+ {
110
+ name: 'next/image',
111
+ message: "Please use `import { Image } from '@graphcommerce/image'` instead.",
112
+ },
113
+ ],
114
+ },
115
+ ],
108
116
  },
109
117
  overrides: [
110
118
  {
111
- files: ['*.ts'],
112
- rules: {
113
- 'import/prefer-default-export': 'off',
114
- },
119
+ files: ['*.tsx'],
120
+ rules: { 'import/no-default-export': ['error'] },
121
+ },
122
+ {
123
+ files: ['**/pages/**/*.tsx'],
124
+ rules: { 'import/no-default-export': 'off' },
115
125
  },
116
126
  {
117
127
  files: ['generated/*'],
package/package.json CHANGED
@@ -2,21 +2,21 @@
2
2
  "name": "@graphcommerce/eslint-config-pwa",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.0.4",
5
+ "version": "4.0.5",
6
6
  "main": "index.js",
7
7
  "dependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^4.0.2",
8
+ "@graphcommerce/prettier-config-pwa": "^4.0.3",
9
9
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
10
10
  "@next/eslint-plugin-next": "^12.1.0",
11
- "@typescript-eslint/eslint-plugin": "^5.12.1",
12
- "@typescript-eslint/parser": "^5.12.1",
11
+ "@typescript-eslint/eslint-plugin": "^5.14.0",
12
+ "@typescript-eslint/parser": "^5.14.0",
13
13
  "eslint-config-airbnb": "^19.0.4",
14
- "eslint-config-airbnb-typescript": "^16.1.0",
15
- "eslint-config-prettier": "^8.3.0",
14
+ "eslint-config-airbnb-typescript": "^16.1.1",
15
+ "eslint-config-prettier": "^8.5.0",
16
16
  "eslint-import-resolver-webpack": "^0.13.2",
17
17
  "eslint-plugin-import": "^2.25.4",
18
18
  "eslint-plugin-jsx-a11y": "^6.5.1",
19
- "eslint-plugin-react": "^7.29.2",
19
+ "eslint-plugin-react": "^7.29.3",
20
20
  "eslint-plugin-react-hooks": "^4.3.0"
21
21
  },
22
22
  "peerDependencies": {