Updated to ESLint config 5.4.0 (#5541)

pull/5559/head
Andreas Ehrencrona 4 years ago committed by GitHub
parent 379a4454c1
commit ddf13211af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,7 @@
"@rollup/plugin-sucrase": "^3.0.0",
"@rollup/plugin-typescript": "^2.0.1",
"@rollup/plugin-virtual": "^2.0.0",
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.2.0",
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.4.0",
"@types/mocha": "^7.0.0",
"@types/node": "^8.10.53",
"@typescript-eslint/eslint-plugin": "^3.0.2",

@ -15,4 +15,4 @@ export function gather_possible_values(node: Node, set: Set<string|{}>) {
else {
set.add(UNKNOWN);
}
}
}

@ -3,4 +3,4 @@ export interface CssNode {
start: number;
end: number;
[prop_name: string]: any;
}
}

@ -23,4 +23,4 @@ export default class Action extends Node {
this.uses_context = this.expression && this.expression.uses_context;
}
}
}

@ -37,4 +37,4 @@ export default class Animation extends Node {
? new Expression(component, this, scope, info.expression, true)
: null;
}
}
}

@ -15,4 +15,4 @@ export default class Class extends Node {
? new Expression(component, this, scope, info.expression)
: null;
}
}
}

@ -14,4 +14,4 @@ export default class Comment extends Node {
const match = pattern.exec(this.data);
this.ignores = match ? match[1].split(/[^\S]/).map(x => x.trim()).filter(Boolean) : [];
}
}
}

@ -43,4 +43,4 @@ function describe(transition: Transition) {
return transition.directive === 'transition'
? "a 'transition'"
: `an '${transition.directive}'`;
}
}

@ -486,4 +486,4 @@ export default class Block {
}
}
}
}
}

@ -78,4 +78,4 @@ export function invalidate(renderer: Renderer, scope: Scope, node: Node, names:
}
return invalidate;
}
}

@ -387,4 +387,4 @@ function is_indirectly_bound_value(attribute: AttributeWrapper) {
(binding) =>
/checked|group/.test(binding.name)
)));
}
}

@ -51,4 +51,4 @@ export default class TextWrapper extends Wrapper {
parent_node as Identifier
);
}
}
}

@ -56,4 +56,4 @@ export default class Tag extends Wrapper {
return { init: content };
}
}
}

@ -94,4 +94,4 @@ export default function bind_this(component: Component, block: Block, binding: B
block.chunks.destroy.push(b`${callee}(null);`);
return b`${callee}(${variable});`;
}
}

@ -112,4 +112,4 @@ export function get_slot_definition(block: Block, scope: TemplateScope, lets: Le
get_context: x`${context_input} => ${context}`,
get_changes: x`${changes_input} => ${changes}`
};
}
}

@ -9,4 +9,4 @@ export default function is_dynamic(variable: Var) {
}
return false;
}
}

@ -1,3 +1,3 @@
export function is_head(node) {
return node && node.type === 'MemberExpression' && node.object.name === '@_document' && node.property.name === 'head';
}
}

@ -106,4 +106,4 @@ function is_empty_template_literal(template_literal) {
template_literal.quasis.length === 1 &&
template_literal.quasis[0].value.raw === ''
);
}
}

@ -18,4 +18,4 @@ export function get_slot_scope(lets: Let[]): ObjectPattern {
};
})
};
}
}

@ -36,4 +36,4 @@ function to_string(node: Node) {
case 'Identifier':
return node.name;
}
}
}

@ -24,4 +24,4 @@ export default function get_name_from_filename(filename: string) {
}
return base[0].toUpperCase() + base.slice(1);
}
}

@ -28,4 +28,4 @@ function get_value(block: Block, attribute: Attribute) {
}
return value;
}
}

@ -6,4 +6,4 @@ export default function hash(str: string): string {
while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
return (hash >>> 0).toString(36);
}
}

@ -11,4 +11,4 @@ export default function replace_object(node: Node, replacement: Node) {
}
parent.object = replacement;
return ancestor;
}
}

@ -2,4 +2,4 @@ export const reserved_keywords = new Set(['$$props', '$$restProps', '$$slots']);
export function is_reserved_keyword(name) {
return reserved_keywords.has(name);
}
}

