@w5s/eslint-config 1.0.0-alpha.5 → 1.0.0-alpha.6

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/package.json +2 -2
  2. package/rules/base.js +14 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/eslint-config",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-alpha.6",
4
4
  "description": "ESLint configuration presets",
5
5
  "keywords": [
6
6
  "eslint",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "17d00b3e9ba103fd053aed2c06535d0b1526886a"
86
+ "gitHead": "79cf1b971006e8a0255763db12dd46938d228c78"
87
87
  }
package/rules/base.js CHANGED
@@ -1,6 +1,6 @@
1
- const { concatESConfig, off } = require('./_rule');
1
+ const { concatESConfig, off, error } = require('./_rule');
2
2
 
3
- module.exports = concatESConfig(
3
+ const baseConfig = concatESConfig(
4
4
  // @ts-ignore
5
5
  require('eslint-config-airbnb-base/rules/best-practices'),
6
6
  // @ts-ignore
@@ -16,13 +16,24 @@ module.exports = concatESConfig(
16
16
  // @ts-ignore
17
17
  require('eslint-config-airbnb-base/rules/style'),
18
18
  // @ts-ignore
19
- require('eslint-config-airbnb-base/rules/variables'),
19
+ require('eslint-config-airbnb-base/rules/variables')
20
+ );
20
21
 
22
+ module.exports = concatESConfig(
23
+ baseConfig,
21
24
  // overrides
22
25
  {
23
26
  rules: {
24
27
  // Often useful in jsx
25
28
  'no-nested-ternary': off,
29
+ // Too strict, for pure code prefer the functional plugin
30
+ 'no-param-reassign': [error, { props: false }],
31
+ // Allow for-of syntax
32
+ // @ts-ignore
33
+ 'no-restricted-syntax': baseConfig.rules['no-restricted-syntax'].filter(
34
+ // @ts-ignore
35
+ ({ selector }) => selector !== 'ForOfStatement'
36
+ ),
26
37
  },
27
38
  }
28
39
  );