Skip to content

Commit 97bb827

Browse files
committed
feature: @putout/plugin-eslint-plugin: remove-errors-type: add
1 parent 9cb3e96 commit 97bb827

File tree

38 files changed

+142
-90
lines changed

38 files changed

+142
-90
lines changed

packages/eslint-plugin-putout/lib/add-newline-after-function-call/index.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ ruleTester.run('add-newline-after-function-call', rule, {
9797

9898
errors: [{
9999
message: 'Add newline after function call',
100-
type: 'CallExpression',
101100
}],
102101
}, {
103102
code: montag`
@@ -121,7 +120,6 @@ ruleTester.run('add-newline-after-function-call', rule, {
121120
`,
122121
errors: [{
123122
message: 'Add newline after function call',
124-
type: 'CallExpression',
125123
}],
126124
}, {
127125
code: montag`
@@ -146,7 +144,6 @@ ruleTester.run('add-newline-after-function-call', rule, {
146144
'});',
147145
errors: [{
148146
message: 'Add newline after function call',
149-
type: 'CallExpression',
150147
}],
151148
}, {
152149
code: montag`
@@ -171,7 +168,6 @@ ruleTester.run('add-newline-after-function-call', rule, {
171168
'});',
172169
errors: [{
173170
message: 'Add newline after function call',
174-
type: 'CallExpression',
175171
}],
176172
}],
177173
});

packages/eslint-plugin-putout/lib/add-newline-before-function-call/index.spec.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ ruleTester.run('add-newline-before-function-call', rule, {
129129

130130
errors: [{
131131
message: 'Add newline before expression',
132-
type: 'CallExpression',
133132
}],
134133
}, {
135134
code: montag`
@@ -152,28 +151,24 @@ ruleTester.run('add-newline-before-function-call', rule, {
152151
'});',
153152
errors: [{
154153
message: 'Add newline before expression',
155-
type: 'CallExpression',
156154
}],
157155
}, {
158156
code: readFixture('assignment'),
159157
output: readFixture('assignment-fix'),
160158
errors: [{
161159
message: 'Add newline before expression',
162-
type: 'AssignmentExpression',
163160
}],
164161
}, {
165162
code: readFixture('before-newline'),
166163
output: readFixture('before-newline-fix'),
167164
errors: [{
168165
message: 'Add newline before expression',
169-
type: 'CallExpression',
170166
}],
171167
}, {
172168
code: readFixture('top-level'),
173169
output: readFixture('top-level-fix'),
174170
errors: [{
175171
message: 'Add newline before expression',
176-
type: 'CallExpression',
177172
}],
178173
}],
179174
});

packages/eslint-plugin-putout/lib/add-newline-before-return/index.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,12 @@ ruleTester.run('add-newline-before-return', rule, {
8383
output: readFixture('return-fix'),
8484
errors: [{
8585
message: `Add newline before 'return'`,
86-
type: 'ReturnStatement',
8786
}],
8887
}, {
8988
code: readFixture('assign'),
9089
output: readFixture('assign-fix'),
9190
errors: [{
9291
message: `Add newline before 'return'`,
93-
type: 'ReturnStatement',
9492
}],
9593
}],
9694
});

packages/eslint-plugin-putout/lib/add-newlines-between-specifiers/index.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ ruleTester.run('add-newlines-between-specifiers', rule, {
4747

4848
errors: [{
4949
message: 'Add newlines between specifiers',
50-
type: 'ExportNamedDeclaration',
5150
}],
5251
}, {
5352
code: montag`
@@ -68,7 +67,6 @@ ruleTester.run('add-newlines-between-specifiers', rule, {
6867

6968
errors: [{
7069
message: 'Add newlines between specifiers',
71-
type: 'ExportNamedDeclaration',
7270
}],
7371
}],
7472
});

packages/eslint-plugin-putout/lib/add-newlines-between-types-in-union/index.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ ruleTesterBabel.run('add-newlines-between-types-in-union', rule, {
5454
`,
5555
errors: [{
5656
message: 'Add newlines between types in union',
57-
type: 'TSUnionType',
5857
}],
5958
}],
6059
});
@@ -99,7 +98,6 @@ ruleTesterTypescript.run('add-newlines-between-types-in-union: typescript-eslint
9998
`,
10099
errors: [{
101100
message: 'Add newlines between types in union',
102-
type: 'TSUnionType',
103101
}],
104102
}],
105103
});

