chrome-devtools-frontend 1.0.995491 → 1.0.996595
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/AUTHORS +1 -0
- package/front_end/core/i18n/locales/af.json +96 -42
- package/front_end/core/i18n/locales/am.json +97 -43
- package/front_end/core/i18n/locales/ar.json +95 -41
- package/front_end/core/i18n/locales/as.json +95 -41
- package/front_end/core/i18n/locales/az.json +96 -42
- package/front_end/core/i18n/locales/be.json +124 -70
- package/front_end/core/i18n/locales/bg.json +96 -42
- package/front_end/core/i18n/locales/bn.json +95 -41
- package/front_end/core/i18n/locales/bs.json +95 -41
- package/front_end/core/i18n/locales/ca.json +96 -42
- package/front_end/core/i18n/locales/cs.json +95 -41
- package/front_end/core/i18n/locales/cy.json +95 -41
- package/front_end/core/i18n/locales/da.json +97 -43
- package/front_end/core/i18n/locales/de.json +96 -42
- package/front_end/core/i18n/locales/el.json +95 -41
- package/front_end/core/i18n/locales/en-GB.json +95 -41
- package/front_end/core/i18n/locales/en-US.json +26 -5
- package/front_end/core/i18n/locales/en-XL.json +26 -5
- package/front_end/core/i18n/locales/es-419.json +95 -41
- package/front_end/core/i18n/locales/es.json +101 -47
- package/front_end/core/i18n/locales/et.json +95 -41
- package/front_end/core/i18n/locales/eu.json +100 -46
- package/front_end/core/i18n/locales/fa.json +104 -50
- package/front_end/core/i18n/locales/fi.json +95 -41
- package/front_end/core/i18n/locales/fil.json +95 -41
- package/front_end/core/i18n/locales/fr-CA.json +96 -42
- package/front_end/core/i18n/locales/fr.json +95 -41
- package/front_end/core/i18n/locales/gl.json +104 -50
- package/front_end/core/i18n/locales/gu.json +95 -41
- package/front_end/core/i18n/locales/he.json +95 -41
- package/front_end/core/i18n/locales/hi.json +98 -44
- package/front_end/core/i18n/locales/hr.json +96 -42
- package/front_end/core/i18n/locales/hu.json +96 -42
- package/front_end/core/i18n/locales/hy.json +95 -41
- package/front_end/core/i18n/locales/id.json +97 -43
- package/front_end/core/i18n/locales/is.json +95 -41
- package/front_end/core/i18n/locales/it.json +96 -42
- package/front_end/core/i18n/locales/ja.json +95 -41
- package/front_end/core/i18n/locales/ka.json +95 -41
- package/front_end/core/i18n/locales/kk.json +98 -44
- package/front_end/core/i18n/locales/km.json +95 -41
- package/front_end/core/i18n/locales/kn.json +96 -42
- package/front_end/core/i18n/locales/ko.json +96 -42
- package/front_end/core/i18n/locales/ky.json +97 -43
- package/front_end/core/i18n/locales/lo.json +96 -42
- package/front_end/core/i18n/locales/lt.json +95 -41
- package/front_end/core/i18n/locales/lv.json +95 -41
- package/front_end/core/i18n/locales/mk.json +98 -44
- package/front_end/core/i18n/locales/ml.json +96 -42
- package/front_end/core/i18n/locales/mn.json +96 -42
- package/front_end/core/i18n/locales/mr.json +95 -41
- package/front_end/core/i18n/locales/ms.json +95 -41
- package/front_end/core/i18n/locales/my.json +95 -41
- package/front_end/core/i18n/locales/ne.json +100 -46
- package/front_end/core/i18n/locales/nl.json +99 -45
- package/front_end/core/i18n/locales/no.json +95 -41
- package/front_end/core/i18n/locales/or.json +98 -44
- package/front_end/core/i18n/locales/pa.json +95 -41
- package/front_end/core/i18n/locales/pl.json +95 -41
- package/front_end/core/i18n/locales/pt-PT.json +95 -41
- package/front_end/core/i18n/locales/pt.json +98 -44
- package/front_end/core/i18n/locales/ro.json +96 -42
- package/front_end/core/i18n/locales/ru.json +115 -61
- package/front_end/core/i18n/locales/si.json +96 -42
- package/front_end/core/i18n/locales/sk.json +95 -41
- package/front_end/core/i18n/locales/sl.json +95 -41
- package/front_end/core/i18n/locales/sq.json +96 -42
- package/front_end/core/i18n/locales/sr-Latn.json +96 -42
- package/front_end/core/i18n/locales/sr.json +96 -42
- package/front_end/core/i18n/locales/sv.json +96 -42
- package/front_end/core/i18n/locales/sw.json +97 -43
- package/front_end/core/i18n/locales/ta.json +96 -42
- package/front_end/core/i18n/locales/te.json +108 -54
- package/front_end/core/i18n/locales/th.json +95 -41
- package/front_end/core/i18n/locales/tr.json +95 -41
- package/front_end/core/i18n/locales/uk.json +95 -41
- package/front_end/core/i18n/locales/ur.json +95 -41
- package/front_end/core/i18n/locales/uz.json +95 -41
- package/front_end/core/i18n/locales/vi.json +104 -50
- package/front_end/core/i18n/locales/zh-HK.json +96 -42
- package/front_end/core/i18n/locales/zh-TW.json +97 -43
- package/front_end/core/i18n/locales/zh.json +99 -45
- package/front_end/core/i18n/locales/zu.json +95 -41
- package/front_end/core/sdk/CSSMatchedStyles.ts +158 -33
- package/front_end/core/sdk/CSSMetadata.ts +1 -8
- package/front_end/generated/InspectorBackendCommands.js +33 -2
- package/front_end/generated/protocol.ts +42 -7
- package/front_end/models/issues_manager/DeprecationIssue.ts +3 -3
- package/front_end/panels/changes/ChangesView.ts +25 -10
- package/front_end/panels/elements/ElementsPanel.ts +7 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +39 -15
- package/front_end/panels/elements/stylesSectionTree.css +1 -0
- package/front_end/panels/elements/stylesSidebarPane.css +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +38 -7
- package/front_end/panels/lighthouse/LighthousePanel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStartView.ts +15 -7
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +77 -21
- package/front_end/panels/lighthouse/RadioSetting.ts +12 -6
- package/front_end/panels/lighthouse/lighthouseStartView.css +49 -2
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -0
- package/front_end/panels/security/SecurityPanel.ts +2 -2
- package/front_end/ui/components/diff_view/diffView.css +2 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +18 -7
- package/front_end/ui/legacy/Toolbar.ts +5 -0
- package/front_end/ui/legacy/softDropDownButton.css +4 -0
- package/package.json +2 -1
- package/scripts/eslint_rules/lib/inline_type_imports.js +158 -0
- package/scripts/eslint_rules/tests/inline_type_imports_test.js +106 -0
- package/scripts/javascript_natives/index.js +1 -2
@@ -0,0 +1,106 @@
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
const rule = require('../lib/inline_type_imports.js');
|
7
|
+
const ruleTester = new (require('eslint').RuleTester)({
|
8
|
+
parserOptions: {ecmaVersion: 9, sourceType: 'module'},
|
9
|
+
parser: require.resolve('@typescript-eslint/parser'),
|
10
|
+
});
|
11
|
+
|
12
|
+
ruleTester.run('inline_type_imports', rule, {
|
13
|
+
valid: [
|
14
|
+
{
|
15
|
+
code: 'import \'./foo.js\'',
|
16
|
+
},
|
17
|
+
{
|
18
|
+
code: 'import type * as Foo from \'./foo.js\'',
|
19
|
+
},
|
20
|
+
{
|
21
|
+
code: 'import * as Foo from \'./foo.js\'',
|
22
|
+
},
|
23
|
+
{
|
24
|
+
code: 'import Foo from \'./foo.js\'',
|
25
|
+
},
|
26
|
+
{
|
27
|
+
code: 'import type Foo from \'./foo.js\'',
|
28
|
+
},
|
29
|
+
{
|
30
|
+
code: 'import {type Foo} from \'./foo.js\'',
|
31
|
+
},
|
32
|
+
{
|
33
|
+
code: 'import {type Foo as Foo2} from \'./foo.js\'',
|
34
|
+
},
|
35
|
+
{
|
36
|
+
code: 'import {SomeValue, type Foo as Foo2} from \'./foo.js\'',
|
37
|
+
},
|
38
|
+
{
|
39
|
+
code: 'import {type Bar, type Foo as Foo2} from \'./foo.js\'',
|
40
|
+
},
|
41
|
+
],
|
42
|
+
invalid: [
|
43
|
+
{
|
44
|
+
code: `import type {AType} from './foo.js';
|
45
|
+
import {AValue} from './foo.js';`,
|
46
|
+
output: `
|
47
|
+
import {AValue, type AType} from './foo.js';`,
|
48
|
+
filename: 'front_end/components/test.ts',
|
49
|
+
errors: [{messageId: 'inlineTypeImport'}],
|
50
|
+
},
|
51
|
+
{
|
52
|
+
code: `import type {AType} from './foo.js';
|
53
|
+
import {AValue} from './foo.js';
|
54
|
+
import type {Foo} from './blah.js'`,
|
55
|
+
output: `
|
56
|
+
import {AValue, type AType} from './foo.js';
|
57
|
+
import {type Foo} from './blah.js'`,
|
58
|
+
filename: 'front_end/components/test.ts',
|
59
|
+
errors: [{messageId: 'inlineTypeImport'}, {messageId: 'convertTypeImport'}],
|
60
|
+
},
|
61
|
+
{
|
62
|
+
code: `import type {AType} from './foo.js';
|
63
|
+
import {AValue} from './foo.js';
|
64
|
+
import {Foo} from './blah.js'`,
|
65
|
+
output: `
|
66
|
+
import {AValue, type AType} from './foo.js';
|
67
|
+
import {Foo} from './blah.js'`,
|
68
|
+
filename: 'front_end/components/test.ts',
|
69
|
+
errors: [{messageId: 'inlineTypeImport'}],
|
70
|
+
},
|
71
|
+
{
|
72
|
+
code: 'import type {AType} from \'./foo.js\';',
|
73
|
+
output: 'import {type AType} from \'./foo.js\';',
|
74
|
+
filename: 'front_end/components/test.ts',
|
75
|
+
errors: [{messageId: 'convertTypeImport'}],
|
76
|
+
},
|
77
|
+
{
|
78
|
+
code: 'import type {Foo as Bar} from \'./foo.js\';',
|
79
|
+
output: 'import {type Foo as Bar} from \'./foo.js\';',
|
80
|
+
filename: 'front_end/components/test.ts',
|
81
|
+
errors: [{messageId: 'convertTypeImport'}],
|
82
|
+
},
|
83
|
+
{
|
84
|
+
code: `import {SomeValue} from './foo.js';
|
85
|
+
import type {Foo as Bar} from './foo.js';`,
|
86
|
+
output: 'import {SomeValue, type Foo as Bar} from \'./foo.js\';\n',
|
87
|
+
filename: 'front_end/components/test.ts',
|
88
|
+
errors: [{messageId: 'inlineTypeImport'}],
|
89
|
+
},
|
90
|
+
{
|
91
|
+
code: `import {SomeValue} from './foo.js';
|
92
|
+
import type {Foo as Bar, Baz} from './foo.js';`,
|
93
|
+
output: 'import {SomeValue, type Foo as Bar, type Baz} from \'./foo.js\';\n',
|
94
|
+
filename: 'front_end/components/test.ts',
|
95
|
+
errors: [{messageId: 'inlineTypeImport'}],
|
96
|
+
},
|
97
|
+
{
|
98
|
+
code: `import type {SomeValue} from './baz.js';
|
99
|
+
import type {Foo as Bar, Baz} from './foo.js';`,
|
100
|
+
output: `import {type SomeValue} from './baz.js';
|
101
|
+
import {type Foo as Bar, type Baz} from './foo.js';`,
|
102
|
+
filename: 'front_end/components/test.ts',
|
103
|
+
errors: [{messageId: 'convertTypeImport'}, {messageId: 'convertTypeImport'}],
|
104
|
+
},
|
105
|
+
]
|
106
|
+
});
|
@@ -4,7 +4,6 @@
|
|
4
4
|
|
5
5
|
import * as fs from 'fs';
|
6
6
|
import glob from 'glob';
|
7
|
-
import * as path from 'path';
|
8
7
|
import ts from 'typescript';
|
9
8
|
import * as WebIDL2 from 'webidl2';
|
10
9
|
|
@@ -45,7 +44,7 @@ for (const file of files) {
|
|
45
44
|
if (file.includes('testing')) {
|
46
45
|
continue;
|
47
46
|
}
|
48
|
-
const data = fs.readFileSync(
|
47
|
+
const data = fs.readFileSync(file, 'utf8');
|
49
48
|
const lines = data.split('\n');
|
50
49
|
const newLines = [];
|
51
50
|
for (const line of lines) {
|