-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eslint-plugin-svelte3 to eslint-plugin-svelte migration
- Loading branch information
Showing
8 changed files
with
30 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
root: true | ||
env: | ||
browser: true | ||
es2020: true | ||
node: true | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
sourceType: module | ||
ecmaVersion: latest | ||
plugins: [svelte3, '@typescript-eslint'] | ||
browser: true | ||
extends: | ||
- plugin:svelte/recommended | ||
- eslint:recommended | ||
- plugin:@typescript-eslint/recommended | ||
overrides: | ||
- files: ['*.svelte'] | ||
processor: svelte3/svelte3 | ||
settings: | ||
svelte3/typescript: true | ||
parser: svelte-eslint-parser | ||
parserOptions: | ||
parser: '@typescript-eslint/parser' | ||
rules: | ||
indent: [error, 2, SwitchCase: 1] | ||
'@typescript-eslint/quotes': [error, backtick, avoidEscape: true] | ||
semi: [error, never] | ||
linebreak-style: [error, unix] | ||
no-console: [error, allow: [warn, error]] | ||
no-var: error | ||
# allow triple slash for typescript file referencing https://git.io/JCeqO | ||
spaced-comment: [error, always, { markers: [/] }] | ||
'@typescript-eslint/no-inferrable-types': off | ||
'@typescript-eslint/no-unused-vars': [error, { argsIgnorePattern: ^_ }] | ||
svelte/no-at-html-tags: off | ||
no-inner-declarations: off | ||
ignorePatterns: [build, dist] | ||
globals: | ||
$$Generic: readonly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
<script lang="ts"> | ||
import { createEventDispatcher, SvelteComponent } from 'svelte' | ||
import type { RadioButtons } from '$lib' | ||
import { createEventDispatcher } from 'svelte' | ||
export let component: typeof SvelteComponent | ||
export let component: typeof RadioButtons | ||
export let options: RadioButtons['options'] | ||
export let selected: string | number | null = null | ||
const dispatch = createEventDispatcher() | ||
$: dispatch(`selected-changed`, { selected }) | ||
</script> | ||
|
||
<svelte:component this={component} bind:selected {...$$restProps} /> | ||
<svelte:component this={component} {options} bind:selected {...$$restProps} /> |