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

Commit 9360aa2

Browse files
committed
chore(eslint): enable quotes: ["error", "single"]
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 #15011
1 parent 42a0061 commit 9360aa2

File tree

172 files changed

+2119
-2111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+2119
-2111
lines changed

.eslintrc-base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"no-spaced-func": "error",
105105
"no-trailing-spaces": "error",
106106
"no-unneeded-ternary": "error",
107+
"quotes": ["error", "single"],
107108
"semi-spacing": "error",
108109
"semi": "error",
109110
"space-before-blocks": ["error", "always"],

.eslintrc-todo.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
2121
"object-curly-spacing": ["error", "never"],
2222
"object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }],
23-
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" }}],
24-
"quotes": ["error", "single"]
23+
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" }}]
2524
}
2625
}

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ module.exports = function(grunt) {
205205
dest: 'build/angular-parse-ext.js',
206206
src: util.wrap(files['angularModules']['ngParseExt'], 'module')
207207
},
208-
"promises-aplus-adapter": {
208+
'promises-aplus-adapter': {
209209
dest:'tmp/promises-aplus-adapter++.js',
210210
src:['src/ng/q.js', 'lib/promises-aplus/promises-aplus-test-adapter.js']
211211
}

angularFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ var angularFiles = {
209209
'build/docs/docs-scenario.js'
210210
],
211211

212-
"karmaModules": [
212+
'karmaModules': [
213213
'build/angular.js',
214214
'@angularSrcModules',
215215
'test/modules/no_bootstrap.js',

benchmarks/ng-options-bp/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
/* globals angular, benchmarkSteps */
44

benchmarks/orderby-bp/bp.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module.exports = function(config) {
66
config.set({
77
scripts: [
88
{
9-
"id": "jquery",
10-
"src": "jquery-noop.js"
9+
'id': 'jquery',
10+
'src': 'jquery-noop.js'
1111
}, {
1212
id: 'angular',
1313
src: '/build/angular.js'

benchmarks/select-ng-value-bp/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
/* globals angular, benchmarkSteps */
44

changelog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ var writeChangelog = function(stream, commits, version) {
160160
if (commit.breaking) {
161161
sections.breaks[component] = sections.breaks[component] || [];
162162
sections.breaks[component].push({
163-
subject: util.format("due to %s,\n %s", linkToCommit(commit.hash), commit.breaking),
163+
subject: util.format('due to %s,\n %s', linkToCommit(commit.hash), commit.breaking),
164164
hash: commit.hash,
165165
closes: []
166166
});

docs/app/e2e/api-docs/api-pages.scenario.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
describe("doc.angularjs.org", function() {
3+
describe('doc.angularjs.org', function() {
44

5-
describe("API pages", function() {
5+
describe('API pages', function() {
66

7-
it("should display links to code on GitHub", function() {
7+
it('should display links to code on GitHub', function() {
88
browser.get('build/docs/index.html#!/api/ng/service/$http');
99
expect(element(by.css('.improve-docs')).getAttribute('href')).toMatch(/https?:\/\/github\.com\/angular\/angular\.js\/edit\/.+\/src\/ng\/http\.js/);
1010

@@ -38,7 +38,7 @@ describe("doc.angularjs.org", function() {
3838
expect(code.getText()).toContain('guest!!!');
3939
});
4040

41-
it("should trim indentation from code blocks", function() {
41+
it('should trim indentation from code blocks', function() {
4242
browser.get('build/docs/index.html#!/api/ng/type/$rootScope.Scope');
4343

4444
var codeBlocks = element.all(by.css('pre > code.lang-js'));

docs/app/e2e/api-docs/provider-pages.scenario.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
describe("provider pages", function() {
3+
describe('provider pages', function() {
44

5-
it("should show the related service", function() {
5+
it('should show the related service', function() {
66
browser.get('build/docs/index.html#!/api/ng/provider/$compileProvider');
77
var serviceLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
88
expect(serviceLink.getText()).toEqual('- $compile');

0 commit comments

Comments
 (0)