@pob/eslint-config-typescript-react 55.2.1 → 56.0.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,35 @@
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
+ ## [56.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.3.0...v56.0.0) (2024-05-05)
7
+
8
+
9
+ ### ⚠ BREAKING CHANGES
10
+
11
+ * use standard quotes
12
+
13
+ ### Features
14
+
15
+ * use standard quotes ([0083d81](https://github.com/christophehurpeau/eslint-config-pob/commit/0083d816bbe4e320eabe3c23a8d4edaa561df8a3))
16
+
17
+ Version bump for dependency: eslint-config
18
+
19
+
20
+ ## [55.3.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.2.1...v55.3.0) (2024-05-05)
21
+
22
+
23
+ ### Features
24
+
25
+ * remove optional peer dependencies ([0fd390f](https://github.com/christophehurpeau/eslint-config-pob/commit/0fd390fe8ff412e1159393e45e5ef49a5f3908b5))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * disable react/jsx-curly-newline ([db2873c](https://github.com/christophehurpeau/eslint-config-pob/commit/db2873c4ff0078e8191be49bf7aa00544aee276c))
31
+
32
+ Version bump for dependency: eslint-config
33
+
34
+
6
35
  ## [55.2.1](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.2.0...v55.2.1) (2024-04-21)
7
36
 
8
37
  Note: no notable changes
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,30 @@
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,
4
+ extends: ["./rules/react", "./rules/react-hooks", "./rules/jsx-a11y"].map(
5
+ require.resolve
6
6
  ),
7
7
 
8
8
  settings: {
9
- 'import/resolver': {
9
+ "import/resolver": {
10
10
  node: {
11
- extensions: ['.mjs', '.js', '.json', '.ts', '.tsx', '.d.ts', '.d.tsx'],
11
+ extensions: [".mjs", ".js", ".json", ".ts", ".tsx", ".d.ts", ".d.tsx"],
12
12
  },
13
13
  },
14
14
  },
15
15
 
16
16
  rules: {
17
- 'import/extensions': [
18
- 'error',
19
- 'ignorePackages',
17
+ "import/extensions": [
18
+ "error",
19
+ "ignorePackages",
20
20
  {
21
- js: 'ignorePackages',
22
- cjs: 'ignorePackages',
23
- mjs: 'ignorePackages',
24
- ts: 'never',
25
- tsx: 'never',
21
+ js: "ignorePackages",
22
+ cjs: "ignorePackages",
23
+ mjs: "ignorePackages",
24
+ ts: "never",
25
+ tsx: "never",
26
26
  },
27
27
  ],
28
- 'react/jsx-filename-extension': ['error', { extensions: ['tsx'] }],
28
+ "react/jsx-filename-extension": ["error", { extensions: ["tsx"] }],
29
29
  },
30
30
  };
@@ -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,86 +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': [
60
- 'error',
61
- {
62
- multiline: 'consistent',
63
- singleline: 'consistent',
64
- },
65
- ],
59
+ "react/jsx-curly-newline": "off",
66
60
 
67
61
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
68
- 'react/jsx-fragments': ['error', 'syntax'],
62
+ "react/jsx-fragments": ["error", "syntax"],
69
63
 
70
64
  // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md
71
- 'react/jsx-no-constructed-context-values': 'error',
65
+ "react/jsx-no-constructed-context-values": "error",
72
66
 
73
67
  // Prevent usage of `javascript:` URLs
74
68
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
75
- 'react/jsx-no-script-url': [
76
- 'error',
69
+ "react/jsx-no-script-url": [
70
+ "error",
77
71
  [
78
72
  {
79
- name: 'Link',
80
- props: ['to'],
73
+ name: "Link",
74
+ props: ["to"],
81
75
  },
82
76
  ],
83
77
  ],
84
78
 
85
79
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
86
- 'react/jsx-no-undef': 'error',
80
+ "react/jsx-no-undef": "error",
87
81
 
88
82
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
89
- 'react/jsx-no-useless-fragment': 'error',
83
+ "react/jsx-no-useless-fragment": "error",
90
84
 
91
85
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
92
- 'react/jsx-pascal-case': [
93
- 'error',
86
+ "react/jsx-pascal-case": [
87
+ "error",
94
88
  {
95
89
  allowAllCaps: true,
96
90
  ignore: [],
97
91
  },
98
92
  ],
99
93
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
100
- 'react/jsx-sort-props': [
101
- 'error',
94
+ "react/jsx-sort-props": [
95
+ "error",
102
96
  {
103
97
  noSortAlphabetically: true,
104
98
  reservedFirst: true,
@@ -107,80 +101,80 @@ module.exports = {
107
101
  },
108
102
  ],
109
103
  // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-arrow-function-lifecycle.md
110
- 'react/no-arrow-function-lifecycle': 'error',
104
+ "react/no-arrow-function-lifecycle": "error",
111
105
 
112
106
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
113
- 'react/no-array-index-key': 'error',
107
+ "react/no-array-index-key": "error",
114
108
 
115
109
  // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-invalid-html-attribute.md
116
- 'react/no-invalid-html-attribute': 'error',
110
+ "react/no-invalid-html-attribute": "error",
117
111
 
118
112
  // https://github.com/yannickcr/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/no-namespace.md
119
- 'react/no-namespace': 'error',
113
+ "react/no-namespace": "error",
120
114
 
121
115
  // entities does not need to be escaped as color syntaxing makes it clear when it's a body or it's a property.
122
- 'react/no-unescaped-entities': 'off',
116
+ "react/no-unescaped-entities": "off",
123
117
 
124
118
  // https://github.com/yannickcr/eslint-plugin-react/blob/c2a790a3472eea0f6de984bdc3ee2a62197417fb/docs/rules/no-unstable-nested-components.md
125
- 'react/no-unstable-nested-components': 'error',
119
+ "react/no-unstable-nested-components": "error",
126
120
 
127
121
  // https://github.com/yannickcr/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/prefer-exact-props.md
128
- 'react/prefer-exact-props': 'error',
122
+ "react/prefer-exact-props": "error",
129
123
 
130
124
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
131
- 'react/prefer-es6-class': ['error', 'always'],
125
+ "react/prefer-es6-class": ["error", "always"],
132
126
 
133
127
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
134
- 'react/prefer-stateless-function': [
135
- 'error',
128
+ "react/prefer-stateless-function": [
129
+ "error",
136
130
  { ignorePureComponents: true },
137
131
  ],
138
132
 
139
133
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
140
- 'react/self-closing-comp': 'error',
134
+ "react/self-closing-comp": "error",
141
135
 
142
136
  // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md
143
- 'react/sort-comp': [
144
- 'error',
137
+ "react/sort-comp": [
138
+ "error",
145
139
  {
146
140
  order: [
147
- 'static-variables',
148
- 'static-methods',
149
- 'instance-variables',
150
- 'lifecycle',
151
- 'getters',
152
- 'setters',
153
- 'instance-methods',
154
- '/^(on|handle).+$/',
155
- 'everything-else',
156
- '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",
157
151
  ],
158
152
  groups: {
159
153
  lifecycle: [
160
- 'state',
161
- 'constructor',
162
- 'getDerivedStateFromProps',
163
- 'componentWillMount',
164
- 'UNSAFE_componentWillMount',
165
- 'componentDidMount',
166
- 'componentWillReceiveProps',
167
- 'UNSAFE_componentWillReceiveProps',
168
- 'shouldComponentUpdate',
169
- 'componentWillUpdate',
170
- 'UNSAFE_componentWillUpdate',
171
- 'getSnapshotBeforeUpdate',
172
- 'componentDidUpdate',
173
- 'componentDidCatch',
174
- '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",
175
169
  ],
176
- rendering: ['/^render.+$/', 'render'],
170
+ rendering: ["/^render.+$/", "render"],
177
171
  },
178
172
  },
179
173
  ],
180
174
 
181
175
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
182
- 'react/sort-prop-types': [
183
- 'error',
176
+ "react/sort-prop-types": [
177
+ "error",
184
178
  {
185
179
  noSortAlphabetically: true,
186
180
  requiredFirst: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/eslint-config-typescript-react",
3
- "version": "55.2.1",
3
+ "version": "56.0.0",
4
4
  "description": "eslint config files",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
@@ -37,35 +37,17 @@
37
37
  "pob": {},
38
38
  "prettier": "@pob/root/prettier-config",
39
39
  "peerDependencies": {
40
- "eslint": "^8.56.0",
41
- "eslint-plugin-import": "^2.29.1",
42
- "eslint-plugin-jsx-a11y": "^6.8.0",
43
- "eslint-plugin-react": "^7.34.1",
44
- "eslint-plugin-react-hooks": "^4.6.0"
45
- },
46
- "peerDependenciesMeta": {
47
- "eslint-plugin-import": {
48
- "optional": true
49
- },
50
- "eslint-plugin-jsx-a11y": {
51
- "optional": true
52
- },
53
- "eslint-plugin-react": {
54
- "optional": true
55
- },
56
- "eslint-plugin-react-hooks": {
57
- "optional": true
58
- }
40
+ "eslint": "^8.56.0"
59
41
  },
60
42
  "dependencies": {
61
- "@pob/eslint-config": "55.2.1",
43
+ "@pob/eslint-config": "56.0.0",
62
44
  "eslint-plugin-import": "2.29.1",
63
45
  "eslint-plugin-jsx-a11y": "6.8.0",
64
46
  "eslint-plugin-react": "7.34.1",
65
- "eslint-plugin-react-hooks": "4.6.0"
47
+ "eslint-plugin-react-hooks": "4.6.2"
66
48
  },
67
49
  "devDependencies": {
68
- "@types/react": "18.2.79",
69
- "react": "18.2.0"
50
+ "@types/react": "18.3.1",
51
+ "react": "18.3.1"
70
52
  }
71
53
  }