@graphcommerce/eslint-config-pwa 4.0.2 → 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 +63 -79
  2. package/index.js +62 -52
  3. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,35 +1,50 @@
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
+
14
+ ## 4.0.4
15
+
16
+ ### Patch Changes
17
+
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
19
+
20
+ ## 4.0.3
21
+
22
+ ### Patch Changes
23
+
24
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
25
+
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
27
+
28
+ * Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
29
+ - @graphcommerce/prettier-config-pwa@4.0.2
30
+ - @graphcommerce/typescript-config-pwa@4.0.2
31
+
3
32
  ## 4.0.2
4
33
 
5
34
  ### Patch Changes
6
35
 
7
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
8
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
9
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
10
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
11
- 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.
12
37
 
13
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
14
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
15
- Thanks [@paales](https://github.com/paales)! - Upgraded to
16
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
17
- implementing
18
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
19
- 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.
20
39
 
21
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
22
- 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.
23
41
 
24
42
  ## 4.0.1
25
43
 
26
44
  ### Patch Changes
27
45
 
28
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
29
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
30
- so that the packages link to back to the website and repository
31
- - Updated dependencies
32
- [[`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)]:
33
48
  - @graphcommerce/prettier-config-pwa@4.0.1
34
49
  - @graphcommerce/typescript-config-pwa@4.0.1
35
50
 
@@ -37,40 +52,33 @@
37
52
 
38
53
  ### Major Changes
39
54
 
40
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
41
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
42
- 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
43
56
 
44
57
  ### Patch Changes
45
58
 
46
- - Updated dependencies
47
- [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
59
+ - Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
48
60
  - @graphcommerce/typescript-config-pwa@4.0.0
49
61
  - @graphcommerce/prettier-config-pwa@4.0.0
50
62
 
51
- All notable changes to this project will be documented in this file. See
52
- [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.
53
64
 
54
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)
55
66
 
56
67
  ### Bug Fixes
57
68
 
58
- - eslint doesn't start properly
59
- ([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))
60
70
 
61
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)
62
72
 
63
73
  ### Features
64
74
 
65
- - **graphql-mesh:** remove the api project and use a single project 🎉👩‍👩‍👦‍👦
66
- ([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))
67
76
 
68
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)
69
78
 
70
79
  ### Bug Fixes
71
80
 
72
- - eslint not working
73
- ([68c76b3](https://github.com/ho-nl/m2-pwa/commit/68c76b3f4bc1f7dbf490b331e72f0d91afc634bf))
81
+ - eslint not working ([68c76b3](https://github.com/ho-nl/m2-pwa/commit/68c76b3f4bc1f7dbf490b331e72f0d91afc634bf))
74
82
 
75
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)
76
84
 
@@ -80,53 +88,33 @@ All notable changes to this project will be documented in this file. See
80
88
 
81
89
  ### Bug Fixes
82
90
 
83
- - [@typescript-eslint](https://github.com/typescript-eslint) package not found
84
- ([09ccae0](https://github.com/ho-nl/m2-pwa/commit/09ccae09605e0bab83a2168677e9752d16b24e9d))
85
- - disable prefer-default-export for ts files as they are usually libraries
86
- ([7c91b32](https://github.com/ho-nl/m2-pwa/commit/7c91b32d008ffdf1651d5255891f602f7b27e534))
87
- - **eslint-config:** allow console.info
88
- ([ea55b1d](https://github.com/ho-nl/m2-pwa/commit/ea55b1d3fe08bacae8044fb111c74c5497e5a591))
89
- - ignore md files from triggering version updates
90
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
91
- - make eslint config compatible with eslint-config-prettier@8.0.0
92
- ([a4978f9](https://github.com/ho-nl/m2-pwa/commit/a4978f968c0115279e2cb7457d4502f70d7d05d4))
93
- - move back to yarn 1.19.1
94
- ([ce36c53](https://github.com/ho-nl/m2-pwa/commit/ce36c53b94c0f834b5e4da5e0d7e3b2bb02754bf))
95
- - playwright.ts files error
96
- ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
97
- - remove cyclic dependencies
98
- ([8a59389](https://github.com/ho-nl/m2-pwa/commit/8a5938943a97634cce57c68bb369c6e77e7a0288))
99
- - remove unused property from eslint config ignorePatterns
100
- ([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))
101
100
 
102
101
  ### Features
103
102
 
104
- - added eslint-plugin-next to have more linting
105
- ([599c9f0](https://github.com/ho-nl/m2-pwa/commit/599c9f0ff7c07cae3791d6bda819beabaed82f4e))
106
- - created stacked-pages package
107
- ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
108
- - **eslint:** no-relative-packages, prevent importing other packages by relative paths
109
- ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
110
- - **framer-next-pages:** enable dragging when the content isn’t scrollable
111
- ([3df9115](https://github.com/ho-nl/m2-pwa/commit/3df9115d3fbf72dbe547780f0bc6ce80e42b9e47))
112
- - next.js 11
113
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
114
- - **playwright:** added new playwright package to enable browser testing
115
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
116
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
117
- [@reachdigital](https://github.com/reachdigital)
118
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
119
- - upgrade to node 14
120
- ([d079a75](https://github.com/ho-nl/m2-pwa/commit/d079a751e9bfd8dc7f5009d2c9f31c336a0c96ab))
121
- - use official nextjs image endpoint
122
- ([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))
123
112
 
124
113
  ## 2.0.8 (2020-10-28)
125
114
 
126
115
  ### Features
127
116
 
128
- - split into packages
129
- ([2ee7fd6](https://github.com/ho-nl/m2-pwa/commit/2ee7fd6c0056f467d114f04d92c6c0ddf622d151))
117
+ - split into packages ([2ee7fd6](https://github.com/ho-nl/m2-pwa/commit/2ee7fd6c0056f467d114f04d92c6c0ddf622d151))
130
118
 
131
119
  ### BREAKING CHANGES
132
120
 
@@ -136,19 +124,15 @@ All notable changes to this project will be documented in this file. See
136
124
 
137
125
  ### Features
138
126
 
139
- - **eslint:** no-relative-packages, prevent importing other packages by relative paths
140
- ([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))
141
128
 
142
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)
143
130
 
144
131
  ### Bug Fixes
145
132
 
146
- - ignore md files from triggering version updates
147
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
148
- - playwright.ts files error
149
- ([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))
150
135
 
151
136
  ### Features
152
137
 
153
- - **playwright:** added new playwright package to enable browser testing
154
- ([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.2",
5
+ "version": "4.0.5",
6
6
  "main": "index.js",
7
7
  "dependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^4.0.1",
9
- "@graphcommerce/typescript-config-pwa": "^4.0.1",
8
+ "@graphcommerce/prettier-config-pwa": "^4.0.3",
9
+ "@graphcommerce/typescript-config-pwa": "^4.0.2",
10
10
  "@next/eslint-plugin-next": "^12.1.0",
11
- "@typescript-eslint/eslint-plugin": "^5.12.0",
12
- "@typescript-eslint/parser": "^5.12.0",
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.28.0",
19
+ "eslint-plugin-react": "^7.29.3",
20
20
  "eslint-plugin-react-hooks": "^4.3.0"
21
21
  },
22
22
  "peerDependencies": {