forked from palantir/tslint
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix quotemark avoid-template issues (palantir#4408)
- Loading branch information
1 parent
735a392
commit 9cd8af3
Showing
9 changed files
with
116 additions
and
69 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -16,3 +16,5 @@ bar | |
foo``; | ||
`${foo}`; | ||
|
||
this.toastCtrl.present('Please tick "Yes" to confirm'); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"quotemark": [true, "double", "avoid-escape", "avoid-template"] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"rules": { | ||
"quotemark": [true, "avoid-escape", "single"] | ||
"quotemark": [true, "single", "avoid-escape"] | ||
} | ||
} |
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,20 @@ | ||
'fo`o'; | ||
|
||
"a 'quote'"; | ||
|
||
'a "quote"'; | ||
|
||
`a "quote" 'quote'`; | ||
|
||
// Allow multi-line templates | ||
` | ||
foo | ||
bar | ||
`; | ||
|
||
// Allow tagged templates and templates with substitutions | ||
foo``; | ||
`${foo}`; | ||
|
||
this.toastCtrl.present('Please tick "Yes" to confirm'); | ||
|
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,26 @@ | ||
`fo\`o`; | ||
~~~~~~~ [0] | ||
|
||
`a 'quote'`; | ||
~~~~~~~~~~~ [1] | ||
|
||
`a "quote"`; | ||
~~~~~~~~~~~ [0] | ||
|
||
`a "quote" 'quote'`; | ||
|
||
// Allow multi-line templates | ||
` | ||
foo | ||
bar | ||
`; | ||
|
||
// Allow tagged templates and templates with substitutions | ||
foo``; | ||
`${foo}`; | ||
|
||
this.toastCtrl.present(`Please tick "Yes" to confirm`); | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [0] | ||
|
||
[0]: ` should be ' | ||
[1]: ` should be " |
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,5 @@ | ||
{ | ||
"rules": { | ||
"quotemark": [true, "single", "avoid-escape", "avoid-template"] | ||
} | ||
} |