@kununu/eslint-config 5.3.0-beta-8 → 5.3.0-beta-10

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 (2) hide show
  1. package/index.js +16 -12
  2. package/package.json +1 -2
package/index.js CHANGED
@@ -204,11 +204,20 @@ const baseRules = {
204
204
  // https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops
205
205
  'react/require-default-props': 0,
206
206
 
207
- 'no-restricted-syntax': ['error', {
208
- selector: 'ReturnStatement > LogicalExpression[operator="&&"]',
209
- message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.'
210
- }],
211
-
207
+ 'no-restricted-syntax': ['error',
208
+ {
209
+ selector: 'ReturnStatement > LogicalExpression[operator="&&"]',
210
+ message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.'
211
+ },
212
+ {
213
+ selector: 'ReturnStatement > SequenceExpression LogicalExpression[operator="&&"]',
214
+ message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.'
215
+ },
216
+ {
217
+ selector: 'ReturnStatement > ParenthesizedExpression > SequenceExpression LogicalExpression[operator="&&"]',
218
+ message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.'
219
+ }
220
+ ],
212
221
 
213
222
  };
214
223
 
@@ -228,8 +237,7 @@ module.exports = {
228
237
  plugins: [
229
238
  '@babel',
230
239
  'lodash',
231
- 'sort-destructure-keys',
232
- '@shopify',
240
+ 'sort-destructure-keys'
233
241
  ],
234
242
 
235
243
  env: {
@@ -239,10 +247,7 @@ module.exports = {
239
247
  es6: true,
240
248
  },
241
249
 
242
- rules: {
243
- ...baseRules,
244
- '@shopify/prefer-early-return': ['error', { maximumStatements: 1 }],
245
- },
250
+ rules: baseRules,
246
251
 
247
252
  overrides: [{
248
253
  files: [
@@ -280,7 +285,6 @@ module.exports = {
280
285
  '**/stories.tsx',
281
286
  ],
282
287
  }],
283
- '@shopify/prefer-early-return': ['error', { maximumStatements: 1 }],
284
288
  },
285
289
  overrides: [
286
290
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kununu/eslint-config",
3
- "version": "5.3.0-beta-8",
3
+ "version": "5.3.0-beta-10",
4
4
  "description": "kununu's ESLint config",
5
5
  "main": "index.js",
6
6
  "repository": "kununu/eslint-config",
@@ -29,7 +29,6 @@
29
29
  "@babel/core": "7.26.9",
30
30
  "@babel/eslint-parser": "7.26.8",
31
31
  "@babel/eslint-plugin": "7.25.9",
32
- "@shopify/eslint-plugin": "47.0.1",
33
32
  "@typescript-eslint/eslint-plugin": "7.18.0",
34
33
  "@typescript-eslint/parser": "7.18.0",
35
34
  "eslint": "8.57.1",