-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix: --quiet no longer fixes warnings (fixes #8675) * Simplifying quietFixPredicate
- Loading branch information
1 parent
b678535
commit f00854e
Showing
6 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/fixtures/autofix-integration/left-pad-expected-quiet.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* eslint dot-notation: 2 */ | ||
/* eslint indent: [2, 2] */ | ||
/* eslint no-extra-parens: 2 */ | ||
/* eslint no-implicit-coercion: 2 */ | ||
/* eslint no-whitespace-before-property: 2 */ | ||
/* eslint quotes: [2, "single"] */ | ||
/* eslint semi: 2 */ | ||
/* eslint semi-spacing: 2 */ | ||
/* eslint space-before-function-paren: 2 */ | ||
/* eslint space-before-blocks: 1 */ | ||
|
||
/* | ||
* [email protected] | ||
* WTFPL https://github.com/stevemao/left-pad/blob/aff6d744155a70b81f09effb8185a1564f348462/COPYING | ||
*/ | ||
|
||
module.exports = leftpad; | ||
|
||
function leftpad (str, len, ch){ | ||
str = String(str); | ||
|
||
var i = -1; | ||
|
||
ch || (ch = ' '); | ||
len = len - str.length; | ||
|
||
|
||
while (++i < len) { | ||
str = ch + str; | ||
} | ||
|
||
return str; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/* eslint semi: 2 */ | ||
/* eslint semi-spacing: 2 */ | ||
/* eslint space-before-function-paren: 2 */ | ||
/* eslint space-before-blocks: 1 */ | ||
|
||
/* | ||
* [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/* eslint semi: 2 */ | ||
/* eslint semi-spacing: 2 */ | ||
/* eslint space-before-function-paren: 2 */ | ||
/* eslint space-before-blocks: 1 */ | ||
|
||
/* | ||
* [email protected] | ||
|
@@ -15,7 +16,7 @@ | |
|
||
module.exports = (leftpad) | ||
|
||
function leftpad(str, len, ch) { | ||
function leftpad(str, len, ch){ | ||
str = ("" + str); | ||
|
||
var i = -1 ; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters