Skip to content

Commit 00c3958

Browse files
bmeurerDevtools-frontend LUCI CQ
authored andcommitted
[eslint] Add import/first rule.
I was sure we already had this rule, but somehow we didn't. We should of course strive to have `import` statements first in all files. Bug: none Change-Id: Ic583710adc6cb3b7e5c0ae4bd82cd1f31fc9442b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6219315 Reviewed-by: Nikolay Vitkov <[email protected]> Auto-Submit: Benedikt Meurer <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]>
1 parent b218462 commit 00c3958

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ export default [
249249
'no-implicit-globals': 'off',
250250
'no-unused-private-class-members': 'error',
251251

252+
// Sort imports first
253+
'import/first': 'error',
252254
// Closure does not properly typecheck default exports
253255
'import/no-default-export': 'error',
254256
/**

test/e2e/panels/panels_test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
getBrowserAndPages,
99
waitFor,
1010
} from '../../shared/helper.js';
11+
import {runCommandWithQuickOpen} from '../helpers/quick_open-helpers.js';
1112

1213
// Ideally we want to have all panels within this list,
1314
// but introducing shadow doms for all panels currently leads
@@ -16,8 +17,6 @@ const PANEL_NAMES = [
1617
'Lighthouse',
1718
];
1819

19-
import {runCommandWithQuickOpen} from '../helpers/quick_open-helpers.js';
20-
2120
describe('DevTools panels', function() {
2221
PANEL_NAMES.forEach(panel => {
2322
it(`${panel} doesn't increase number of adopted style sheets on the document`, async () => {

0 commit comments

Comments
 (0)