packages/eslint-plugin-putout/lib/align-spaces/index.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ ruleTester.run('align-spaces', rule, {
3737
].join('\n'),
3838
errors: [{
3939
message: 'Keep whitespaces in blank lines',
40-
type: 'Program',
4140
}],
4241
}],
4342
});

packages/eslint-plugin-putout/lib/array-element-newline/index.spec.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ ruleTester.run('array-element-newline', rule, {
113113
`,
114114
errors: [{
115115
message: 'Add newlines between array elements',
116-
type: 'ArrayExpression',
117116
}],
118117
}, {
119118
code: montag`
@@ -122,7 +121,6 @@ ruleTester.run('array-element-newline', rule, {
122121
output: `const a = [\n'a',\n 'b',\n 'c',\n 'd',\n 'e'\n];`,
123122
errors: [{
124123
message: 'Add newlines between array elements',
125-
type: 'ArrayExpression',
126124
}],
127125
}, {
128126
code: montag`
@@ -131,7 +129,6 @@ ruleTester.run('array-element-newline', rule, {
131129
output: `const a = [\na,\n b,\n c,\n d,\n e\n];`,
132130
errors: [{
133131
message: 'Add newlines between array elements',
134-
type: 'ArrayExpression',
135132
}],
136133
}, {
137134
code: montag`
@@ -140,7 +137,6 @@ ruleTester.run('array-element-newline', rule, {
140137
output: `module.exports.include = () => [\n'FunctionDeclaration',\n 'FunctionExpression',\n 'ArrowFunctionExpression'\n];`,
141138
errors: [{
142139
message: 'Add newlines between array elements',
143-
type: 'ArrayExpression',
144140
}],
145141
}, {
146142
code: montag`
@@ -151,7 +147,6 @@ ruleTester.run('array-element-newline', rule, {
151147
output: 'const a = {\n "plugins": [\n"n",\n "putout"\n]\n};',
152148
errors: [{
153149
message: 'Add newlines between array elements',
154-
type: 'ArrayExpression',
155150
}],
156151
}],
157152
});

packages/eslint-plugin-putout/lib/destructuring-as-function-argument/index.spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ ruleTester.run('destructuring-as-function-argument', rule, {
2626
`,
2727
errors: [{
2828
message: 'Keep curly braces on one line when you use destructuring as function argument',
29-
type: 'ObjectPattern',
3029
}],
3130
}, {
3231
code: `
@@ -40,7 +39,6 @@ ruleTester.run('destructuring-as-function-argument', rule, {
4039
`,
4140
errors: [{
4241
message: 'Keep curly braces on one line when you use destructuring as function argument',
43-
type: 'ObjectPattern',
4442
}],
4543
}, {
4644
code: `
@@ -53,7 +51,6 @@ ruleTester.run('destructuring-as-function-argument', rule, {
5351
`,
5452
errors: [{
5553
message: 'Keep curly braces on one line when you use destructuring as function argument',
56-
type: 'ObjectPattern',
5754
}],
5855
}],
5956
});

packages/eslint-plugin-putout/lib/evaluate/index.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ ruleTester.run('evaluate', rule, {
2222
output: `import a from '<input>/.js'`,
2323
errors: [{
2424
message: 'Evaluate expression',
25-
type: 'ImportDeclaration',
2625
}],
2726
}, {
2827
code: `import a from '__putout_evaluate:join(basename(__filename), ".js")'`,
2928
output: `import a from '<input>/.js'`,
3029
errors: [{
3130
message: 'Evaluate expression',
32-
type: 'ImportDeclaration',
3331
}],
3432
}],
3533
});

packages/eslint-plugin-putout/lib/for-of-multiple-properties-destructuring/index.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ ruleTester.run('multiple-properties-destructuring', rule, {
3232
}],
3333
errors: [{
3434
message,
35-
type: 'VariableDeclarator',
3635
}],
3736
}, {
3837
code: `for (const { \nx,\ny\n } of screen){}`,
@@ -42,7 +41,6 @@ ruleTester.run('multiple-properties-destructuring', rule, {
4241
}],
4342
errors: [{
4443
message,
45-
type: 'VariableDeclarator',
4644
}],
4745
}],
4846
});

0 commit comments

Comments
 (0)