Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(eslint): enable quotes: ["error", "single"] #15011

Merged
merged 1 commit into from
Aug 10, 2016

Conversation

mgol
Copy link
Member

@mgol mgol commented Aug 10, 2016

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

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.

'no-trailing-spaces': ['error', { 'skipBlankLines': true }],

// dgeni templates use double quotes as string delimiters
quotes: ['off']
Copy link
Member

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 😁)

Copy link
Member Author

@mgol mgol Aug 10, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkalpak
Copy link
Member

gkalpak commented Aug 10, 2016

LGTM

@gkalpak gkalpak added this to the Backlog milestone 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.

Closes angular#15011
@mgol mgol merged commit 9360aa2 into angular:master Aug 10, 2016
@mgol mgol deleted the eslint-quotes branch August 10, 2016 21:17
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.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants