Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Ensure that eslint runs on all frontend code (no-changelog) #4602

Merged
merged 10 commits into from
Nov 15, 2022

Conversation

netroy
Copy link
Member

@netroy netroy commented Nov 14, 2022

also,

  • remove tslint from design-system
  • setup prettier for design-system

@netroy netroy requested review from alexgrozav and ivov November 14, 2022 22:19
@linear
Copy link

linear bot commented Nov 14, 2022

N8N-3405

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Nov 14, 2022
@netroy netroy force-pushed the N8N-3405-frontend-linting branch from 5a95ebf to d93922f Compare November 14, 2022 22:31
Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

  1. Let's remove /design-system/tslint.json?

  2. design-system/.editorconfig still needed?

  3. Should we lint the contents of .storybook?

  4. prettier **/**.{ts,vue} --write Let's format all others as well? css, scss, js, md, mdx

  5. Button.stories.ts still contains a TSLint exception.

  6. These only trigger one issue each. Let's fix and remove from the list?

  • @typescript-eslint/ban-ts-comment
  • @typescript-eslint/restrict-template-expressions
  • @typescript-eslint/no-unused-vars
  1. @typescript-eslint/member-delimiter-style triggers no issues. Let's remove from the list.

  2. @typescript-eslint/naming-convention triggers 220 issues. design-system might need its own options for this rule.

  3. import/no-extraneous-dependencies triggers 80+ issues but seemingly easy to fix by moving a handful of deps to their right categories. Please disregard if time-consuming.

  4. For any remaining rules that are off, let's set to warn?

@netroy
Copy link
Member Author

netroy commented Nov 15, 2022

  1. Let's remove /design-system/tslint.json?

2. `design-system/.editorconfig` still needed?

3. Should we lint the contents of `.storybook`?

4. `prettier **/**.{ts,vue} --write` Let's format all others as well? css, scss, js, md, mdx

✅ , but skipped .md files

5. `Button.stories.ts` still contains a TSLint exception.

6. These only trigger one issue each. Let's fix and remove from the list?
* `@typescript-eslint/ban-ts-comment`
* `@typescript-eslint/restrict-template-expressions`
* `@typescript-eslint/no-unused-vars`

7. `@typescript-eslint/member-delimiter-style` triggers no issues. Let's remove from the list.

8. `@typescript-eslint/naming-convention` triggers 220 issues. design-system might need its own options for this rule.

9. `import/no-extraneous-dependencies` triggers 80+ issues but seemingly easy to fix by moving a handful of deps to their right categories. Please disregard if time-consuming.

10. For any remaining rules that are `off`, let's set to `warn`?

✅ , but left it still off for two rules that I plan to remove in another PR.

@alexgrozav
Copy link
Member

alexgrozav commented Nov 15, 2022

Took a look as well and looks good to me, but @ivov seems to have gone through a more in-depth review on it. Will let you guys continue on this.

Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

Running vitest run --coverage and then formatting slows Prettier down to a crawl. We should add coverage to .prettierignore.

ivov
ivov previously approved these changes Nov 15, 2022
@netroy
Copy link
Member Author

netroy commented Nov 15, 2022

Running vitest run --coverage and then formatting slows Prettier down to a crawl. We should add coverage to .prettierignore.

Done.

Unfortunately .prettierignore still doesn't merge rules like .gitignore, .npmignore, and .dockerignore do 😞 .

@netroy netroy requested a review from ivov November 15, 2022 16:24
@netroy
Copy link
Member Author

netroy commented Nov 15, 2022

a newly added file on master was failing on linting. fixed it.
@ivov can you please approve again?

@netroy netroy merged commit 13659d0 into master Nov 15, 2022
@netroy netroy deleted the N8N-3405-frontend-linting branch November 15, 2022 17:20
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Nov 15, 2022
@janober
Copy link
Member

janober commented Nov 17, 2022

Got released with [email protected]

@janober janober removed the Upcoming Release Will be part of the upcoming release label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants