@putout/eslint-config 6.16.0 → 7.2.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 +35 -36
  2. package/package.json +4 -5
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,43 +102,9 @@ module.exports = {
101
102
  ...getPaddingCjsExport(),
102
103
  ...getPaddingImport(),
103
104
  ...getPaddingCjsImport(),
105
+ ...getPaddingIf(),
106
+ ...getPaddingFor(),
104
107
  {
105
- blankLine: 'always',
106
- prev: '*',
107
- next: 'if',
108
- }, {
109
- blankLine: 'always',
110
- prev: 'if',
111
- next: 'return',
112
- }, {
113
- blankLine: 'always',
114
- prev: 'if',
115
- next: 'expression',
116
- }, {
117
- blankLine: 'always',
118
- prev: 'if',
119
- next: 'const',
120
- }, {
121
- blankLine: 'always',
122
- prev: 'if',
123
- next: 'throw',
124
- }, {
125
- blankLine: 'always',
126
- prev: 'for',
127
- next: 'return',
128
- }, {
129
- blankLine: 'always',
130
- prev: 'block-like',
131
- next: 'for',
132
- }, {
133
- blankLine: 'always',
134
- prev: ['const', 'let'],
135
- next: 'for',
136
- }, {
137
- blankLine: 'always',
138
- prev: 'for',
139
- next: ['const', 'let'],
140
- }, {
141
108
  blankLine: 'always',
142
109
  prev: 'while',
143
110
  next: 'return',
@@ -210,6 +177,38 @@ function getPaddingCjsExport() {
210
177
  }];
211
178
  }
212
179
 
180
+ function getPaddingIf() {
181
+ return [{
182
+ blankLine: 'always',
183
+ prev: '*',
184
+ next: 'if',
185
+ }, {
186
+ blankLine: 'always',
187
+ prev: 'if',
188
+ next: '*',
189
+ }];
190
+ }
191
+
192
+ function getPaddingFor() {
193
+ return [{
194
+ blankLine: 'always',
195
+ prev: 'for',
196
+ next: 'return',
197
+ }, {
198
+ blankLine: 'always',
199
+ prev: 'block-like',
200
+ next: 'for',
201
+ }, {
202
+ blankLine: 'always',
203
+ prev: ['const', 'let'],
204
+ next: 'for',
205
+ }, {
206
+ blankLine: 'always',
207
+ prev: 'for',
208
+ next: '*',
209
+ }];
210
+ }
211
+
213
212
  function getPaddingCjsImport() {
214
213
  return getPaddingImport().map(addCJS);
215
214
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@putout/eslint-config",
3
- "version": "6.16.0",
3
+ "version": "7.2.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",
@@ -21,8 +21,7 @@
21
21
  "fresh:lint": "madrun fresh:lint",
22
22
  "lint:fresh": "madrun lint:fresh",
23
23
  "fix:lint": "madrun fix:lint",
24
- "prepublishOnly": "madrun prepublishOnly",
25
- "wisdom": "madrun wisdom"
24
+ "prepublishOnly": "madrun prepublishOnly"
26
25
  },
27
26
  "dependencies": {},
28
27
  "peerDependencies": {
@@ -42,7 +41,7 @@
42
41
  },
43
42
  "license": "MIT",
44
43
  "engines": {
45
- "node": ">=14"
44
+ "node": ">=16"
46
45
  },
47
46
  "publishConfig": {
48
47
  "access": "public"