Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

refactor(ui): linting typescript in svelte components #847

Merged
merged 6 commits into from
Sep 2, 2020

Conversation

sarahscott
Copy link
Contributor

@sarahscott sarahscott commented Aug 31, 2020

  • Setup heavily inspired by https://github.com/NicoCevallos/svelte-template 🤍 (note: Nico has been trying to get a PR merged into the official eslint-plugin-svelte3 for quite some time now and momentum has stalled, so we need to use patch-package to allow preprocessing)
  • Use recommended eslint rules for TypeScript; these can be amended as we adjust to using TS in svelte
  • Update svelte-check + necessary tweaks to get rid of warnings & errors (some of this is in zombie org/transaction code; if we fix it now it won't bother us anymore)
  • build.sh typechecks before linting
  • Simple example component in TS: Flex.svelte

Going forward, I will be writing new components in TypeScript and converting existing ones gradually - please feel free to ask for help if you run into a lot of type errors or need a 🦆.

Closes #801

@xla xla changed the title feat(ui): linting typescript in svelte components refactor(ui): linting typescript in svelte components Sep 1, 2020
@sarahscott sarahscott marked this pull request as ready for review September 1, 2020 22:02
Copy link
Member

@rudolfs rudolfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🍞 🦆 🦆 🦆

Copy link
Contributor

@xla xla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎖 ❔ 🚸 🎺

parser: "@typescript-eslint/parser",
parserOptions: {
createDefaultProgram: true,
ecmaVersion: 2019,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The future is now!

@xla xla merged commit b9f8589 into master Sep 2, 2020
@xla xla deleted the sos/lint-ts-in-svelte branch September 2, 2020 08:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint typescript in svelte components
3 participants