Skip to content

Commit 84fd4b8

Browse files
authored
Revert "deps: update ESLint version to v7 (#18897)" (#18899)
This reverts commit 039ad34.
1 parent 14e554b commit 84fd4b8

File tree

3 files changed

+30
-158
lines changed

3 files changed

+30
-158
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"cross-env": "^6.0.3",
4848
"danger": "^9.2.10",
4949
"error-stack-parser": "^2.0.6",
50-
"eslint": "^7.0.0",
50+
"eslint": "^6.8.0",
5151
"eslint-config-fbjs": "^1.1.1",
5252
"eslint-config-prettier": "^6.9.0",
5353
"eslint-plugin-babel": "^5.3.0",

scripts/eslint-rules/__tests__/no-production-logging-test.internal.js

-43
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ ruleTester.run('no-production-logging', rule, {
110110
invalid: [
111111
{
112112
code: "console.error('Oh no');",
113-
output: "if (__DEV__) {console.error('Oh no')};",
114113
errors: [
115114
{
116115
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
@@ -119,7 +118,6 @@ ruleTester.run('no-production-logging', rule, {
119118
},
120119
{
121120
code: "console.warn('Oh no');",
122-
output: "if (__DEV__) {console.warn('Oh no')};",
123121
errors: [
124122
{
125123
message: `Wrap console.warn() in an "if (__DEV__) {}" check`,
@@ -128,7 +126,6 @@ ruleTester.run('no-production-logging', rule, {
128126
},
129127
{
130128
code: "console.warn('Oh no')",
131-
output: "if (__DEV__) {console.warn('Oh no')}",
132129
errors: [
133130
{
134131
message: `Wrap console.warn() in an "if (__DEV__) {}" check`,
@@ -141,11 +138,6 @@ ruleTester.run('no-production-logging', rule, {
141138
console.warn('Oh no');
142139
}
143140
`,
144-
output: `
145-
if (potato) {
146-
if (__DEV__) {console.warn('Oh no')};
147-
}
148-
`,
149141
errors: [
150142
{
151143
message: `Wrap console.warn() in an "if (__DEV__) {}" check`,
@@ -158,11 +150,6 @@ ruleTester.run('no-production-logging', rule, {
158150
console.error('Oh no');
159151
}
160152
`,
161-
output: `
162-
if (__DEV__ || potato && true) {
163-
if (__DEV__) {console.error('Oh no')};
164-
}
165-
`,
166153
errors: [
167154
{
168155
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
@@ -175,11 +162,6 @@ ruleTester.run('no-production-logging', rule, {
175162
console.error('Oh no');
176163
}
177164
`,
178-
output: `
179-
if (banana && __DEV__ && potato && kitten) {
180-
if (__DEV__) {console.error('Oh no')};
181-
}
182-
`,
183165
// Technically this code is valid but we prefer
184166
// explicit standalone __DEV__ blocks that stand out.
185167
errors: [
@@ -194,11 +176,6 @@ ruleTester.run('no-production-logging', rule, {
194176
console.error('Oh no');
195177
}
196178
`,
197-
output: `
198-
if (!__DEV__) {
199-
if (__DEV__) {console.error('Oh no')};
200-
}
201-
`,
202179
errors: [
203180
{
204181
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
@@ -211,11 +188,6 @@ ruleTester.run('no-production-logging', rule, {
211188
console.error('Oh no');
212189
}
213190
`,
214-
output: `
215-
if (foo || x && __DEV__) {
216-
if (__DEV__) {console.error('Oh no')};
217-
}
218-
`,
219191
errors: [
220192
{
221193
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
@@ -229,12 +201,6 @@ ruleTester.run('no-production-logging', rule, {
229201
console.error('Oh no');
230202
}
231203
`,
232-
output: `
233-
if (__DEV__) {
234-
} else {
235-
if (__DEV__) {console.error('Oh no')};
236-
}
237-
`,
238204
errors: [
239205
{
240206
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
@@ -251,15 +217,6 @@ ruleTester.run('no-production-logging', rule, {
251217
}
252218
}
253219
`,
254-
output: `
255-
if (__DEV__) {
256-
} else {
257-
if (__DEV__) {
258-
} else {
259-
if (__DEV__) {console.error('Oh no')};
260-
}
261-
}
262-
`,
263220
errors: [
264221
{
265222
message: `Wrap console.error() in an "if (__DEV__) {}" check`,

0 commit comments

Comments
 (0)