This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
chore(eslint): enable quotes: ["error", "single"]
#15011
Merged
Merged
Conversation
This file contains hidden or 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
'no-trailing-spaces': ['error', { 'skipBlankLines': true }], | ||
|
||
// dgeni templates use double quotes as string delimiters | ||
quotes: ['off'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['off']
--> off
(for consistency with other rules 😁)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this one thing.
LGTM |
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. Closes angular#15011
mgol
added a commit
that referenced
this pull request
Aug 10, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes #15011
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this pull request
Aug 11, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders.
3 tasks
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this pull request
Aug 12, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130
gkalpak
added a commit
that referenced
this pull request
Aug 12, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in #15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes #15016
gkalpak
added a commit
that referenced
this pull request
Aug 12, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in #15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes #15016
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes angular#15011
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes angular#15016
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes angular#15011
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes angular#15016
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes angular#15011
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes angular#15016
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes angular#15011
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes angular#15016
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes angular#15011
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 21, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in angular#15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes angular#15016
petebacondarwin
pushed a commit
that referenced
this pull request
Nov 24, 2016
The quotes rule had to be disabled for e2e tests generated from ngdoc because dgeni templates use double quotes as string delimiters. Since we can't have guarantees that dgeni template wrappers will follow the same JS code style the Angular 1 repo uses, we should find a way to enforce our ESLint setup only for the parts in this repo, perhaps via prepending a generated `/* eslint-enable OUR_RULES */` pragma. (partially cherry-picked from 9360aa2) Closes #15011
petebacondarwin
pushed a commit
that referenced
this pull request
Nov 24, 2016
During the `build` task, the version placeholders will be replaced with the actual values using a RegExp, which expects the placeholders to be surrounded by double quotes. By replacing the quotes from double to single in #15011, the RegExp was not able to match the placeholders. (For reference, the RegExps that match and replace the version placeholders are in [lib/grunt/utils.js][1].) [1]: https://github.com/angular/angular.js/blob/859348c7f61ff5f93b9f81eb7f46842bd018d8e3/lib/grunt/utils.js#L125-L130 Closes #15016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Chore
What is the current behavior? (You can also link to an open issue here)
Quote type is not validated; most of the codebase uses single quotes but random places use double quotes.
What is the new behavior (if this is a feature change)?
String delimiters are enforced to be single quotes everywhere except the e2e tests generated by dgeni.
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Tests for the changes have been added (for bug fixes / features)Docs have been added / updated (for bug fixes / features)Other information:
Most of this PR has been auto-generated via
eslint . --fix
; examples had to be fixed manually, though as we can't autofix JSDoc.The quotes rule had to be disabled for e2e tests generated from ngdoc
because dgeni templates use double quotes as string delimiters.
Since we can't have guarantees that dgeni template wrappers will follow
the same JS code style the Angular 1 repo uses, we should find a way
to enforce our ESLint setup only for the parts in this repo, perhaps
via prepending a generated
/* eslint-enable OUR_RULES */
pragma.