@pob/eslint-config-typescript-react 55.3.0 → 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,20 @@
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
+
6
20
  ## [55.3.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v55.2.1...v55.3.0) (2024-05-05)
7
21
 
8
22
 
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,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.0.0",
4
4
  "description": "eslint config files",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
@@ -40,7 +40,7 @@
40
40
  "eslint": "^8.56.0"
41
41
  },
42
42
  "dependencies": {
43
- "@pob/eslint-config": "55.3.0",
43
+ "@pob/eslint-config": "56.0.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",