@pob/eslint-config-typescript-react 55.3.0 → 56.1.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/CHANGELOG.md CHANGED
@@ -3,6 +3,97 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [51.0.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-09-01)
7
+ ## [51.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-10-03)
8
+
9
+ ### Bug Fixes
10
+
11
+ * disable react/no-unescaped-entities ([5a41c9f](https://github.com/christophehurpeau/eslint-config-pob/commit/5a41c9fdf8e22adc10ad22961deeb4f1e51d3832))
12
+ * fix react/function-component-definition rule and enable func-names ([e656eba](https://github.com/christophehurpeau/eslint-config-pob/commit/e656ebaba4639a0eb547ef11dc9d3fbf32aec60e))
13
+ ## [51.1.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-10-18)
14
+ ## [51.1.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-10-19)
15
+ ## [51.2.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-10)
16
+ ## [51.2.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-14)
17
+ ## [52.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-28)
18
+
19
+ ### ⚠ BREAKING CHANGES
20
+
21
+ * change import/extensions to ignorePackages
22
+
23
+ ### Features
24
+
25
+ * change import/extensions to ignorePackages ([1833642](https://github.com/christophehurpeau/eslint-config-pob/commit/183364280552d484acd37bbf3b9816d88c1f6bfe))
26
+ ## [52.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-28)
27
+
28
+ ### Reverts
29
+
30
+ * Revert "feat!: change import/extensions to ignorePackages" ([22d14bc](https://github.com/christophehurpeau/eslint-config-pob/commit/22d14bc6d6f94cae03a547cf53d939f6c1c756a7))
31
+ ## [53.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2023-12-28)
32
+
33
+ ### ⚠ BREAKING CHANGES
34
+
35
+ * feat: change import/extensions to ignorePackages
36
+
37
+ ### Reverts
38
+
39
+ * feat: change import/extensions to ignorePackages ([0a15b9e](https://github.com/christophehurpeau/eslint-config-pob/commit/0a15b9e80b990a8f6277a1bd19481a9fe72f3f22))
40
+ ## [54.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-02-17)
41
+ ## [54.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-02-24)
42
+ ## [54.0.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-07)
43
+ ## [55.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-20)
44
+
45
+ ### ⚠ BREAKING CHANGES
46
+
47
+ * remove config eslint-config-airbnb as dependency
48
+
49
+ ### Features
50
+
51
+ * remove config eslint-config-airbnb as dependency ([05cd865](https://github.com/christophehurpeau/eslint-config-pob/commit/05cd86511db14e0ec7c4df1ede633eaf65b9b37b))
52
+ ## [55.0.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
53
+ ## [55.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
54
+ ## [55.2.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
55
+ ## [55.2.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-04-21)
56
+ ## [55.3.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-05-05)
57
+
58
+ ### Features
59
+
60
+ * remove optional peer dependencies ([ddddeb2](https://github.com/christophehurpeau/eslint-config-pob/commit/ddddeb27d606f16dbf6c38b2f61c3a7bfe20510d))
61
+
62
+ ### Bug Fixes
63
+
64
+ * disable react/jsx-curly-newline ([d57c2b8](https://github.com/christophehurpeau/eslint-config-pob/commit/d57c2b8cc93d4ec7a6b5837ef1c23770139aa053))
65
+ ## [56.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-05-05)
66
+
67
+ ### ⚠ BREAKING CHANGES
68
+
69
+ * use standard quotes
70
+
71
+ ### Features
72
+
73
+ * use standard quotes ([0083d81](https://github.com/christophehurpeau/eslint-config-pob/commit/0083d816bbe4e320eabe3c23a8d4edaa561df8a3))
74
+ ## [56.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v56.0.0...v56.1.0) (2024-07-27)
75
+
76
+ ### Features
77
+
78
+ * pob plugin ([fd99ec8](https://github.com/christophehurpeau/eslint-config-pob/commit/fd99ec8711409b3bc9b960f7eb2e0b2e67984381))
79
+
80
+ Version bump for dependency: @pob/eslint-config
81
+
82
+
83
+ ## [56.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.3.0...v56.0.0) (2024-05-05)
84
+
85
+
86
+ ### ⚠ BREAKING CHANGES
87
+
88
+ * use standard quotes
89
+
90
+ ### Features
91
+
92
+ * use standard quotes ([0083d81](https://github.com/christophehurpeau/eslint-config-pob/commit/0083d816bbe4e320eabe3c23a8d4edaa561df8a3))
93
+
94
+ Version bump for dependency: eslint-config
95
+
96
+
6
97
  ## [55.3.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.2.1...v55.3.0) (2024-05-05)
7
98
 
8
99
 
package/lib/app.js CHANGED
@@ -1,5 +1,5 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- extends: ['@pob/eslint-config-typescript/app'].map(require.resolve),
4
+ extends: ["@pob/eslint-config-typescript/app"].map(require.resolve),
5
5
  };
package/lib/index.js CHANGED
@@ -1,30 +1,33 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- extends: ['./rules/react', './rules/react-hooks', './rules/jsx-a11y'].map(
5
- require.resolve,
6
- ),
4
+ extends: [
5
+ "plugin:@pob/react",
6
+ ...["./rules/react", "./rules/react-hooks", "./rules/jsx-a11y"].map(
7
+ require.resolve,
8
+ ),
9
+ ],
7
10
 
8
11
  settings: {
9
- 'import/resolver': {
12
+ "import/resolver": {
10
13
  node: {
11
- extensions: ['.mjs', '.js', '.json', '.ts', '.tsx', '.d.ts', '.d.tsx'],
14
+ extensions: [".mjs", ".js", ".json", ".ts", ".tsx", ".d.ts", ".d.tsx"],
12
15
  },
13
16
  },
14
17
  },
15
18
 
16
19
  rules: {
17
- 'import/extensions': [
18
- 'error',
19
- 'ignorePackages',
20
+ "import/extensions": [
21
+ "error",
22
+ "ignorePackages",
20
23
  {
21
- js: 'ignorePackages',
22
- cjs: 'ignorePackages',
23
- mjs: 'ignorePackages',
24
- ts: 'never',
25
- tsx: 'never',
24
+ js: "ignorePackages",
25
+ cjs: "ignorePackages",
26
+ mjs: "ignorePackages",
27
+ ts: "never",
28
+ tsx: "never",
26
29
  },
27
30
  ],
28
- 'react/jsx-filename-extension': ['error', { extensions: ['tsx'] }],
31
+ "react/jsx-filename-extension": ["error", { extensions: ["tsx"] }],
29
32
  },
30
33
  };
@@ -1,23 +1,23 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- extends: ['./react-native'].map(require.resolve),
4
+ extends: ["./react-native"].map(require.resolve),
5
5
 
6
6
  settings: {
7
- 'import/resolver': {
7
+ "import/resolver": {
8
8
  node: {
9
- extensions: ['.js', '.web.js'],
9
+ extensions: [".js", ".web.js"],
10
10
  },
11
11
  },
12
12
  },
13
13
 
14
14
  rules: {
15
- 'import/no-unresolved': [
16
- 'error',
15
+ "import/no-unresolved": [
16
+ "error",
17
17
  {
18
18
  ignore: [
19
19
  // allow react-native as it is replaced by react-native-web and typed by @types/react-native. react-native lib does not need to be installed in that case
20
- 'react-native',
20
+ "react-native",
21
21
  ],
22
22
  },
23
23
  ],
@@ -1,7 +1,7 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- extends: ['.'].map(require.resolve),
4
+ extends: ["."].map(require.resolve),
5
5
 
6
6
  env: {
7
7
  browser: true,
@@ -12,9 +12,9 @@ module.exports = {
12
12
  },
13
13
 
14
14
  settings: {
15
- 'import/resolver': {
15
+ "import/resolver": {
16
16
  node: {
17
- extensions: ['.js', '.ios.js', '.android.js'],
17
+ extensions: [".js", ".ios.js", ".android.js"],
18
18
  },
19
19
  },
20
20
  },
@@ -1,6 +1,6 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- plugins: ['jsx-a11y'],
5
- extends: ['plugin:jsx-a11y/strict'],
4
+ plugins: ["jsx-a11y"],
5
+ extends: ["plugin:jsx-a11y/strict"],
6
6
  };
@@ -1,10 +1,10 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- plugins: ['react-hooks'],
4
+ plugins: ["react-hooks"],
5
5
 
6
6
  rules: {
7
- 'react-hooks/rules-of-hooks': 'error',
8
- 'react-hooks/exhaustive-deps': 'error',
7
+ "react-hooks/rules-of-hooks": "error",
8
+ "react-hooks/exhaustive-deps": "error",
9
9
  },
10
10
  };
@@ -1,11 +1,11 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
- extends: ['plugin:react/recommended', 'plugin:react/jsx-runtime'],
4
+ extends: ["plugin:react/recommended", "plugin:react/jsx-runtime"],
5
5
 
6
6
  rules: {
7
7
  // https://github.com/airbnb/javascript/issues/2829
8
- 'func-names': 'error',
8
+ "func-names": "error",
9
9
 
10
10
  // Enforce event handler naming conventions in JSX
11
11
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
@@ -19,80 +19,80 @@ module.exports = {
19
19
 
20
20
  // Prevent direct mutation of this.state
21
21
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
22
- 'react/no-direct-mutation-state': 'error',
22
+ "react/no-direct-mutation-state": "error",
23
23
 
24
24
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
25
- 'react/button-has-type': 'error',
25
+ "react/button-has-type": "error",
26
26
 
27
27
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
28
- 'react/destructuring-assignment': [
29
- 'error',
30
- 'always',
31
- { ignoreClassFields: false, destructureInSignature: 'always' },
28
+ "react/destructuring-assignment": [
29
+ "error",
30
+ "always",
31
+ { ignoreClassFields: false, destructureInSignature: "always" },
32
32
  ],
33
33
 
34
34
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
35
- 'react/display-name': 'off',
35
+ "react/display-name": "off",
36
36
 
37
- 'react/function-component-definition': [
38
- 'error',
37
+ "react/function-component-definition": [
38
+ "error",
39
39
  {
40
- namedComponents: ['function-declaration'],
40
+ namedComponents: ["function-declaration"],
41
41
  // https://github.com/airbnb/javascript/issues/2829
42
- unnamedComponents: ['function-expression'],
42
+ unnamedComponents: ["function-expression"],
43
43
  },
44
44
  ],
45
45
 
46
46
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
47
- 'react/hook-use-state': 'error',
47
+ "react/hook-use-state": "error",
48
48
 
49
49
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
50
- 'react/jsx-boolean-value': ['error', 'never', { always: [] }],
50
+ "react/jsx-boolean-value": ["error", "never", { always: [] }],
51
51
 
52
52
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
53
- 'react/jsx-curly-brace-presence': [
54
- 'error',
55
- { props: 'never', children: 'never' },
53
+ "react/jsx-curly-brace-presence": [
54
+ "error",
55
+ { props: "never", children: "never" },
56
56
  ],
57
57
 
58
58
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
59
- 'react/jsx-curly-newline': 'off',
59
+ "react/jsx-curly-newline": "off",
60
60
 
61
61
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
62
- 'react/jsx-fragments': ['error', 'syntax'],
62
+ "react/jsx-fragments": ["error", "syntax"],
63
63
 
64
64
  // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md
65
- 'react/jsx-no-constructed-context-values': 'error',
65
+ "react/jsx-no-constructed-context-values": "error",
66
66
 
67
67
  // Prevent usage of `javascript:` URLs
68
68
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
69
- 'react/jsx-no-script-url': [
70
- 'error',
69
+ "react/jsx-no-script-url": [
70
+ "error",
71
71
  [
72
72
  {
73
- name: 'Link',
74
- props: ['to'],
73
+ name: "Link",
74
+ props: ["to"],
75
75
  },
76
76
  ],
77
77
  ],
78
78
 
79
79
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
80
- 'react/jsx-no-undef': 'error',
80
+ "react/jsx-no-undef": "error",
81
81
 
82
82
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
83
- 'react/jsx-no-useless-fragment': 'error',
83
+ "react/jsx-no-useless-fragment": "error",
84
84
 
85
85
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
86
- 'react/jsx-pascal-case': [
87
- 'error',
86
+ "react/jsx-pascal-case": [
87
+ "error",
88
88
  {
89
89
  allowAllCaps: true,
90
90
  ignore: [],
91
91
  },
92
92
  ],
93
93
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
94
- 'react/jsx-sort-props': [
95
- 'error',
94
+ "react/jsx-sort-props": [
95
+ "error",
96
96
  {
97
97
  noSortAlphabetically: true,
98
98
  reservedFirst: true,
@@ -101,80 +101,80 @@ module.exports = {
101
101
  },
102
102
  ],
103
103
  // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-arrow-function-lifecycle.md
104
- 'react/no-arrow-function-lifecycle': 'error',
104
+ "react/no-arrow-function-lifecycle": "error",
105
105
 
106
106
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
107
- 'react/no-array-index-key': 'error',
107
+ "react/no-array-index-key": "error",
108
108
 
109
109
  // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-invalid-html-attribute.md
110
- 'react/no-invalid-html-attribute': 'error',
110
+ "react/no-invalid-html-attribute": "error",
111
111
 
112
112
  // https://github.com/yannickcr/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/no-namespace.md
113
- 'react/no-namespace': 'error',
113
+ "react/no-namespace": "error",
114
114
 
115
115
  // entities does not need to be escaped as color syntaxing makes it clear when it's a body or it's a property.
116
- 'react/no-unescaped-entities': 'off',
116
+ "react/no-unescaped-entities": "off",
117
117
 
118
118
  // https://github.com/yannickcr/eslint-plugin-react/blob/c2a790a3472eea0f6de984bdc3ee2a62197417fb/docs/rules/no-unstable-nested-components.md
119
- 'react/no-unstable-nested-components': 'error',
119
+ "react/no-unstable-nested-components": "error",
120
120
 
121
121
  // https://github.com/yannickcr/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/prefer-exact-props.md
122
- 'react/prefer-exact-props': 'error',
122
+ "react/prefer-exact-props": "error",
123
123
 
124
124
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
125
- 'react/prefer-es6-class': ['error', 'always'],
125
+ "react/prefer-es6-class": ["error", "always"],
126
126
 
127
127
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
128
- 'react/prefer-stateless-function': [
129
- 'error',
128
+ "react/prefer-stateless-function": [
129
+ "error",
130
130
  { ignorePureComponents: true },
131
131
  ],
132
132
 
133
133
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
134
- 'react/self-closing-comp': 'error',
134
+ "react/self-closing-comp": "error",
135
135
 
136
136
  // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md
137
- 'react/sort-comp': [
138
- 'error',
137
+ "react/sort-comp": [
138
+ "error",
139
139
  {
140
140
  order: [
141
- 'static-variables',
142
- 'static-methods',
143
- 'instance-variables',
144
- 'lifecycle',
145
- 'getters',
146
- 'setters',
147
- 'instance-methods',
148
- '/^(on|handle).+$/',
149
- 'everything-else',
150
- 'rendering',
141
+ "static-variables",
142
+ "static-methods",
143
+ "instance-variables",
144
+ "lifecycle",
145
+ "getters",
146
+ "setters",
147
+ "instance-methods",
148
+ "/^(on|handle).+$/",
149
+ "everything-else",
150
+ "rendering",
151
151
  ],
152
152
  groups: {
153
153
  lifecycle: [
154
- 'state',
155
- 'constructor',
156
- 'getDerivedStateFromProps',
157
- 'componentWillMount',
158
- 'UNSAFE_componentWillMount',
159
- 'componentDidMount',
160
- 'componentWillReceiveProps',
161
- 'UNSAFE_componentWillReceiveProps',
162
- 'shouldComponentUpdate',
163
- 'componentWillUpdate',
164
- 'UNSAFE_componentWillUpdate',
165
- 'getSnapshotBeforeUpdate',
166
- 'componentDidUpdate',
167
- 'componentDidCatch',
168
- 'componentWillUnmount',
154
+ "state",
155
+ "constructor",
156
+ "getDerivedStateFromProps",
157
+ "componentWillMount",
158
+ "UNSAFE_componentWillMount",
159
+ "componentDidMount",
160
+ "componentWillReceiveProps",
161
+ "UNSAFE_componentWillReceiveProps",
162
+ "shouldComponentUpdate",
163
+ "componentWillUpdate",
164
+ "UNSAFE_componentWillUpdate",
165
+ "getSnapshotBeforeUpdate",
166
+ "componentDidUpdate",
167
+ "componentDidCatch",
168
+ "componentWillUnmount",
169
169
  ],
170
- rendering: ['/^render.+$/', 'render'],
170
+ rendering: ["/^render.+$/", "render"],
171
171
  },
172
172
  },
173
173
  ],
174
174
 
175
175
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
176
- 'react/sort-prop-types': [
177
- 'error',
176
+ "react/sort-prop-types": [
177
+ "error",
178
178
  {
179
179
  noSortAlphabetically: true,
180
180
  requiredFirst: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/eslint-config-typescript-react",
3
- "version": "55.3.0",
3
+ "version": "56.1.0",
4
4
  "description": "eslint config files",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
@@ -40,14 +40,14 @@
40
40
  "eslint": "^8.56.0"
41
41
  },
42
42
  "dependencies": {
43
- "@pob/eslint-config": "55.3.0",
43
+ "@pob/eslint-config": "56.1.0",
44
44
  "eslint-plugin-import": "2.29.1",
45
45
  "eslint-plugin-jsx-a11y": "6.8.0",
46
46
  "eslint-plugin-react": "7.34.1",
47
47
  "eslint-plugin-react-hooks": "4.6.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/react": "18.3.1",
50
+ "@types/react": "18.3.3",
51
51
  "react": "18.3.1"
52
52
  }
53
53
  }