WebUI: Enforce stricter TS ESLint checks for method names.
Achieved by enforcing 'strictCamelCase' format instead of just 'camelCase' in @typescript-eslint/naming-convention checks. The stricter checks catch violations of the 'Abbreviations' section of the styleguide at [1]like 'setPDF', or 'updateUIForViewportChange'. All existing violations have been fixed in precursor CLs, after uncovering them with the following command `git cl presubmit --files=*.ts` A couple new violations that were introduced within the last day are being fixed directly in this CL. [1] https://google.github.io/styleguide/tsguide.html#identifiers Bug: 720034 Change-Id: I0c596f4d3934af1dd53b881275c6469f67de1592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4083806 Reviewed-by: John Lee <johntlee@chromium.org> Commit-Queue: John Lee <johntlee@chromium.org> Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/main@{#1081830}
This commit is contained in:
.eslintrc.js
chrome/browser/resources
@ -124,12 +124,12 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
selector: 'classMethod',
|
||||
format: ['camelCase'],
|
||||
format: ['strictCamelCase'],
|
||||
modifiers: ['public'],
|
||||
},
|
||||
{
|
||||
selector: 'classMethod',
|
||||
format: ['camelCase'],
|
||||
format: ['strictCamelCase'],
|
||||
modifiers: ['private'],
|
||||
trailingUnderscore: 'allow',
|
||||
},
|
||||
|
@ -53,7 +53,7 @@
|
||||
</div>
|
||||
<cr-checkbox>Enable launching app on startup</cr-checkbox>
|
||||
</div>
|
||||
<button class="dropdown-item" on-click="onCreateAShortcutItemClick_">
|
||||
<button class="dropdown-item" on-click="onCreateShortcutItemClick_">
|
||||
Create a shortcut
|
||||
</button>
|
||||
<hr>
|
||||
|
@ -109,7 +109,7 @@ export class AppListElement extends PolymerElement {
|
||||
this.$.menu.close();
|
||||
}
|
||||
|
||||
private onCreateAShortcutItemClick_() {
|
||||
private onCreateShortcutItemClick_() {
|
||||
this.$.menu.close();
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ export class EmojiPicker extends PolymerElement {
|
||||
};
|
||||
}
|
||||
|
||||
initHistoryUI(incognito: boolean) {
|
||||
initHistoryUi(incognito: boolean) {
|
||||
if (incognito !== this.incognito) {
|
||||
this.updateIncognitoState(incognito);
|
||||
}
|
||||
@ -232,7 +232,7 @@ export class EmojiPicker extends PolymerElement {
|
||||
this.setActiveFeatures(response.featureList)),
|
||||
this.apiProxy.isIncognitoTextField().then(
|
||||
(response: {incognito: boolean}) =>
|
||||
this.initHistoryUI(response.incognito)),
|
||||
this.initHistoryUi(response.incognito)),
|
||||
],
|
||||
)
|
||||
.then(values => values[0]); // Map to the fetched data only.
|
||||
|
Reference in New Issue
Block a user