Skip to content

Commit

Permalink
Updated to ESLint config 5.4.0 (sveltejs#5541)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehrencrona authored and taylorzane committed Dec 17, 2020
1 parent ee65757 commit 5e0fb08
Show file tree
Hide file tree
Showing 353 changed files with 353 additions and 353 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/compile/css/gather_possible_values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export function gather_possible_values(node: Node, set: Set<string|{}>) {
else {
set.add(UNKNOWN);
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/css/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export interface CssNode {
start: number;
end: number;
[prop_name: string]: any;
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/nodes/Action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export default class Action extends Node {

this.uses_context = this.expression && this.expression.uses_context;
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/nodes/Animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ export default class Animation extends Node {
? new Expression(component, this, scope, info.expression, true)
: null;
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/nodes/Class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export default class Class extends Node {
? new Expression(component, this, scope, info.expression)
: null;
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/nodes/Comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) : [];
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/nodes/Transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ function describe(transition: Transition) {
return transition.directive === 'transition'
? "a 'transition'"
: `an '${transition.directive}'`;
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/Block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,4 +486,4 @@ export default class Block {
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/invalidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ export function invalidate(renderer: Renderer, scope: Scope, node: Node, names:
}

return invalidate;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,4 @@ function is_indirectly_bound_value(attribute: AttributeWrapper) {
(binding) =>
/checked|group/.test(binding.name)
)));
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/wrappers/Text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ export default class TextWrapper extends Wrapper {
parent_node as Identifier
);
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/wrappers/shared/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ export default class Tag extends Wrapper {

return { init: content };
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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});`;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export default function is_dynamic(variable: Var) {
}

return false;
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/wrappers/shared/is_head.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function is_head(node) {
return node && node.type === 'MemberExpression' && node.object.name === '@_document' && node.property.name === 'head';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ function is_empty_template_literal(template_literal) {
template_literal.quasis.length === 1 &&
template_literal.quasis[0].value.raw === ''
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export function get_slot_scope(lets: Let[]): ObjectPattern {
};
})
};
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/utils/flatten_reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ function to_string(node: Node) {
case 'Identifier':
return node.name;
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/utils/get_name_from_filename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export default function get_name_from_filename(filename: string) {
}

return base[0].toUpperCase() + base.slice(1);
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/utils/get_slot_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ function get_value(block: Block, attribute: Attribute) {
}

return value;
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/utils/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/utils/replace_object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export default function replace_object(node: Node, replacement: Node) {
}
parent.object = replacement;
return ancestor;
}
}
2 changes: 1 addition & 1 deletion src/compiler/compile/utils/reserved_keywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const reserved_keywords = new Set(['$$props', '$$restProps', '$$slots']);

export function is_reserved_keyword(name) {
return reserved_keywords.has(name);
}
}
2 changes: 1 addition & 1 deletion src/compiler/config.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const test = typeof process !== 'undefined' && process.env.TEST;
export const test = typeof process !== 'undefined' && process.env.TEST;
2 changes: 1 addition & 1 deletion src/compiler/parse/acorn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export const parse_expression_at = (source: string, index: number): Node => code
sourceType: 'module',
ecmaVersion: 12,
locations: true
});
});
2 changes: 1 addition & 1 deletion src/compiler/parse/utils/bracket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export function get_bracket_close(open) {
if (open === CURLY_BRACKET_OPEN) {
return CURLY_BRACKET_CLOSE;
}
}
}
2 changes: 1 addition & 1 deletion src/compiler/utils/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/compiler/utils/full_char_code_at.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/compiler/utils/nodes_match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ export function nodes_match(a, b) {
}

return a === b;
}
}
2 changes: 1 addition & 1 deletion src/runtime/internal/spread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 : {};
}
}
2 changes: 1 addition & 1 deletion src/runtime/internal/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ export function add_attribute(name, value, boolean) {

export function add_classes(classes) {
return classes ? ` class="${classes}"` : '';
}
}
2 changes: 1 addition & 1 deletion src/runtime/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
2 changes: 1 addition & 1 deletion test/css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ function read(file) {
} catch (err) {
return null;
}
}
}
2 changes: 1 addition & 1 deletion test/css/samples/empty-class/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export default {
5: color: red;
6: }`
}]
};
};
2 changes: 1 addition & 1 deletion test/css/samples/empty-rule-dev/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
compileOptions: {
dev: true
}
};
};
2 changes: 1 addition & 1 deletion test/css/samples/nested/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
dynamic: 'x'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
dynamic: 'whatever'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export default {
9: color: red;
10: }`
}]
};
};
2 changes: 1 addition & 1 deletion test/css/samples/omit-scoping-attribute-global/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default {
props: {
raw: '<p>raw</p>'
}
};
};
2 changes: 1 addition & 1 deletion test/css/samples/unused-selector-leading/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ export default {
6: }`
}
]
};
};
2 changes: 1 addition & 1 deletion test/css/samples/unused-selector-ternary/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ export default {
17: color: green;
18: }`
}]
};
};
2 changes: 1 addition & 1 deletion test/css/samples/unused-selector/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export default {
9: color: blue;
10: }`
}]
};
};
2 changes: 1 addition & 1 deletion test/custom-elements/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
}
2 changes: 1 addition & 1 deletion test/custom-elements/samples/custom-method/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export default async function (target) {

const p = el.shadowRoot.querySelector('p');
assert.equal(p.textContent, '42');
}
}
2 changes: 1 addition & 1 deletion test/custom-elements/samples/escaped-css/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default function (target) {
const before = getComputedStyle(icon, '::before');

assert.equal(before.content, JSON.stringify(String.fromCharCode(0xff)));
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class CustomButton extends HTMLButtonElement {}
customElements.define('custom-button', CustomButton, { extends: 'button' });
customElements.define('custom-button', CustomButton, { extends: 'button' });
2 changes: 1 addition & 1 deletion test/custom-elements/samples/extended-builtin/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export default function (target) {
const button = el.shadowRoot.querySelector('button');

assert.ok(button instanceof customElements.get('custom-button'));
}
}
2 changes: 1 addition & 1 deletion test/custom-elements/samples/html-slots/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export default function (target) {

assert.equal(slot0.assignedNodes()[1], target.querySelector('strong'));
assert.equal(slot1.assignedNodes().length, 0);
}
}
2 changes: 1 addition & 1 deletion test/custom-elements/samples/html/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export default function (target) {

const h1 = el.shadowRoot.querySelector('h1');
assert.equal(h1.textContent, 'Hello world!');
}
}
2 changes: 1 addition & 1 deletion test/custom-elements/samples/nested.skip/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export default async function (target) {

assert.equal(counter.count, 1);
assert.equal(counter.shadowRoot.innerHTML, '<button>count: 1</button>');
}
}
Loading

0 comments on commit 5e0fb08

Please sign in to comment.