Skip to content

Commit dbbac28

Browse files
authored
[chore] upgrade eslint packages (#6769)
1 parent 66b2385 commit dbbac28

File tree

11 files changed

+1628
-1308
lines changed

11 files changed

+1628
-1308
lines changed

package-lock.json

+1,604-1,284
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,17 @@
114114
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.7.0",
115115
"@types/mocha": "^7.0.0",
116116
"@types/node": "^8.10.53",
117-
"@typescript-eslint/eslint-plugin": "^4.9.0",
118-
"@typescript-eslint/parser": "^4.9.0",
117+
"@typescript-eslint/eslint-plugin": "^4.31.2",
118+
"@typescript-eslint/parser": "^4.31.2",
119119
"acorn": "^8.4.1",
120120
"agadoo": "^1.1.0",
121121
"c8": "^5.0.1",
122122
"code-red": "^0.2.2",
123123
"codecov": "^3.5.0",
124124
"css-tree": "^1.1.2",
125-
"eslint": "^7.15.0",
126-
"eslint-plugin-import": "^2.22.1",
127-
"eslint-plugin-svelte3": "^2.7.3",
125+
"eslint": "^7.32.0",
126+
"eslint-plugin-import": "^2.24.2",
127+
"eslint-plugin-svelte3": "^3.2.1",
128128
"estree-walker": "^3.0.0",
129129
"is-reference": "^3.0.0",
130130
"jsdom": "^15.2.1",

src/compiler/compile/css/Stylesheet.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class Declaration {
155155

156156
class Atrule {
157157
node: CssNode;
158-
children: Array<Atrule|Rule>;
158+
children: Array<Atrule | Rule>;
159159
declarations: Declaration[];
160160

161161
constructor(node: CssNode) {
@@ -290,7 +290,7 @@ export default class Stylesheet {
290290
has_styles: boolean;
291291
id: string;
292292

293-
children: Array<Rule|Atrule> = [];
293+
children: Array<Rule | Atrule> = [];
294294
keyframes: Map<string, string> = new Map();
295295

296296
nodes_with_css_class: Set<CssNode> = new Set();
@@ -415,7 +415,7 @@ export default class Stylesheet {
415415

416416
if (should_transform_selectors) {
417417
const max = Math.max(...this.children.map(rule => rule.get_max_amount_class_specificity_increased()));
418-
this.children.forEach((child: (Atrule|Rule)) => {
418+
this.children.forEach((child: (Atrule | Rule)) => {
419419
child.transform(code, this.id, this.keyframes, max);
420420
});
421421
}

src/compiler/compile/css/gather_possible_values.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Node } from 'estree';
22

33
export const UNKNOWN = {};
44

5-
export function gather_possible_values(node: Node, set: Set<string|{}>) {
5+
export function gather_possible_values(node: Node, set: Set<string | {}>) {
66
if (node.type === 'Literal') {
77
set.add(node.value);
88
} else if (node.type === 'ConditionalExpression') {

src/compiler/compile/nodes/Let.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class Let extends Node {
2525
this.value = info.expression;
2626

2727
walk(info.expression, {
28-
enter(node: Identifier|BasePattern) {
28+
enter(node: Identifier | BasePattern) {
2929
if (!applicable.has(node.type)) {
3030
return component.error(node as any, compiler_errors.invalid_let);
3131
}

src/compiler/compile/render_dom/wrappers/EachBlock.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export default class EachBlockWrapper extends Wrapper {
5757
get_each_context: Identifier;
5858
iterations: Identifier;
5959
fixed_length: number;
60-
data_length: Node|number;
61-
view_length: Node|number;
60+
data_length: Node | number;
61+
view_length: Node | number;
6262
}
6363

6464
context_props: Array<Node | Node[]>;

src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Text from '../../../nodes/Text';
1010

1111
export interface StyleProp {
1212
key: string;
13-
value: Array<Text|Expression>;
13+
value: Array<Text | Expression>;
1414
important: boolean;
1515
}
1616

@@ -69,7 +69,7 @@ export default class StyleAttributeWrapper extends AttributeWrapper {
6969
}
7070
}
7171

72-
function optimize_style(value: Array<Text|Expression>) {
72+
function optimize_style(value: Array<Text | Expression>) {
7373
const props: StyleProp[] = [];
7474
let chunks = value.slice();
7575

@@ -107,7 +107,7 @@ function optimize_style(value: Array<Text|Expression>) {
107107
}
108108

109109
function get_style_value(chunks: Array<Text | Expression>) {
110-
const value: Array<Text|Expression> = [];
110+
const value: Array<Text | Expression> = [];
111111

112112
let in_url = false;
113113
let quote_mark = null;
@@ -185,6 +185,6 @@ function get_style_value(chunks: Array<Text | Expression>) {
185185
};
186186
}
187187

188-
function is_dynamic(value: Array<Text|Expression>) {
188+
function is_dynamic(value: Array<Text | Expression>) {
189189
return value.length > 1 || value[0].type !== 'Text';
190190
}

src/runtime/internal/Component.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { transition_in } from './transitions';
88
* INTERNAL, DO NOT USE. Code may change at any time.
99
*/
1010
export interface Fragment {
11-
key: string|null;
11+
key: string | null;
1212
first: null;
1313
/* create */ c: () => void;
1414
/* claim */ l: (nodes: any) => void;
@@ -20,25 +20,25 @@ export interface Fragment {
2020
/* animate */ a: () => void;
2121
/* intro */ i: (local: any) => void;
2222
/* outro */ o: (local: any) => void;
23-
/* destroy */ d: (detaching: 0|1) => void;
23+
/* destroy */ d: (detaching: 0 | 1) => void;
2424
}
2525
interface T$$ {
2626
dirty: number[];
27-
ctx: null|any;
27+
ctx: null | any;
2828
bound: any;
2929
update: () => void;
3030
callbacks: any;
3131
after_update: any[];
3232
props: Record<string, 0 | string>;
33-
fragment: null|false|Fragment;
33+
fragment: null | false | Fragment;
3434
not_equal: any;
3535
before_update: any[];
3636
context: Map<any, any>;
3737
on_mount: any[];
3838
on_destroy: any[];
3939
skip_bound: boolean;
4040
on_disconnect: any[];
41-
root:Element|ShadowRoot
41+
root:Element | ShadowRoot
4242
}
4343

4444
export function bind(component, name, callback) {

src/runtime/internal/animations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AnimationConfig } from '../animate';
66

77

88
//todo: documentation says it is DOMRect, but in IE it would be ClientRect
9-
type PositionRect = DOMRect|ClientRect;
9+
type PositionRect = DOMRect | ClientRect;
1010

1111
type AnimationFn = (node: Element, { from, to }: { from: PositionRect; to: PositionRect }, params: any) => AnimationConfig;
1212

src/runtime/internal/dev.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export interface SvelteComponentDev {
115115
[accessor: string]: any;
116116
}
117117
interface IComponentOptions<Props extends Record<string, any> = Record<string, any>> {
118-
target: Element|ShadowRoot;
118+
target: Element | ShadowRoot;
119119
anchor?: Element;
120120
props?: Props;
121121
context?: Map<any, any>;

src/runtime/internal/transitions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { add_render_callback } from './scheduler';
77
import { TransitionConfig } from '../transition';
88
import { Fragment } from './Component';
99

10-
let promise: Promise<void>|null;
10+
let promise: Promise<void> | null;
1111
type INTRO = 1;
1212
type OUTRO = 0;
1313
interface Outro {

0 commit comments

Comments
 (0)