Skip to content

Commit ddf1321

Browse files
authored
Updated to ESLint config 5.4.0 (#5541)
1 parent 379a445 commit ddf1321

File tree

353 files changed

+353
-353
lines changed

Some content is hidden

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

353 files changed

+353
-353
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"@rollup/plugin-sucrase": "^3.0.0",
6464
"@rollup/plugin-typescript": "^2.0.1",
6565
"@rollup/plugin-virtual": "^2.0.0",
66-
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.2.0",
66+
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.4.0",
6767
"@types/mocha": "^7.0.0",
6868
"@types/node": "^8.10.53",
6969
"@typescript-eslint/eslint-plugin": "^3.0.2",

src/compiler/compile/css/gather_possible_values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ export function gather_possible_values(node: Node, set: Set<string|{}>) {
1515
else {
1616
set.add(UNKNOWN);
1717
}
18-
}
18+
}

src/compiler/compile/css/interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export interface CssNode {
33
start: number;
44
end: number;
55
[prop_name: string]: any;
6-
}
6+
}

src/compiler/compile/nodes/Action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ export default class Action extends Node {
2323

2424
this.uses_context = this.expression && this.expression.uses_context;
2525
}
26-
}
26+
}

src/compiler/compile/nodes/Animation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ export default class Animation extends Node {
3737
? new Expression(component, this, scope, info.expression, true)
3838
: null;
3939
}
40-
}
40+
}

src/compiler/compile/nodes/Class.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ export default class Class extends Node {
1515
? new Expression(component, this, scope, info.expression)
1616
: null;
1717
}
18-
}
18+
}

src/compiler/compile/nodes/Comment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export default class Comment extends Node {
1414
const match = pattern.exec(this.data);
1515
this.ignores = match ? match[1].split(/[^\S]/).map(x => x.trim()).filter(Boolean) : [];
1616
}
17-
}
17+
}

src/compiler/compile/nodes/Transition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ function describe(transition: Transition) {
4343
return transition.directive === 'transition'
4444
? "a 'transition'"
4545
: `an '${transition.directive}'`;
46-
}
46+
}

src/compiler/compile/render_dom/Block.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,4 +486,4 @@ export default class Block {
486486
}
487487
}
488488
}
489-
}
489+
}

src/compiler/compile/render_dom/invalidate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ export function invalidate(renderer: Renderer, scope: Scope, node: Node, names:
7878
}
7979

8080
return invalidate;
81-
}
81+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,4 +387,4 @@ function is_indirectly_bound_value(attribute: AttributeWrapper) {
387387
(binding) =>
388388
/checked|group/.test(binding.name)
389389
)));
390-
}
390+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ export default class TextWrapper extends Wrapper {
5151
parent_node as Identifier
5252
);
5353
}
54-
}
54+
}

src/compiler/compile/render_dom/wrappers/shared/Tag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ export default class Tag extends Wrapper {
5656

5757
return { init: content };
5858
}
59-
}
59+
}

src/compiler/compile/render_dom/wrappers/shared/bind_this.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ export default function bind_this(component: Component, block: Block, binding: B
9494

9595
block.chunks.destroy.push(b`${callee}(null);`);
9696
return b`${callee}(${variable});`;
97-
}
97+
}

src/compiler/compile/render_dom/wrappers/shared/get_slot_definition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ export function get_slot_definition(block: Block, scope: TemplateScope, lets: Le
112112
get_context: x`${context_input} => ${context}`,
113113
get_changes: x`${changes_input} => ${changes}`
114114
};
115-
}
115+
}

src/compiler/compile/render_dom/wrappers/shared/is_dynamic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export default function is_dynamic(variable: Var) {
99
}
1010

1111
return false;
12-
}
12+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function is_head(node) {
22
return node && node.type === 'MemberExpression' && node.object.name === '@_document' && node.property.name === 'head';
3-
}
3+
}

src/compiler/compile/render_ssr/handlers/InlineComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ function is_empty_template_literal(template_literal) {
106106
template_literal.quasis.length === 1 &&
107107
template_literal.quasis[0].value.raw === ''
108108
);
109-
}
109+
}

src/compiler/compile/render_ssr/handlers/shared/get_slot_scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export function get_slot_scope(lets: Let[]): ObjectPattern {
1818
};
1919
})
2020
};
21-
}
21+
}

src/compiler/compile/utils/flatten_reference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ function to_string(node: Node) {
3636
case 'Identifier':
3737
return node.name;
3838
}
39-
}
39+
}

src/compiler/compile/utils/get_name_from_filename.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ export default function get_name_from_filename(filename: string) {
2424
}
2525

2626
return base[0].toUpperCase() + base.slice(1);
27-
}
27+
}

src/compiler/compile/utils/get_slot_data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ function get_value(block: Block, attribute: Attribute) {
2828
}
2929

3030
return value;
31-
}
31+
}

src/compiler/compile/utils/hash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export default function hash(str: string): string {
66

77
while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
88
return (hash >>> 0).toString(36);
9-
}
9+
}

src/compiler/compile/utils/replace_object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export default function replace_object(node: Node, replacement: Node) {
1111
}
1212
parent.object = replacement;
1313
return ancestor;
14-
}
14+
}

src/compiler/compile/utils/reserved_keywords.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export const reserved_keywords = new Set(['$$props', '$$restProps', '$$slots']);
22

33
export function is_reserved_keyword(name) {
44
return reserved_keywords.has(name);
5-
}
5+
}

src/compiler/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const test = typeof process !== 'undefined' && process.env.TEST;
1+
export const test = typeof process !== 'undefined' && process.env.TEST;

src/compiler/parse/acorn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export const parse_expression_at = (source: string, index: number): Node => code
1111
sourceType: 'module',
1212
ecmaVersion: 12,
1313
locations: true
14-
});
14+
});

src/compiler/parse/utils/bracket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export function get_bracket_close(open) {
2525
if (open === CURLY_BRACKET_OPEN) {
2626
return CURLY_BRACKET_CLOSE;
2727
}
28-
}
28+
}

src/compiler/utils/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ export default function error(message: string, props: {
3737
error.frame = get_code_frame(props.source, start.line - 1, start.column);
3838

3939
throw error;
40-
}
40+
}

src/compiler/utils/full_char_code_at.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export default function full_char_code_at(str: string, i: number): number {
77

88
const next = str.charCodeAt(i + 1);
99
return (code << 10) + next - 0x35fdc00;
10-
}
10+
}

src/compiler/utils/nodes_match.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ export function nodes_match(a, b) {
2929
}
3030

3131
return a === b;
32-
}
32+
}

src/runtime/internal/spread.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ export function get_spread_update(levels, updates) {
3838

3939
export function get_spread_object(spread_props) {
4040
return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};
41-
}
41+
}

src/runtime/internal/ssr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ export function add_attribute(name, value, boolean) {
134134

135135
export function add_classes(classes) {
136136
return classes ? ` class="${classes}"` : '';
137-
}
137+
}

src/runtime/store/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,4 @@ export function derived<T>(stores: Stores, fn: Function, initial_value?: T): Rea
201201
* Get the current value from a store by subscribing and immediately unsubscribing.
202202
* @param store readable
203203
*/
204-
export { get_store_value as get };
204+
export { get_store_value as get };

test/css/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ function read(file) {
156156
} catch (err) {
157157
return null;
158158
}
159-
}
159+
}

test/css/samples/empty-class/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export default {
2222
5: color: red;
2323
6: }`
2424
}]
25-
};
25+
};

test/css/samples/empty-rule-dev/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
compileOptions: {
33
dev: true
44
}
5-
};
5+
};

test/css/samples/nested/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
dynamic: 'x'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
dynamic: 'whatever'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-descendant-global-inner-class/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
raw: '<p>raw</p>'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
raw: '<p>raw</p>'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-descendant-global-inner/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
raw: '<p>raw</p>'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
raw: '<p>raw</p>'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-descendant-global-outer/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
raw: '<p>raw</p>'
44
}
5-
};
5+
};

test/css/samples/omit-scoping-attribute-descendant/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export default {
2121
9: color: red;
2222
10: }`
2323
}]
24-
};
24+
};

test/css/samples/omit-scoping-attribute-global/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export default {
22
props: {
33
raw: '<p>raw</p>'
44
}
5-
};
5+
};

test/css/samples/unused-selector-leading/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ export default {
4848
6: }`
4949
}
5050
]
51-
};
51+
};

test/css/samples/unused-selector-ternary/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ export default {
2626
17: color: green;
2727
18: }`
2828
}]
29-
};
29+
};

test/css/samples/unused-selector/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export default {
2222
9: color: blue;
2323
10: }`
2424
}]
25-
};
25+
};

test/custom-elements/assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ export function equal(a, b, message) {
3030

3131
export function ok(condition, message) {
3232
if (!condition) throw new Error(message || `Expected ${condition} to be truthy`);
33-
}
33+
}

test/custom-elements/samples/custom-method/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export default async function (target) {
99

1010
const p = el.shadowRoot.querySelector('p');
1111
assert.equal(p.textContent, '42');
12-
}
12+
}

test/custom-elements/samples/escaped-css/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export default function (target) {
1010
const before = getComputedStyle(icon, '::before');
1111

1212
assert.equal(before.content, JSON.stringify(String.fromCharCode(0xff)));
13-
}
13+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
class CustomButton extends HTMLButtonElement {}
2-
customElements.define('custom-button', CustomButton, { extends: 'button' });
2+
customElements.define('custom-button', CustomButton, { extends: 'button' });

test/custom-elements/samples/extended-builtin/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export default function (target) {
1212
const button = el.shadowRoot.querySelector('button');
1313

1414
assert.ok(button instanceof customElements.get('custom-button'));
15-
}
15+
}

test/custom-elements/samples/html-slots/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export default function (target) {
1414

1515
assert.equal(slot0.assignedNodes()[1], target.querySelector('strong'));
1616
assert.equal(slot1.assignedNodes().length, 0);
17-
}
17+
}

test/custom-elements/samples/html/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export default function (target) {
99

1010
const h1 = el.shadowRoot.querySelector('h1');
1111
assert.equal(h1.textContent, 'Hello world!');
12-
}
12+
}

test/custom-elements/samples/nested.skip/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export default async function (target) {
1414

1515
assert.equal(counter.count, 1);
1616
assert.equal(counter.shadowRoot.innerHTML, '<button>count: 1</button>');
17-
}
17+
}

0 commit comments

Comments
 (0)