@graphcommerce/eslint-config-pwa 3.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,82 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [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)
7
+
8
+ **Note:** Version bump only for package @graphcommerce/eslint-config-pwa
9
+
10
+
11
+
12
+
13
+
14
+ # 3.0.0 (2021-09-27)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * [@typescript-eslint](https://github.com/typescript-eslint) package not found ([09ccae0](https://github.com/ho-nl/m2-pwa/commit/09ccae09605e0bab83a2168677e9752d16b24e9d))
20
+ * disable prefer-default-export for ts files as they are usually libraries ([7c91b32](https://github.com/ho-nl/m2-pwa/commit/7c91b32d008ffdf1651d5255891f602f7b27e534))
21
+ * **eslint-config:** allow console.info ([ea55b1d](https://github.com/ho-nl/m2-pwa/commit/ea55b1d3fe08bacae8044fb111c74c5497e5a591))
22
+ * ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
23
+ * make eslint config compatible with eslint-config-prettier@8.0.0 ([a4978f9](https://github.com/ho-nl/m2-pwa/commit/a4978f968c0115279e2cb7457d4502f70d7d05d4))
24
+ * move back to yarn 1.19.1 ([ce36c53](https://github.com/ho-nl/m2-pwa/commit/ce36c53b94c0f834b5e4da5e0d7e3b2bb02754bf))
25
+ * playwright.ts files error ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
26
+ * remove cyclic dependencies ([8a59389](https://github.com/ho-nl/m2-pwa/commit/8a5938943a97634cce57c68bb369c6e77e7a0288))
27
+ * remove unused property from eslint config ignorePatterns ([a8a7af1](https://github.com/ho-nl/m2-pwa/commit/a8a7af1754542bd5b445e54642e563ac6c386913))
28
+
29
+
30
+ ### Features
31
+
32
+ * added eslint-plugin-next to have more linting ([599c9f0](https://github.com/ho-nl/m2-pwa/commit/599c9f0ff7c07cae3791d6bda819beabaed82f4e))
33
+ * created stacked-pages package ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
34
+ * **eslint:** no-relative-packages, prevent importing other packages by relative paths ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
35
+ * **framer-next-pages:** enable dragging when the content isn’t scrollable ([3df9115](https://github.com/ho-nl/m2-pwa/commit/3df9115d3fbf72dbe547780f0bc6ce80e42b9e47))
36
+ * next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
37
+ * **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
38
+ * 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))
39
+ * upgrade to node 14 ([d079a75](https://github.com/ho-nl/m2-pwa/commit/d079a751e9bfd8dc7f5009d2c9f31c336a0c96ab))
40
+ * use official nextjs image endpoint ([0e76ab4](https://github.com/ho-nl/m2-pwa/commit/0e76ab4cece15d4d6f192cb938588a34abaebe8a))
41
+
42
+
43
+
44
+ ## 2.0.8 (2020-10-28)
45
+
46
+
47
+ ### Features
48
+
49
+ * split into packages ([2ee7fd6](https://github.com/ho-nl/m2-pwa/commit/2ee7fd6c0056f467d114f04d92c6c0ddf622d151))
50
+
51
+
52
+ ### BREAKING CHANGES
53
+
54
+ * huge folder structure refactor, please read README to reinstall
55
+
56
+
57
+
58
+
59
+
60
+ # [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/eslint-config-pwa@2.101.0...@graphcommerce/eslint-config-pwa@2.102.0) (2021-07-28)
61
+
62
+
63
+ ### Features
64
+
65
+ * **eslint:** no-relative-packages, prevent importing other packages by relative paths ([b3d23b0](https://github.com/ho-nl/m2-pwa/commit/b3d23b0217f808bb251ecaf67ccc618f9a10eefe))
66
+
67
+
68
+
69
+
70
+
71
+ # [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)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
77
+ * playwright.ts files error ([4296f64](https://github.com/ho-nl/m2-pwa/commit/4296f648b11ea2a01e220cc0cbe1f6114e83e747))
78
+
79
+
80
+ ### Features
81
+
82
+ * **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # eslint-config
2
+
3
+ Super simple package to share config
package/index.js ADDED
@@ -0,0 +1,112 @@
1
+ module.exports = {
2
+ env: {
3
+ browser: true,
4
+ es6: true,
5
+ node: true,
6
+ },
7
+ extends: [
8
+ 'airbnb-typescript',
9
+ 'airbnb/hooks',
10
+ 'plugin:@typescript-eslint/eslint-recommended',
11
+ 'plugin:@typescript-eslint/recommended',
12
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
13
+ 'plugin:@next/eslint-plugin-next/recommended',
14
+ 'prettier',
15
+ ],
16
+ globals: {
17
+ Atomics: 'readonly',
18
+ SharedArrayBuffer: 'readonly',
19
+ },
20
+ parser: '@typescript-eslint/parser',
21
+ parserOptions: {
22
+ ecmaFeatures: {
23
+ jsx: true,
24
+ },
25
+ ecmaVersion: 2018,
26
+ sourceType: 'module',
27
+ },
28
+ plugins: ['react', '@typescript-eslint', '@next/eslint-plugin-next'],
29
+ rules: {
30
+ '@next/next/no-html-link-for-pages': 'off',
31
+ 'import/no-extraneous-dependencies': [
32
+ 'error',
33
+ {
34
+ devDependencies: ['next.config.js', '**/__tests__/**', '**/_playwright/**'],
35
+ },
36
+ ],
37
+ 'import/order': ['warn', { alphabetize: { order: 'asc' } }],
38
+ 'no-param-reassign': ['error', { props: false }],
39
+ 'jsx-a11y/anchor-is-valid': 'off',
40
+ 'default-case': 'off',
41
+ '@typescript-eslint/indent': 'off',
42
+ 'react/jsx-one-expression-per-line': 'off',
43
+ 'react/prop-types': 'off',
44
+ 'react/jsx-props-no-spreading': 'off',
45
+ 'react/react-in-jsx-scope': 'off',
46
+ 'react-hooks/exhaustive-deps': ['error', { additionalHooks: '(useIsomorphicLayoutEffect)' }],
47
+ 'no-console': [1, { allow: ['warn', 'error', 'info'] }],
48
+ '@typescript-eslint/semi': 'off',
49
+ 'spaced-comment': [
50
+ 'error',
51
+ 'always',
52
+ {
53
+ markers: ['/'],
54
+ },
55
+ ],
56
+
57
+ 'no-underscore-dangle': [
58
+ 'error',
59
+ { allow: ['__typename', '__type', '_N_X', '_N_Y', '__N', '__NEXT'] },
60
+ ],
61
+ 'react/jsx-key': ['error', { checkFragmentShorthand: true }],
62
+ 'react/jsx-no-duplicate-props': ['error', { ignoreCase: false }],
63
+ 'react/require-default-props': 'off',
64
+
65
+ '@typescript-eslint/explicit-function-return-type': 'off',
66
+ '@typescript-eslint/no-unsafe-assignment': 'off',
67
+ '@typescript-eslint/no-unsafe-call': 'off',
68
+ '@typescript-eslint/no-unsafe-member-access': 'off',
69
+ '@typescript-eslint/no-unsafe-return': 'off',
70
+ '@typescript-eslint/restrict-template-expressions': 'off',
71
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
72
+ '@typescript-eslint/naming-convention': 'off',
73
+ 'no-plusplus': 0,
74
+ 'no-restricted-syntax': [
75
+ 'error',
76
+ {
77
+ selector: 'ForInStatement',
78
+ message:
79
+ 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
80
+ },
81
+ {
82
+ selector: 'LabeledStatement',
83
+ message:
84
+ 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
85
+ },
86
+ {
87
+ selector: 'WithStatement',
88
+ message:
89
+ '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
90
+ },
91
+ ],
92
+
93
+ // Remove when fixed: https://github.com/react-hook-form/react-hook-form/issues/2887
94
+ '@typescript-eslint/unbound-method': 'off',
95
+
96
+ 'import/no-relative-packages': 'error',
97
+ },
98
+ overrides: [
99
+ {
100
+ files: ['*.ts'],
101
+ rules: {
102
+ 'import/prefer-default-export': 'off',
103
+ },
104
+ },
105
+ {
106
+ files: ['generated/*'],
107
+ rules: {
108
+ '@typescript-eslint/camelcase': 'off',
109
+ },
110
+ },
111
+ ],
112
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@graphcommerce/eslint-config-pwa",
3
+ "version": "3.0.1",
4
+ "main": "index.js",
5
+ "dependencies": {
6
+ "@graphcommerce/prettier-config-pwa": "^3.0.1",
7
+ "@graphcommerce/typescript-config-pwa": "^3.0.1",
8
+ "@next/eslint-plugin-next": "^11.1.2",
9
+ "@typescript-eslint/eslint-plugin": "^4.30.0",
10
+ "@typescript-eslint/parser": "^4.30.0",
11
+ "eslint": "^7.32.0",
12
+ "eslint-config-airbnb": "^18.2.0",
13
+ "eslint-config-airbnb-typescript": "^14.0.0",
14
+ "eslint-config-prettier": "^8.3.0",
15
+ "eslint-import-resolver-webpack": "^0.13.1",
16
+ "eslint-plugin-import": "^2.24.2",
17
+ "eslint-plugin-jsx-a11y": "^6.3.1",
18
+ "eslint-plugin-react": "^7.25.1",
19
+ "eslint-plugin-react-hooks": "^4.2.0"
20
+ },
21
+ "sideEffects": false,
22
+ "engines": {
23
+ "node": "14.x"
24
+ },
25
+ "prettier": "@graphcommerce/prettier-config-pwa"
26
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "exclude": ["**/node_modules", "**/.*/"],
3
+ "include": ["**/*.ts", "**/*.tsx"],
4
+ "extends": "@graphcommerce/typescript-config-pwa/nextjs.json"
5
+ }