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;
|
||||
switch (type) {
|
||||
case 'load-index':
|
||||
makeRequest(SEARCH_TERMS_URL, function(searchInfo: PageInfo[]) {
|
||||
makeRequest(SEARCH_TERMS_URL, (searchInfo: PageInfo[]) => {
|
||||
index = createIndex(loadIndex(searchInfo));
|
||||
postMessage({ type, id, payload: true });
|
||||
});
|
||||
|
@ -94,7 +94,7 @@ function queryIndex(query: string): PageInfo[] {
|
|||
results = index.search(query + ' ' + titleQuery);
|
||||
}
|
||||
// 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) {
|
||||
// If the search query cannot be parsed the index throws an error
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ApiPage } from './api.po';
|
||||
|
||||
describe('Api pages', function() {
|
||||
describe('Api pages', () => {
|
||||
it('should show direct subclasses of a class', () => {
|
||||
const page = new ApiPage('api/forms/AbstractControlDirective');
|
||||
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl']);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { SitePage } from './app.po';
|
||||
|
||||
describe('site App', function() {
|
||||
describe('site App', () => {
|
||||
let page: SitePage;
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { SitePage } from './app.po';
|
|||
|
||||
/* tslint:disable:max-line-length */
|
||||
|
||||
describe('onerror handler', function() {
|
||||
describe('onerror handler', () => {
|
||||
let page: SitePage;
|
||||
|
||||
beforeAll(() => {
|
||||
|
@ -186,7 +186,7 @@ createViewNodes@???`);
|
|||
});
|
||||
|
||||
async function callOnError(message: string, url?: string, line?: number, column?: number, error?: Error) {
|
||||
await browser.executeScript(function() {
|
||||
await browser.executeScript(() => {
|
||||
// reset the ga queue
|
||||
(window as any).ga.q.length = 0;
|
||||
// post the error to the handler
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"only-arrow-functions": false,
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
|
|
Loading…
Reference in New Issue