chrome-devtools-frontend 1.0.1537268 → 1.0.1538310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.template +10 -0
- package/docs/get_the_code.md +27 -0
- package/eslint.config.mjs +151 -149
- package/front_end/core/common/SettingRegistration.ts +10 -7
- package/front_end/core/common/Settings.ts +3 -0
- package/front_end/core/host/AidaClient.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +3 -1
- package/front_end/core/root/Runtime.ts +8 -0
- package/front_end/core/sdk/sdk-meta.ts +8 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +4 -3
- package/front_end/generated/SupportedCSSProperties.js +1 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +23 -7
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +110 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +50 -45
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +151 -0
- package/front_end/models/ai_code_generation/ai_code_generation.ts +6 -0
- package/front_end/models/ai_code_generation/debug.ts +30 -0
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +7 -7
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +10 -2
- package/front_end/panels/application/StorageView.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +34 -51
- package/front_end/panels/application/components/OriginTrialTreeView.ts +141 -170
- package/front_end/panels/application/components/backForwardCacheView.css +4 -0
- package/front_end/panels/application/components/originTrialTreeView.css +37 -7
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +30 -1
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +11 -9
- package/front_end/panels/coverage/CoverageView.ts +1 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +1 -1
- package/front_end/panels/elements/EventListenersWidget.ts +1 -2
- package/front_end/panels/elements/PropertiesWidget.ts +1 -1
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +1 -0
- package/front_end/panels/network/NetworkConfigView.ts +2 -1
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +5 -4
- package/front_end/panels/network/NetworkWaterfallColumn.ts +5 -6
- package/front_end/panels/network/RequestCookiesView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +404 -348
- package/front_end/panels/network/networkTimingTable.css +22 -2
- package/front_end/panels/profiler/HeapSnapshotView.ts +3 -2
- package/front_end/panels/sensors/SensorsView.ts +4 -3
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +8 -6
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
- package/front_end/panels/settings/SettingsScreen.ts +2 -1
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -1
- package/front_end/panels/sources/SourcesPanel.ts +2 -1
- package/front_end/panels/sources/sources-meta.ts +8 -1
- package/front_end/panels/timeline/TimelinePanel.ts +4 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -20
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -0
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +42 -3
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +2 -0
- package/front_end/panels/timeline/components/networkRequestTooltip.css +19 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/adorners/Adorner.ts +3 -1
- package/front_end/ui/components/buttons/Button.docs.ts +195 -0
- package/front_end/ui/components/icon_button/IconButton.ts +1 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +50 -14
- package/front_end/ui/components/settings/settingCheckbox.css +6 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +13 -0
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +76 -0
- package/front_end/ui/legacy/FilterBar.ts +1 -2
- package/front_end/ui/legacy/RadioButton.docs.ts +41 -0
- package/front_end/ui/legacy/SelectMenu.docs.ts +98 -0
- package/front_end/ui/legacy/Toolbar.ts +4 -6
- package/front_end/ui/legacy/Treeoutline.ts +15 -0
- package/front_end/ui/legacy/UIUtils.ts +117 -1
- package/front_end/ui/legacy/Widget.ts +68 -38
- package/front_end/ui/legacy/XLink.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +1 -0
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +1 -0
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +125 -0
- package/front_end/ui/legacy/components/settings_ui/settings_ui.ts +8 -0
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/legacy/popover.css +12 -11
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/package.json +1 -1
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +0 -62
- package/front_end/models/trace/lantern/testing/testing.ts +0 -5
- package/front_end/panels/application/components/badge.css +0 -25
- package/front_end/ui/components/docs/button/basic.html +0 -44
- package/front_end/ui/components/docs/button/basic.ts +0 -175
- package/front_end/ui/components/docs/radio_button/basic.html +0 -23
- package/front_end/ui/components/docs/radio_button/basic.ts +0 -50
- package/front_end/ui/components/docs/select_menu/basic.html +0 -19
- package/front_end/ui/components/docs/select_menu/basic.ts +0 -95
- package/front_end/ui/components/docs/select_menu/wide-option.html +0 -38
- package/front_end/ui/components/docs/select_menu/wide-option.ts +0 -43
- package/front_end/ui/components/docs/spinners/basic.html +0 -17
- package/front_end/ui/components/docs/spinners/basic.ts +0 -22
- package/front_end/ui/components/docs/tooltip/basic.html +0 -20
- package/front_end/ui/components/docs/tooltip/basic.ts +0 -82
- package/front_end/ui/legacy/SettingsUI.ts +0 -240
package/eslint.config.mjs
CHANGED
|
@@ -60,7 +60,7 @@ export default defineConfig([
|
|
|
60
60
|
'scripts/deps/tests/fixtures',
|
|
61
61
|
'test/**/fixtures/',
|
|
62
62
|
'test/e2e/**/*.js',
|
|
63
|
-
'test/shared/**/*.js'
|
|
63
|
+
'test/shared/**/*.js'
|
|
64
64
|
]),
|
|
65
65
|
{
|
|
66
66
|
name: 'JavaScript files',
|
|
@@ -71,20 +71,20 @@ export default defineConfig([
|
|
|
71
71
|
mocha: mochaPlugin,
|
|
72
72
|
'@devtools': devToolsPlugin,
|
|
73
73
|
import: importPlugin,
|
|
74
|
-
jsdoc: jsdocPlugin
|
|
74
|
+
jsdoc: jsdocPlugin
|
|
75
75
|
},
|
|
76
76
|
|
|
77
77
|
languageOptions: {
|
|
78
78
|
ecmaVersion: 'latest',
|
|
79
79
|
sourceType: 'module',
|
|
80
80
|
globals: {
|
|
81
|
-
...globals.browser
|
|
82
|
-
}
|
|
81
|
+
...globals.browser
|
|
82
|
+
}
|
|
83
83
|
},
|
|
84
84
|
|
|
85
85
|
linterOptions: {
|
|
86
86
|
reportUnusedDisableDirectives: 'error',
|
|
87
|
-
reportUnusedInlineConfigs: 'error'
|
|
87
|
+
reportUnusedInlineConfigs: 'error'
|
|
88
88
|
},
|
|
89
89
|
|
|
90
90
|
rules: {
|
|
@@ -94,8 +94,8 @@ export default defineConfig([
|
|
|
94
94
|
'single',
|
|
95
95
|
{
|
|
96
96
|
avoidEscape: true,
|
|
97
|
-
allowTemplateLiterals: 'always'
|
|
98
|
-
}
|
|
97
|
+
allowTemplateLiterals: 'always'
|
|
98
|
+
}
|
|
99
99
|
],
|
|
100
100
|
|
|
101
101
|
'@stylistic/semi': 'error',
|
|
@@ -107,8 +107,8 @@ export default defineConfig([
|
|
|
107
107
|
'error',
|
|
108
108
|
'always',
|
|
109
109
|
{
|
|
110
|
-
markers: ['*']
|
|
111
|
-
}
|
|
110
|
+
markers: ['*']
|
|
111
|
+
}
|
|
112
112
|
],
|
|
113
113
|
|
|
114
114
|
eqeqeq: 'error',
|
|
@@ -117,8 +117,8 @@ export default defineConfig([
|
|
|
117
117
|
'error',
|
|
118
118
|
{
|
|
119
119
|
getWithoutSet: false,
|
|
120
|
-
setWithoutGet: false
|
|
121
|
-
}
|
|
120
|
+
setWithoutGet: false
|
|
121
|
+
}
|
|
122
122
|
],
|
|
123
123
|
|
|
124
124
|
curly: 'error',
|
|
@@ -144,9 +144,9 @@ export default defineConfig([
|
|
|
144
144
|
'timeStamp',
|
|
145
145
|
'time',
|
|
146
146
|
'timeEnd',
|
|
147
|
-
'warn'
|
|
148
|
-
]
|
|
149
|
-
}
|
|
147
|
+
'warn'
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
150
|
],
|
|
151
151
|
|
|
152
152
|
'no-debugger': 'error',
|
|
@@ -156,15 +156,15 @@ export default defineConfig([
|
|
|
156
156
|
'no-else-return': [
|
|
157
157
|
'error',
|
|
158
158
|
{
|
|
159
|
-
allowElseIf: false
|
|
160
|
-
}
|
|
159
|
+
allowElseIf: false
|
|
160
|
+
}
|
|
161
161
|
],
|
|
162
162
|
|
|
163
163
|
'no-empty': [
|
|
164
164
|
'error',
|
|
165
165
|
{
|
|
166
|
-
allowEmptyCatch: true
|
|
167
|
-
}
|
|
166
|
+
allowEmptyCatch: true
|
|
167
|
+
}
|
|
168
168
|
],
|
|
169
169
|
'no-lonely-if': 'error',
|
|
170
170
|
|
|
@@ -184,8 +184,8 @@ export default defineConfig([
|
|
|
184
184
|
'error',
|
|
185
185
|
{
|
|
186
186
|
args: 'none',
|
|
187
|
-
vars: 'local'
|
|
188
|
-
}
|
|
187
|
+
vars: 'local'
|
|
188
|
+
}
|
|
189
189
|
],
|
|
190
190
|
|
|
191
191
|
'no-var': 'error',
|
|
@@ -206,8 +206,8 @@ export default defineConfig([
|
|
|
206
206
|
'@stylistic/no-multiple-empty-lines': [
|
|
207
207
|
'error',
|
|
208
208
|
{
|
|
209
|
-
max: 1
|
|
210
|
-
}
|
|
209
|
+
max: 1
|
|
210
|
+
}
|
|
211
211
|
],
|
|
212
212
|
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
213
213
|
'@stylistic/no-trailing-spaces': 'error',
|
|
@@ -222,10 +222,10 @@ export default defineConfig([
|
|
|
222
222
|
{
|
|
223
223
|
SwitchCase: 1,
|
|
224
224
|
CallExpression: {
|
|
225
|
-
arguments: 2
|
|
225
|
+
arguments: 2
|
|
226
226
|
},
|
|
227
|
-
MemberExpression: 2
|
|
228
|
-
}
|
|
227
|
+
MemberExpression: 2
|
|
228
|
+
}
|
|
229
229
|
],
|
|
230
230
|
|
|
231
231
|
// brace-style is disabled, as eslint cannot enforce 1tbs as default, but allman for functions
|
|
@@ -233,8 +233,8 @@ export default defineConfig([
|
|
|
233
233
|
'off',
|
|
234
234
|
'allman',
|
|
235
235
|
{
|
|
236
|
-
allowSingleLine: true
|
|
237
|
-
}
|
|
236
|
+
allowSingleLine: true
|
|
237
|
+
}
|
|
238
238
|
],
|
|
239
239
|
|
|
240
240
|
// key-spacing is disabled, as some objects use value-aligned spacing, some not.
|
|
@@ -243,8 +243,8 @@ export default defineConfig([
|
|
|
243
243
|
{
|
|
244
244
|
beforeColon: false,
|
|
245
245
|
afterColon: true,
|
|
246
|
-
align: 'value'
|
|
247
|
-
}
|
|
246
|
+
align: 'value'
|
|
247
|
+
}
|
|
248
248
|
],
|
|
249
249
|
|
|
250
250
|
'@stylistic/quote-props': ['error', 'as-needed'],
|
|
@@ -278,9 +278,9 @@ export default defineConfig([
|
|
|
278
278
|
named: false,
|
|
279
279
|
alphabetize: {
|
|
280
280
|
order: 'asc',
|
|
281
|
-
caseInsensitive: true
|
|
282
|
-
}
|
|
283
|
-
}
|
|
281
|
+
caseInsensitive: true
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
284
|
],
|
|
285
285
|
// Try to spot '// console.log()' left over from debugging
|
|
286
286
|
'@devtools/no-commented-out-console': 'error',
|
|
@@ -296,9 +296,9 @@ export default defineConfig([
|
|
|
296
296
|
{
|
|
297
297
|
definedTags: [
|
|
298
298
|
'attribute', // @attribute is used by lit-analyzer (through web-component-analyzer)
|
|
299
|
-
'meaning'
|
|
300
|
-
]
|
|
301
|
-
}
|
|
299
|
+
'meaning' // @meaning is used by localization
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
302
|
],
|
|
303
303
|
'jsdoc/empty-tags': 'error',
|
|
304
304
|
'jsdoc/multiline-blocks': 'error',
|
|
@@ -306,14 +306,14 @@ export default defineConfig([
|
|
|
306
306
|
'jsdoc/no-blank-blocks': [
|
|
307
307
|
'error',
|
|
308
308
|
{
|
|
309
|
-
enableFixer: true
|
|
310
|
-
}
|
|
309
|
+
enableFixer: true
|
|
310
|
+
}
|
|
311
311
|
],
|
|
312
312
|
'jsdoc/require-asterisk-prefix': 'error',
|
|
313
313
|
'jsdoc/require-param-name': 'error',
|
|
314
314
|
'jsdoc/require-hyphen-before-param-description': ['error', 'never'],
|
|
315
|
-
'jsdoc/sort-tags': 'error'
|
|
316
|
-
}
|
|
315
|
+
'jsdoc/sort-tags': 'error'
|
|
316
|
+
}
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
319
|
name: 'TypeScript files',
|
|
@@ -330,30 +330,30 @@ export default defineConfig([
|
|
|
330
330
|
import.meta.dirname,
|
|
331
331
|
'config',
|
|
332
332
|
'typescript',
|
|
333
|
-
'tsconfig.eslint.json'
|
|
334
|
-
)
|
|
335
|
-
}
|
|
333
|
+
'tsconfig.eslint.json'
|
|
334
|
+
)
|
|
335
|
+
}
|
|
336
336
|
},
|
|
337
337
|
|
|
338
338
|
rules: {
|
|
339
339
|
'@typescript-eslint/array-type': [
|
|
340
340
|
'error',
|
|
341
341
|
{
|
|
342
|
-
default: 'array-simple'
|
|
343
|
-
}
|
|
342
|
+
default: 'array-simple'
|
|
343
|
+
}
|
|
344
344
|
],
|
|
345
345
|
'@typescript-eslint/no-explicit-any': [
|
|
346
346
|
'error',
|
|
347
347
|
{
|
|
348
|
-
ignoreRestArgs: true
|
|
349
|
-
}
|
|
348
|
+
ignoreRestArgs: true
|
|
349
|
+
}
|
|
350
350
|
],
|
|
351
351
|
|
|
352
352
|
'@typescript-eslint/explicit-member-accessibility': [
|
|
353
353
|
'error',
|
|
354
354
|
{
|
|
355
|
-
accessibility: 'no-public'
|
|
356
|
-
}
|
|
355
|
+
accessibility: 'no-public'
|
|
356
|
+
}
|
|
357
357
|
],
|
|
358
358
|
|
|
359
359
|
// run just the TypeScript unused-vars rule, else we get duplicate errors
|
|
@@ -361,8 +361,8 @@ export default defineConfig([
|
|
|
361
361
|
'@typescript-eslint/no-unused-vars': [
|
|
362
362
|
'error',
|
|
363
363
|
{
|
|
364
|
-
argsIgnorePattern: '^_'
|
|
365
|
-
}
|
|
364
|
+
argsIgnorePattern: '^_'
|
|
365
|
+
}
|
|
366
366
|
],
|
|
367
367
|
|
|
368
368
|
'@stylistic/member-delimiter-style': [
|
|
@@ -370,47 +370,47 @@ export default defineConfig([
|
|
|
370
370
|
{
|
|
371
371
|
multiline: {
|
|
372
372
|
delimiter: 'semi',
|
|
373
|
-
requireLast: true
|
|
373
|
+
requireLast: true
|
|
374
374
|
},
|
|
375
375
|
|
|
376
376
|
singleline: {
|
|
377
377
|
delimiter: 'comma',
|
|
378
|
-
requireLast: false
|
|
378
|
+
requireLast: false
|
|
379
379
|
},
|
|
380
380
|
|
|
381
381
|
overrides: {
|
|
382
382
|
interface: {
|
|
383
383
|
singleline: {
|
|
384
384
|
delimiter: 'semi',
|
|
385
|
-
requireLast: false
|
|
385
|
+
requireLast: false
|
|
386
386
|
},
|
|
387
387
|
|
|
388
388
|
multiline: {
|
|
389
389
|
delimiter: 'semi',
|
|
390
|
-
requireLast: true
|
|
391
|
-
}
|
|
390
|
+
requireLast: true
|
|
391
|
+
}
|
|
392
392
|
},
|
|
393
393
|
|
|
394
394
|
typeLiteral: {
|
|
395
395
|
singleline: {
|
|
396
396
|
delimiter: 'comma',
|
|
397
|
-
requireLast: false
|
|
397
|
+
requireLast: false
|
|
398
398
|
},
|
|
399
399
|
|
|
400
400
|
multiline: {
|
|
401
401
|
delimiter: 'comma',
|
|
402
|
-
requireLast: true
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
402
|
+
requireLast: true
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
407
|
],
|
|
408
408
|
|
|
409
409
|
'@typescript-eslint/no-floating-promises': [
|
|
410
410
|
'error',
|
|
411
411
|
{
|
|
412
|
-
ignoreVoid: true
|
|
413
|
-
}
|
|
412
|
+
ignoreVoid: true
|
|
413
|
+
}
|
|
414
414
|
],
|
|
415
415
|
|
|
416
416
|
/**
|
|
@@ -434,8 +434,8 @@ export default defineConfig([
|
|
|
434
434
|
|
|
435
435
|
custom: {
|
|
436
436
|
regex: '^I[A-Z]',
|
|
437
|
-
match: false
|
|
438
|
-
}
|
|
437
|
+
match: false
|
|
438
|
+
}
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
selector: [
|
|
@@ -443,9 +443,9 @@ export default defineConfig([
|
|
|
443
443
|
'accessor',
|
|
444
444
|
'method',
|
|
445
445
|
'property',
|
|
446
|
-
'parameterProperty'
|
|
446
|
+
'parameterProperty'
|
|
447
447
|
],
|
|
448
|
-
format: ['camelCase']
|
|
448
|
+
format: ['camelCase']
|
|
449
449
|
},
|
|
450
450
|
{
|
|
451
451
|
selector: 'variable',
|
|
@@ -453,10 +453,10 @@ export default defineConfig([
|
|
|
453
453
|
filter: {
|
|
454
454
|
// Ignore localization variables.
|
|
455
455
|
regex: '^(UIStrings|str_)$',
|
|
456
|
-
match: false
|
|
456
|
+
match: false
|
|
457
457
|
},
|
|
458
458
|
|
|
459
|
-
format: ['camelCase']
|
|
459
|
+
format: ['camelCase']
|
|
460
460
|
},
|
|
461
461
|
{
|
|
462
462
|
// We are using camelCase, PascalCase and UPPER_CASE for top-level constants, allow the for now.
|
|
@@ -465,54 +465,54 @@ export default defineConfig([
|
|
|
465
465
|
filter: {
|
|
466
466
|
// Ignore localization variables.
|
|
467
467
|
regex: '^(UIStrings|str_)$',
|
|
468
|
-
match: false
|
|
468
|
+
match: false
|
|
469
469
|
},
|
|
470
470
|
|
|
471
|
-
format: ['camelCase', 'UPPER_CASE', 'PascalCase']
|
|
471
|
+
format: ['camelCase', 'UPPER_CASE', 'PascalCase']
|
|
472
472
|
},
|
|
473
473
|
{
|
|
474
474
|
selector: 'classProperty',
|
|
475
475
|
modifiers: ['static', 'readonly'],
|
|
476
|
-
format: ['UPPER_CASE', 'camelCase']
|
|
476
|
+
format: ['UPPER_CASE', 'camelCase']
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
479
|
selector: 'enumMember',
|
|
480
|
-
format: ['UPPER_CASE']
|
|
480
|
+
format: ['UPPER_CASE']
|
|
481
481
|
},
|
|
482
482
|
{
|
|
483
483
|
selector: ['typeLike'],
|
|
484
|
-
format: ['PascalCase']
|
|
484
|
+
format: ['PascalCase']
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
487
|
selector: 'parameter',
|
|
488
488
|
format: ['camelCase'],
|
|
489
|
-
leadingUnderscore: 'allow'
|
|
489
|
+
leadingUnderscore: 'allow'
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
// Public methods are currently in transition and may still have leading underscores.
|
|
493
493
|
selector: 'method',
|
|
494
494
|
modifiers: ['public'],
|
|
495
495
|
format: ['camelCase'],
|
|
496
|
-
leadingUnderscore: 'allow'
|
|
496
|
+
leadingUnderscore: 'allow'
|
|
497
497
|
},
|
|
498
498
|
{
|
|
499
499
|
selector: 'property',
|
|
500
500
|
modifiers: ['public'],
|
|
501
501
|
format: ['camelCase'],
|
|
502
|
-
leadingUnderscore: 'allow'
|
|
502
|
+
leadingUnderscore: 'allow'
|
|
503
503
|
},
|
|
504
504
|
{
|
|
505
505
|
// Object literals may be constructed as arguments to external libraries which follow different styles.
|
|
506
506
|
selector: ['objectLiteralMethod', 'objectLiteralProperty'],
|
|
507
507
|
modifiers: ['public'],
|
|
508
|
-
format: null
|
|
508
|
+
format: null
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
511
|
// Ignore type properties that require quotes
|
|
512
512
|
selector: 'typeProperty',
|
|
513
513
|
format: null,
|
|
514
|
-
modifiers: ['requiresQuotes']
|
|
515
|
-
}
|
|
514
|
+
modifiers: ['requiresQuotes']
|
|
515
|
+
}
|
|
516
516
|
],
|
|
517
517
|
|
|
518
518
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
@@ -529,7 +529,7 @@ export default defineConfig([
|
|
|
529
529
|
|
|
530
530
|
'@typescript-eslint/consistent-generic-constructors': [
|
|
531
531
|
'error',
|
|
532
|
-
'constructor'
|
|
532
|
+
'constructor'
|
|
533
533
|
],
|
|
534
534
|
|
|
535
535
|
// This is more performant
|
|
@@ -545,8 +545,8 @@ export default defineConfig([
|
|
|
545
545
|
'ts-check': false,
|
|
546
546
|
'ts-expect-error': 'allow-with-description',
|
|
547
547
|
'ts-ignore': true,
|
|
548
|
-
'ts-nocheck': true
|
|
549
|
-
}
|
|
548
|
+
'ts-nocheck': true
|
|
549
|
+
}
|
|
550
550
|
],
|
|
551
551
|
|
|
552
552
|
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
@@ -556,8 +556,8 @@ export default defineConfig([
|
|
|
556
556
|
'@typescript-eslint/no-empty-object-type': [
|
|
557
557
|
'error',
|
|
558
558
|
{
|
|
559
|
-
allowInterfaces: 'with-single-extends'
|
|
560
|
-
}
|
|
559
|
+
allowInterfaces: 'with-single-extends'
|
|
560
|
+
}
|
|
561
561
|
],
|
|
562
562
|
|
|
563
563
|
'no-array-constructor': 'off',
|
|
@@ -580,10 +580,10 @@ export default defineConfig([
|
|
|
580
580
|
'front_end',
|
|
581
581
|
'models',
|
|
582
582
|
'trace',
|
|
583
|
-
'trace.js'
|
|
583
|
+
'trace.js'
|
|
584
584
|
),
|
|
585
|
-
importName: 'Trace'
|
|
586
|
-
}
|
|
585
|
+
importName: 'Trace'
|
|
586
|
+
}
|
|
587
587
|
],
|
|
588
588
|
|
|
589
589
|
'@devtools/validate-timing-types': 'error',
|
|
@@ -591,8 +591,8 @@ export default defineConfig([
|
|
|
591
591
|
// Disallow redundant (and potentially conflicting) type information
|
|
592
592
|
// within JSDoc comments.
|
|
593
593
|
'jsdoc/no-types': 'error',
|
|
594
|
-
'jsdoc/require-returns-description': 'error'
|
|
595
|
-
}
|
|
594
|
+
'jsdoc/require-returns-description': 'error'
|
|
595
|
+
}
|
|
596
596
|
},
|
|
597
597
|
{
|
|
598
598
|
name: 'Scripts files',
|
|
@@ -600,8 +600,8 @@ export default defineConfig([
|
|
|
600
600
|
rules: {
|
|
601
601
|
'no-console': 'off',
|
|
602
602
|
'@devtools/es-modules-import': 'off',
|
|
603
|
-
'import/no-default-export': 'off'
|
|
604
|
-
}
|
|
603
|
+
'import/no-default-export': 'off'
|
|
604
|
+
}
|
|
605
605
|
},
|
|
606
606
|
{
|
|
607
607
|
name: 'Front-end files',
|
|
@@ -611,15 +611,15 @@ export default defineConfig([
|
|
|
611
611
|
'@devtools/l10n-filename-matches': [
|
|
612
612
|
'error',
|
|
613
613
|
{
|
|
614
|
-
rootFrontendDirectory: join(import.meta.dirname, 'front_end')
|
|
615
|
-
}
|
|
614
|
+
rootFrontendDirectory: join(import.meta.dirname, 'front_end')
|
|
615
|
+
}
|
|
616
616
|
],
|
|
617
617
|
'@devtools/l10n-i18nString-call-only-with-uistrings': 'error',
|
|
618
618
|
'@devtools/l10n-no-i18nString-calls-module-instantiation': 'error',
|
|
619
619
|
'@devtools/l10n-no-locked-or-placeholder-only-phrase': 'error',
|
|
620
620
|
'@devtools/l10n-no-uistrings-export': 'error',
|
|
621
|
-
'@devtools/l10n-no-unused-message': 'error'
|
|
622
|
-
}
|
|
621
|
+
'@devtools/l10n-no-unused-message': 'error'
|
|
622
|
+
}
|
|
623
623
|
},
|
|
624
624
|
{
|
|
625
625
|
name: 'Front-end TypeScript files',
|
|
@@ -630,8 +630,8 @@ export default defineConfig([
|
|
|
630
630
|
{
|
|
631
631
|
allowExpressions: true,
|
|
632
632
|
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
|
|
633
|
-
allowIIFEs: true
|
|
634
|
-
}
|
|
633
|
+
allowIIFEs: true
|
|
634
|
+
}
|
|
635
635
|
],
|
|
636
636
|
'@devtools/no-imperative-dom-api': 'error',
|
|
637
637
|
'@devtools/no-lit-render-outside-of-view': 'error',
|
|
@@ -650,8 +650,8 @@ export default defineConfig([
|
|
|
650
650
|
'@devtools/require-super-calls-in-overridden-methods': [
|
|
651
651
|
'error',
|
|
652
652
|
{
|
|
653
|
-
methodNames: ['wasShown', 'willHide']
|
|
654
|
-
}
|
|
653
|
+
methodNames: ['wasShown', 'willHide']
|
|
654
|
+
}
|
|
655
655
|
],
|
|
656
656
|
'@devtools/static-custom-event-names': 'error',
|
|
657
657
|
'@devtools/lit-no-attribute-quotes': 'error',
|
|
@@ -663,12 +663,13 @@ export default defineConfig([
|
|
|
663
663
|
'@devtools/enforce-custom-element-definitions-location': [
|
|
664
664
|
'error',
|
|
665
665
|
{
|
|
666
|
-
rootFrontendDirectory: join(import.meta.dirname, 'front_end')
|
|
667
|
-
}
|
|
666
|
+
rootFrontendDirectory: join(import.meta.dirname, 'front_end')
|
|
667
|
+
}
|
|
668
668
|
],
|
|
669
669
|
'@devtools/enforce-ui-strings-as-const': 'error',
|
|
670
670
|
'@devtools/no-new-lit-element-components': 'error',
|
|
671
|
-
|
|
671
|
+
'@devtools/enforce-custom-element-prefix': 'error'
|
|
672
|
+
}
|
|
672
673
|
},
|
|
673
674
|
{
|
|
674
675
|
name: 'Front-end meta files',
|
|
@@ -679,10 +680,10 @@ export default defineConfig([
|
|
|
679
680
|
{
|
|
680
681
|
selector: 'parameter',
|
|
681
682
|
format: ['camelCase', 'PascalCase'],
|
|
682
|
-
leadingUnderscore: 'allow'
|
|
683
|
-
}
|
|
684
|
-
]
|
|
685
|
-
}
|
|
683
|
+
leadingUnderscore: 'allow'
|
|
684
|
+
}
|
|
685
|
+
]
|
|
686
|
+
}
|
|
686
687
|
},
|
|
687
688
|
{
|
|
688
689
|
name: 'TypeScript test files',
|
|
@@ -693,7 +694,7 @@ export default defineConfig([
|
|
|
693
694
|
'test/**/*.ts',
|
|
694
695
|
'**/testing/*.ts',
|
|
695
696
|
'scripts/eslint_rules/test/**/*',
|
|
696
|
-
'extensions/cxx_debugging/e2e/**'
|
|
697
|
+
'extensions/cxx_debugging/e2e/**'
|
|
697
698
|
],
|
|
698
699
|
|
|
699
700
|
rules: {
|
|
@@ -715,10 +716,10 @@ export default defineConfig([
|
|
|
715
716
|
// Chai AssertionError does not extend Error
|
|
716
717
|
from: 'package',
|
|
717
718
|
package: 'chai',
|
|
718
|
-
name: ['AssertionError']
|
|
719
|
-
}
|
|
720
|
-
]
|
|
721
|
-
}
|
|
719
|
+
name: ['AssertionError']
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
}
|
|
722
723
|
],
|
|
723
724
|
|
|
724
725
|
'@devtools/check-test-definitions': 'error',
|
|
@@ -738,6 +739,7 @@ export default defineConfig([
|
|
|
738
739
|
'@devtools/trace-engine-test-timeouts': 'error',
|
|
739
740
|
'@devtools/no-document-body-mutation': 'error',
|
|
740
741
|
'@devtools/enforce-custom-element-definitions-location': 'off',
|
|
742
|
+
'@devtools/enforce-custom-element-prefix': 'off'
|
|
741
743
|
},
|
|
742
744
|
|
|
743
745
|
settings: {
|
|
@@ -745,69 +747,69 @@ export default defineConfig([
|
|
|
745
747
|
{
|
|
746
748
|
name: 'describeWithDevtoolsExtension',
|
|
747
749
|
type: 'suite',
|
|
748
|
-
interfaces: ['BDD', 'TDD']
|
|
750
|
+
interfaces: ['BDD', 'TDD']
|
|
749
751
|
},
|
|
750
752
|
{
|
|
751
753
|
name: 'describeWithEnvironment',
|
|
752
754
|
type: 'suite',
|
|
753
|
-
interfaces: ['BDD', 'TDD']
|
|
755
|
+
interfaces: ['BDD', 'TDD']
|
|
754
756
|
},
|
|
755
757
|
{
|
|
756
758
|
name: 'describeWithLocale',
|
|
757
759
|
type: 'suite',
|
|
758
|
-
interfaces: ['BDD', 'TDD']
|
|
760
|
+
interfaces: ['BDD', 'TDD']
|
|
759
761
|
},
|
|
760
762
|
{
|
|
761
763
|
name: 'describeWithMockConnection',
|
|
762
764
|
type: 'suite',
|
|
763
|
-
interfaces: ['BDD', 'TDD']
|
|
764
|
-
}
|
|
765
|
-
]
|
|
766
|
-
}
|
|
765
|
+
interfaces: ['BDD', 'TDD']
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
}
|
|
767
769
|
},
|
|
768
770
|
{
|
|
769
771
|
name: 'Use private class members rule',
|
|
770
772
|
files: [
|
|
771
773
|
'front_end/panels/**/components/*.ts',
|
|
772
774
|
'front_end/ui/components/**/*.ts',
|
|
773
|
-
'front_end/entrypoints/**/*.ts'
|
|
775
|
+
'front_end/entrypoints/**/*.ts'
|
|
774
776
|
],
|
|
775
777
|
|
|
776
778
|
rules: {
|
|
777
|
-
'@devtools/prefer-private-class-members': 'error'
|
|
778
|
-
}
|
|
779
|
+
'@devtools/prefer-private-class-members': 'error'
|
|
780
|
+
}
|
|
779
781
|
},
|
|
780
782
|
{
|
|
781
783
|
name: 'Ignore private class members rule',
|
|
782
784
|
files: [
|
|
783
785
|
'front_end/panels/recorder/**/*.ts',
|
|
784
|
-
'front_end/ui/components/suggestion_input/*.ts'
|
|
786
|
+
'front_end/ui/components/suggestion_input/*.ts'
|
|
785
787
|
],
|
|
786
788
|
rules: {
|
|
787
789
|
// TODO(crbug/1402569): Reenable once https://github.com/microsoft/TypeScript/issues/48885 is closed.
|
|
788
|
-
'@devtools/prefer-private-class-members': 'off'
|
|
789
|
-
}
|
|
790
|
+
'@devtools/prefer-private-class-members': 'off'
|
|
791
|
+
}
|
|
790
792
|
},
|
|
791
793
|
{
|
|
792
794
|
name: 'Supported CSS properties rules',
|
|
793
795
|
files: ['front_end/generated/SupportedCSSProperties.js'],
|
|
794
796
|
rules: {
|
|
795
|
-
'@devtools/jslog-context-list': 'error'
|
|
796
|
-
}
|
|
797
|
+
'@devtools/jslog-context-list': 'error'
|
|
798
|
+
}
|
|
797
799
|
},
|
|
798
800
|
{
|
|
799
801
|
name: 'EsLint rules test',
|
|
800
802
|
files: ['scripts/eslint_rules/tests/**/*'],
|
|
801
803
|
rules: {
|
|
802
|
-
'@eslint-plugin/no-only-tests': 'error'
|
|
803
|
-
}
|
|
804
|
+
'@eslint-plugin/no-only-tests': 'error'
|
|
805
|
+
}
|
|
804
806
|
},
|
|
805
807
|
{
|
|
806
808
|
name: 'Legacy test runner',
|
|
807
809
|
files: ['front_end/legacy_test_runner/**/*'],
|
|
808
810
|
rules: {
|
|
809
|
-
'@devtools/es-modules-import': 'off'
|
|
810
|
-
}
|
|
811
|
+
'@devtools/es-modules-import': 'off'
|
|
812
|
+
}
|
|
811
813
|
},
|
|
812
814
|
{
|
|
813
815
|
name: 'Front-end component docs',
|
|
@@ -821,8 +823,8 @@ export default defineConfig([
|
|
|
821
823
|
// {host: this} as often the `this` is the window.
|
|
822
824
|
'@devtools/lit-host-this': 'off',
|
|
823
825
|
'@devtools/no-imperative-dom-api': 'off',
|
|
824
|
-
'@devtools/no-lit-render-outside-of-view': 'off'
|
|
825
|
-
}
|
|
826
|
+
'@devtools/no-lit-render-outside-of-view': 'off'
|
|
827
|
+
}
|
|
826
828
|
},
|
|
827
829
|
{
|
|
828
830
|
name: 'Keep models/trace isolated',
|
|
@@ -839,22 +841,22 @@ export default defineConfig([
|
|
|
839
841
|
'front_end',
|
|
840
842
|
'core',
|
|
841
843
|
'sdk',
|
|
842
|
-
'sdk.js'
|
|
844
|
+
'sdk.js'
|
|
843
845
|
),
|
|
844
|
-
allowTypeImports: true
|
|
845
|
-
}
|
|
846
|
-
]
|
|
847
|
-
}
|
|
848
|
-
]
|
|
849
|
-
}
|
|
846
|
+
allowTypeImports: true
|
|
847
|
+
}
|
|
848
|
+
]
|
|
849
|
+
}
|
|
850
|
+
]
|
|
851
|
+
}
|
|
850
852
|
},
|
|
851
853
|
{
|
|
852
854
|
name: 'Recorder injected code',
|
|
853
855
|
files: ['front_end/panels/recorder/injected/**/*.ts'],
|
|
854
856
|
rules: {
|
|
855
857
|
// The code is rolled up and tree-shaken independently from the regular entrypoints.
|
|
856
|
-
'@devtools/es-modules-import': 'off'
|
|
857
|
-
}
|
|
858
|
+
'@devtools/es-modules-import': 'off'
|
|
859
|
+
}
|
|
858
860
|
},
|
|
859
861
|
{
|
|
860
862
|
name: 'Performance panel file',
|
|
@@ -865,8 +867,8 @@ export default defineConfig([
|
|
|
865
867
|
// enabled in this folder because it is an
|
|
866
868
|
// expensive rule to run and we do not need it
|
|
867
869
|
// for any code that doesn't use Canvas.
|
|
868
|
-
'@devtools/canvas-context-tracking': 'error'
|
|
869
|
-
}
|
|
870
|
+
'@devtools/canvas-context-tracking': 'error'
|
|
871
|
+
}
|
|
870
872
|
},
|
|
871
873
|
{
|
|
872
874
|
name: 'TypeScript type-definitions',
|
|
@@ -874,8 +876,8 @@ export default defineConfig([
|
|
|
874
876
|
rules: {
|
|
875
877
|
// Not a useful rule for .d.ts files where we are
|
|
876
878
|
// representing an existing module.
|
|
877
|
-
'import/no-default-export': 'off'
|
|
878
|
-
}
|
|
879
|
+
'import/no-default-export': 'off'
|
|
880
|
+
}
|
|
879
881
|
},
|
|
880
882
|
{
|
|
881
883
|
name: 'Config files',
|
|
@@ -883,7 +885,7 @@ export default defineConfig([
|
|
|
883
885
|
rules: {
|
|
884
886
|
// The config operate on the default export
|
|
885
887
|
// So allow it for them
|
|
886
|
-
'import/no-default-export': 'off'
|
|
887
|
-
}
|
|
888
|
-
}
|
|
888
|
+
'import/no-default-export': 'off'
|
|
889
|
+
}
|
|
890
|
+
}
|
|
889
891
|
]);
|