build(docs-infra): remove the only-arrow-functions
tslint rule to align with CLI (#39018)
This commit removes the `only-arrow-functions: false` tslint rule to more closely align `tslint.json` with the one generated by the latest Angular CLI for new apps. PR Close #39018
This commit is contained in:
parent
a7e1eb5312
commit
26574a7c46
@ -44,7 +44,7 @@ function handleMessage(message: { data: WebWorkerMessage }): void {
|
|||||||
const payload = message.data.payload;
|
const payload = message.data.payload;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'load-index':
|
case 'load-index':
|
||||||
makeRequest(SEARCH_TERMS_URL, function(searchInfo: PageInfo[]) {
|
makeRequest(SEARCH_TERMS_URL, (searchInfo: PageInfo[]) => {
|
||||||
index = createIndex(loadIndex(searchInfo));
|
index = createIndex(loadIndex(searchInfo));
|
||||||
postMessage({ type, id, payload: true });
|
postMessage({ type, id, payload: true });
|
||||||
});
|
});
|
||||||
@ -94,7 +94,7 @@ function queryIndex(query: string): PageInfo[] {
|
|||||||
results = index.search(query + ' ' + titleQuery);
|
results = index.search(query + ' ' + titleQuery);
|
||||||
}
|
}
|
||||||
// Map the hits into info about each page to be returned as results
|
// Map the hits into info about each page to be returned as results
|
||||||
return results.map(function(hit) { return pages[hit.ref]; });
|
return results.map(hit => pages[hit.ref]);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// If the search query cannot be parsed the index throws an error
|
// If the search query cannot be parsed the index throws an error
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ApiPage } from './api.po';
|
import { ApiPage } from './api.po';
|
||||||
|
|
||||||
describe('Api pages', function() {
|
describe('Api pages', () => {
|
||||||
it('should show direct subclasses of a class', () => {
|
it('should show direct subclasses of a class', () => {
|
||||||
const page = new ApiPage('api/forms/AbstractControlDirective');
|
const page = new ApiPage('api/forms/AbstractControlDirective');
|
||||||
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl']);
|
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl']);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { browser, by, element, ElementFinder } from 'protractor';
|
import { browser, by, element, ElementFinder } from 'protractor';
|
||||||
import { SitePage } from './app.po';
|
import { SitePage } from './app.po';
|
||||||
|
|
||||||
describe('site App', function() {
|
describe('site App', () => {
|
||||||
let page: SitePage;
|
let page: SitePage;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -3,7 +3,7 @@ import { SitePage } from './app.po';
|
|||||||
|
|
||||||
/* tslint:disable:max-line-length */
|
/* tslint:disable:max-line-length */
|
||||||
|
|
||||||
describe('onerror handler', function() {
|
describe('onerror handler', () => {
|
||||||
let page: SitePage;
|
let page: SitePage;
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
@ -186,7 +186,7 @@ createViewNodes@???`);
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function callOnError(message: string, url?: string, line?: number, column?: number, error?: Error) {
|
async function callOnError(message: string, url?: string, line?: number, column?: number, error?: Error) {
|
||||||
await browser.executeScript(function() {
|
await browser.executeScript(() => {
|
||||||
// reset the ga queue
|
// reset the ga queue
|
||||||
(window as any).ga.q.length = 0;
|
(window as any).ga.q.length = 0;
|
||||||
// post the error to the handler
|
// post the error to the handler
|
||||||
|
@ -68,7 +68,6 @@
|
|||||||
true,
|
true,
|
||||||
"as-needed"
|
"as-needed"
|
||||||
],
|
],
|
||||||
"only-arrow-functions": false,
|
|
||||||
"quotemark": [
|
"quotemark": [
|
||||||
true,
|
true,
|
||||||
"single"
|
"single"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user