Skip to content

Commit

Permalink
Fix: ignore lines with empty elements (fixes eslint#12756)
Browse files Browse the repository at this point in the history
  • Loading branch information
boutahlilsoufiane committed Jul 29, 2021
1 parent bc349f6 commit 629fb35
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/lib/rules/comma-style.js
Expand Up @@ -237,7 +237,6 @@ ruleTester.run("comma-style", rule, {
"var foo = [\n , \n 1, \n 2 \n];",
{
code: "const [\n , \n , \n a, \n b, \n] = arr;",
output: "const [\n , \n , \n a, \n b, \n] = arr;",
options: ["last", {
exceptions: {
ArrayPattern: false
Expand All @@ -249,7 +248,6 @@ ruleTester.run("comma-style", rule, {
},
{
code: "const [\n ,, \n a, \n b, \n] = arr;",
output: "const [\n ,, \n a, \n b, \n] = arr;",
options: ["last", {
exceptions: {
ArrayPattern: false
Expand All @@ -261,15 +259,13 @@ ruleTester.run("comma-style", rule, {
},
{
code: "const arr = [\n 1 \n , \n ,2 \n]",
output: "const arr = [\n 1 \n , \n ,2 \n]",
options: ["first"],
parserOptions: {
ecmaVersion: 6
}
},
{
code: "const arr = [\n ,'fifi' \n]",
output: "const arr = [\n ,'fifi' \n]",
options: ["first"],
parserOptions: {
ecmaVersion: 6
Expand Down

0 comments on commit 629fb35

Please sign in to comment.