@kununu/eslint-config 5.3.0-beta-6 → 5.3.0-beta-7

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 +5 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -208,6 +208,9 @@ const baseRules = {
208
208
  selector: 'ReturnStatement > LogicalExpression[operator="&&"]',
209
209
  message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.'
210
210
  }],
211
+
212
+ // Use our custom rule from the plugin if available
213
+ 'kununu/prefer-early-return': 'error',
211
214
  };
212
215
 
213
216
  module.exports = {
@@ -227,7 +230,7 @@ module.exports = {
227
230
  '@babel',
228
231
  'lodash',
229
232
  'sort-destructure-keys',
230
- '@shopify',
233
+ 'kununu' // Add our custom plugin
231
234
  ],
232
235
 
233
236
  env: {
@@ -278,7 +281,7 @@ module.exports = {
278
281
  '**/stories.tsx',
279
282
  ],
280
283
  }],
281
- '@shopify/prefer-early-return': 'error',
284
+ '@shopify/prefer-early-return': ['error', { maximumStatements: 1 }],
282
285
  },
283
286
  overrides: [
284
287
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kununu/eslint-config",
3
- "version": "5.3.0-beta-6",
3
+ "version": "5.3.0-beta-7",
4
4
  "description": "kununu's ESLint config",
5
5
  "main": "index.js",
6
6
  "repository": "kununu/eslint-config",