@ -1 +1 @@
export const test = typeof process !== 'undefined' && process.env.TEST;
export const test = typeof process !== 'undefined' && process.env.TEST;

@ -11,4 +11,4 @@ export const parse_expression_at = (source: string, index: number): Node => code
sourceType: 'module',
ecmaVersion: 12,
locations: true
});
});

@ -25,4 +25,4 @@ export function get_bracket_close(open) {
if (open === CURLY_BRACKET_OPEN) {
return CURLY_BRACKET_CLOSE;
}
}
}

@ -37,4 +37,4 @@ export default function error(message: string, props: {
error.frame = get_code_frame(props.source, start.line - 1, start.column);
throw error;
}
}

@ -7,4 +7,4 @@ export default function full_char_code_at(str: string, i: number): number {
const next = str.charCodeAt(i + 1);
return (code << 10) + next - 0x35fdc00;
}
}

@ -29,4 +29,4 @@ export function nodes_match(a, b) {
}
return a === b;
}
}

@ -38,4 +38,4 @@ export function get_spread_update(levels, updates) {
export function get_spread_object(spread_props) {
return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};
}
}

@ -134,4 +134,4 @@ export function add_attribute(name, value, boolean) {
export function add_classes(classes) {
return classes ? ` class="${classes}"` : '';
}
}

@ -201,4 +201,4 @@ export function derived<T>(stores: Stores, fn: Function, initial_value?: T): Rea
* Get the current value from a store by subscribing and immediately unsubscribing.
* @param store readable
*/
export { get_store_value as get };
export { get_store_value as get };

@ -156,4 +156,4 @@ function read(file) {
} catch (err) {
return null;
}
}
}

@ -22,4 +22,4 @@ export default {
5: color: red;
6: }`
}]
};
};

@ -2,4 +2,4 @@ export default {
compileOptions: {
dev: true
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
dynamic: 'x'
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
dynamic: 'whatever'
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};

@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};

@ -21,4 +21,4 @@ export default {
9: color: red;
10: }`
}]
};
};

@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};

@ -48,4 +48,4 @@ export default {
6: }`
}
]
};
};

@ -26,4 +26,4 @@ export default {
17: color: green;
18: }`
}]
};
};

@ -22,4 +22,4 @@ export default {
9: color: blue;
10: }`
}]
};
};

@ -30,4 +30,4 @@ export function equal(a, b, message) {
export function ok(condition, message) {
if (!condition) throw new Error(message || `Expected ${condition} to be truthy`);
}
}

@ -9,4 +9,4 @@ export default async function (target) {
const p = el.shadowRoot.querySelector('p');
assert.equal(p.textContent, '42');
}
}

@ -10,4 +10,4 @@ export default function (target) {
const before = getComputedStyle(icon, '::before');
assert.equal(before.content, JSON.stringify(String.fromCharCode(0xff)));
}
}

@ -1,2 +1,2 @@
class CustomButton extends HTMLButtonElement {}
customElements.define('custom-button', CustomButton, { extends: 'button' });
customElements.define('custom-button', CustomButton, { extends: 'button' });

@ -12,4 +12,4 @@ export default function (target) {
const button = el.shadowRoot.querySelector('button');
assert.ok(button instanceof customElements.get('custom-button'));
}
}

@ -14,4 +14,4 @@ export default function (target) {
assert.equal(slot0.assignedNodes()[1], target.querySelector('strong'));
assert.equal(slot1.assignedNodes().length, 0);
}
}

@ -9,4 +9,4 @@ export default function (target) {
const h1 = el.shadowRoot.querySelector('h1');
assert.equal(h1.textContent, 'Hello world!');
}
}

@ -14,4 +14,4 @@ export default async function (target) {
assert.equal(counter.count, 1);
assert.equal(counter.shadowRoot.innerHTML, '<button>count: 1</button>');
}
}

@ -16,4 +16,4 @@ export default function (target) {
assert.equal(getComputedStyle(unstyled).color, 'rgb(0, 0, 0)');
assert.equal(getComputedStyle(styled).color, 'rgb(255, 0, 0)');
}
}

@ -15,4 +15,4 @@ export default function (target) {
const h1 = el.shadowRoot.querySelector('h1');
assert.equal(h1.textContent, 'Hello world!');
}
}

@ -16,4 +16,4 @@ export default function (target) {
]);
console.warn = warn;
}
}

@ -5,4 +5,4 @@ export default function (target) {
target.innerHTML = '<my-app/>';
const el = target.querySelector('my-app');
assert.ok(el.wasCreated);
}
}

@ -20,4 +20,4 @@ export default function (target) {
assert.equal(p1.textContent, '5 items');
assert.equal(p2.textContent, 'd, e, f, g, h');
}
}

@ -259,4 +259,4 @@ export function mkdirp(dir) {
} catch (err) {
// do nothing
}
}
}

@ -14,4 +14,4 @@ export default {
assert.equal(h1, snapshot.h1);
assert.equal(h1.childNodes[0], snapshot.text);
}
};
};

@ -26,4 +26,4 @@ export default {
<p>Hello everybody!</p>
`);
}
};
};

@ -18,4 +18,4 @@ export default {
assert.equal(p, snapshot.p);
assert.equal(p.childNodes[0], snapshot.text);
}
};
};

@ -14,4 +14,4 @@ export default {
assert.equal(p, snapshot.p);
assert.equal(p.childNodes[0], snapshot.text);
}
};
};

@ -18,4 +18,4 @@ export default {
assert.equal(h1, snapshot.h1);
assert.equal(h1.childNodes[0], snapshot.text);
}
};
};

@ -18,4 +18,4 @@ export default {
assert.equal(h1, snapshot.h1);
assert.equal(h1.childNodes[0], snapshot.text);
}
};
};

@ -26,4 +26,4 @@ export default {
assert.equal(lis[1], snapshot.lis[1]);
assert.equal(lis[2], snapshot.lis[2]);
}
};
};

@ -16,4 +16,4 @@ export default {
assert.equal(div, snapshot.div);
}
};
};

@ -16,4 +16,4 @@ export default {
assert.equal(div, snapshot.div);
}
};
};

@ -16,4 +16,4 @@ export default {
assert.equal(div, snapshot.div);
}
};
};

@ -12,4 +12,4 @@ export default {
assert.equal(div, snapshot.div);
}
};
};

@ -14,4 +14,4 @@ export default {
assert.equal(div, snapshot.div);
assert.equal(div.querySelector('p'), snapshot.p);
}
};
};

@ -13,4 +13,4 @@ export default {
assert.equal(h1, snapshot.h1);
assert.equal(component.h1, h1);
}
};
};

@ -23,4 +23,4 @@ export default {
<p>clicked!</p>
`);
}
};
};

@ -23,4 +23,4 @@ export default {
assert.equal(ps[0], snapshot.p0);
assert.equal(ps[1], snapshot.p1);
}
};
};

@ -16,4 +16,4 @@ export default {
assert.equal(p, snapshot.p);
}
};
};

@ -21,4 +21,4 @@ export default {
component.bar = true;
assert.htmlEqual(target.innerHTML, '<p>bar!</p>');
}
};
};

@ -16,4 +16,4 @@ export default {
assert.equal(p, snapshot.p);
}
};
};

@ -24,4 +24,4 @@ export default {
assert.equal(ps[1], snapshot.p1);
assert.equal(ps[1].firstChild, snapshot.text1);
}
};
};

@ -10,4 +10,4 @@ export default {
assert.equal(text, snapshot.text);
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
dev: false
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
immutable: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
immutable: true
}
};
};

@ -1,3 +1,3 @@
import { writable } from '../../../../store';
export const count = writable(0);
export const count = writable(0);

@ -2,4 +2,4 @@ export default {
options: {
customElement: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
dev: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
dev: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
dev: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
dev: true
}
};
};

@ -3,4 +3,4 @@ export default {
generate: 'ssr',
dev: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
dev: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
hydratable: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
legacy: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
hydratable: true
}
};
};

@ -2,4 +2,4 @@ export default {
options: {
generate: 'ssr'
}
};
};

@ -12,4 +12,4 @@ export default {
},
dependencies: ['./foo.css']
};
};

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save