@putout/eslint-config 6.15.0 → 7.1.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.
Files changed (2) hide show
  1. package/eslintrc.js +47 -28
  2. package/package.json +3 -3
package/eslintrc.js CHANGED
@@ -14,6 +14,7 @@ module.exports = {
14
14
  },
15
15
  },
16
16
  rules: {
17
+ 'array-bracket-spacing': 'error',
17
18
  'arrow-parens': ['error', 'always'],
18
19
  'arrow-spacing': 'error',
19
20
  'brace-style': 'error',
@@ -101,35 +102,9 @@ module.exports = {
101
102
  ...getPaddingCjsExport(),
102
103
  ...getPaddingImport(),
103
104
  ...getPaddingCjsImport(),
105
+ ...getPaddingIf(),
106
+ ...getPaddingFor(),
104
107
  {
105
- blankLine: 'always',
106
- prev: 'block-like',
107
- next: 'for',
108
- }, {
109
- blankLine: 'always',
110
- prev: '*',
111
- next: 'if',
112
- }, {
113
- blankLine: 'always',
114
- prev: 'if',
115
- next: 'return',
116
- }, {
117
- blankLine: 'always',
118
- prev: 'if',
119
- next: 'expression',
120
- }, {
121
- blankLine: 'always',
122
- prev: 'if',
123
- next: 'const',
124
- }, {
125
- blankLine: 'always',
126
- prev: 'if',
127
- next: 'throw',
128
- }, {
129
- blankLine: 'always',
130
- prev: 'for',
131
- next: 'return',
132
- }, {
133
108
  blankLine: 'always',
134
109
  prev: 'while',
135
110
  next: 'return',
@@ -202,6 +177,50 @@ function getPaddingCjsExport() {
202
177
  }];
203
178
  }
204
179
 
180
+ function getPaddingIf() {
181
+ return [{
182
+ blankLine: 'always',
183
+ prev: '*',
184
+ next: 'if',
185
+ }, {
186
+ blankLine: 'always',
187
+ prev: 'if',
188
+ next: 'return',
189
+ }, {
190
+ blankLine: 'always',
191
+ prev: 'if',
192
+ next: 'expression',
193
+ }, {
194
+ blankLine: 'always',
195
+ prev: 'if',
196
+ next: 'const',
197
+ }, {
198
+ blankLine: 'always',
199
+ prev: 'if',
200
+ next: 'throw',
201
+ }];
202
+ }
203
+
204
+ function getPaddingFor() {
205
+ return [{
206
+ blankLine: 'always',
207
+ prev: 'for',
208
+ next: 'return',
209
+ }, {
210
+ blankLine: 'always',
211
+ prev: 'block-like',
212
+ next: 'for',
213
+ }, {
214
+ blankLine: 'always',
215
+ prev: ['const', 'let'],
216
+ next: 'for',
217
+ }, {
218
+ blankLine: 'always',
219
+ prev: 'for',
220
+ next: '*',
221
+ }];
222
+ }
223
+
205
224
  function getPaddingCjsImport() {
206
225
  return getPaddingImport().map(addCJS);
207
226
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@putout/eslint-config",
3
- "version": "6.15.0",
3
+ "version": "7.1.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
- "description": "putout config for eslint",
6
+ "description": "🐊Putout config for ESLint",
7
7
  "homepage": "https://github.com/coderaiser/putout/tree/master/packages/eslint-config#readme",
8
8
  "main": "./eslintrc.js",
9
9
  "exports": "./eslintrc.js",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "license": "MIT",
44
44
  "engines": {
45
- "node": ">=14"
45
+ "node": ">=16"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"