Skip to content

Commit 9f442bb

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored andcommitted
ESLint rule to prohibit Lit render outside of the view function
Bug: 400353541 Change-Id: Iab150d1229d4231bbc6700ea8ecef56c43cf8fcd Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6425303 Reviewed-by: Benedikt Meurer <[email protected]> Auto-Submit: Danil Somsikov <[email protected]> Commit-Queue: Danil Somsikov <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]>
1 parent 773da36 commit 9f442bb

File tree

164 files changed

+336
-0
lines changed

Some content is hidden

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

164 files changed

+336
-0
lines changed

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ export default [
612612
},
613613
],
614614
'rulesdir/no-imperative-dom-api': 'error',
615+
'rulesdir/no-lit-render-outside-of-view': 'error',
615616
'rulesdir/no-importing-images-from-src': 'error',
616617
'rulesdir/enforce-bound-render-for-schedule-render': 'error',
617618
'rulesdir/enforce-custom-event-names': 'error',
@@ -700,6 +701,7 @@ export default [
700701
'rulesdir/no-assert-equal': 'error',
701702
'rulesdir/no-assert-equal-boolean-null-undefined': 'error',
702703
'rulesdir/no-imperative-dom-api': 'off',
704+
'rulesdir/no-lit-render-outside-of-view': 'off',
703705
'rulesdir/no-screenshot-test-outside-perf-panel': 'error',
704706
'rulesdir/prefer-assert-instance-of': 'error',
705707
'rulesdir/prefer-assert-is-ok': 'error',
@@ -800,6 +802,7 @@ export default [
800802
// {host: this} as often the `this` is the window.
801803
'rulesdir/lit-host-this': 'off',
802804
'rulesdir/no-imperative-dom-api': 'off',
805+
'rulesdir/no-lit-render-outside-of-view': 'off',
803806
},
804807
},
805808
{

front_end/entrypoints/main/MainImpl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
/* eslint-disable rulesdir/no-imperative-dom-api */
5+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
56

67
/*
78
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.

front_end/panels/ai_assistance/PatchWidget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2025 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
import '../../ui/components/markdown_view/markdown_view.js';
67
import '../../ui/components/spinners/spinners.js';

front_end/panels/ai_assistance/components/ChatView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
/* eslint-disable rulesdir/no-imperative-dom-api */
5+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
56

67
import '../../../ui/components/spinners/spinners.js';
78

front_end/panels/ai_assistance/components/UserActionRow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2024 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
import * as Common from '../../../core/common/common.js';
67
import * as Host from '../../../core/host/host.js';

front_end/panels/application/KeyValueStorageItemsView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2025 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
/*
67
* Copyright (C) 2008 Nokia Inc. All rights reserved.

front_end/panels/application/components/BackForwardCacheView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2021 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
import '../../../ui/components/chrome_link/chrome_link.js';
67
import '../../../ui/components/expandable_list/expandable_list.js';

front_end/panels/application/components/BounceTrackingMitigationsView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2023 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
import '../../../ui/components/report_view/report_view.js';
67
import '../../../ui/legacy/components/data_grid/data_grid.js';

front_end/panels/application/components/EndpointsGrid.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2021 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
import '../../../ui/legacy/components/data_grid/data_grid.js';
67

front_end/panels/application/components/FrameDetailsView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2021 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4+
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
45

56
import '../../../ui/components/expandable_list/expandable_list.js';
67
import '../../../ui/components/report_view/report_view.js';

0 commit comments

Comments
 (0)