Skip to content

Commit

Permalink
Revert "deps: update ESLint version to v7 (facebook#18897)" (facebook…
Browse files Browse the repository at this point in the history
…#18899)

This reverts commit 039ad34.
  • Loading branch information
gaearon authored May 12, 2020
1 parent 14e554b commit 84fd4b8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 158 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"cross-env": "^6.0.3",
"danger": "^9.2.10",
"error-stack-parser": "^2.0.6",
"eslint": "^7.0.0",
"eslint": "^6.8.0",
"eslint-config-fbjs": "^1.1.1",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-babel": "^5.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ ruleTester.run('no-production-logging', rule, {
invalid: [
{
code: "console.error('Oh no');",
output: "if (__DEV__) {console.error('Oh no')};",
errors: [
{
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
Expand All @@ -119,7 +118,6 @@ ruleTester.run('no-production-logging', rule, {
},
{
code: "console.warn('Oh no');",
output: "if (__DEV__) {console.warn('Oh no')};",
errors: [
{
message: `Wrap console.warn() in an "if (__DEV__) {}" check`,
Expand All @@ -128,7 +126,6 @@ ruleTester.run('no-production-logging', rule, {
},
{
code: "console.warn('Oh no')",
output: "if (__DEV__) {console.warn('Oh no')}",
errors: [
{
message: `Wrap console.warn() in an "if (__DEV__) {}" check`,
Expand All @@ -141,11 +138,6 @@ ruleTester.run('no-production-logging', rule, {
console.warn('Oh no');
}
`,
output: `
if (potato) {
if (__DEV__) {console.warn('Oh no')};
}
`,
errors: [
{
message: `Wrap console.warn() in an "if (__DEV__) {}" check`,
Expand All @@ -158,11 +150,6 @@ ruleTester.run('no-production-logging', rule, {
console.error('Oh no');
}
`,
output: `
if (__DEV__ || potato && true) {
if (__DEV__) {console.error('Oh no')};
}
`,
errors: [
{
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
Expand All @@ -175,11 +162,6 @@ ruleTester.run('no-production-logging', rule, {
console.error('Oh no');
}
`,
output: `
if (banana && __DEV__ && potato && kitten) {
if (__DEV__) {console.error('Oh no')};
}
`,
// Technically this code is valid but we prefer
// explicit standalone __DEV__ blocks that stand out.
errors: [
Expand All @@ -194,11 +176,6 @@ ruleTester.run('no-production-logging', rule, {
console.error('Oh no');
}
`,
output: `
if (!__DEV__) {
if (__DEV__) {console.error('Oh no')};
}
`,
errors: [
{
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
Expand All @@ -211,11 +188,6 @@ ruleTester.run('no-production-logging', rule, {
console.error('Oh no');
}
`,
output: `
if (foo || x && __DEV__) {
if (__DEV__) {console.error('Oh no')};
}
`,
errors: [
{
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
Expand All @@ -229,12 +201,6 @@ ruleTester.run('no-production-logging', rule, {
console.error('Oh no');
}
`,
output: `
if (__DEV__) {
} else {
if (__DEV__) {console.error('Oh no')};
}
`,
errors: [
{
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
Expand All @@ -251,15 +217,6 @@ ruleTester.run('no-production-logging', rule, {
}
}
`,
output: `
if (__DEV__) {
} else {
if (__DEV__) {
} else {
if (__DEV__) {console.error('Oh no')};
}
}
`,
errors: [
{
message: `Wrap console.error() in an "if (__DEV__) {}" check`,
Expand Down
Loading

0 comments on commit 84fd4b8

Please sign in to comment.