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

update ESLint to v9 and other smaller dependencies #1635

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Conversation

matyasf
Copy link
Collaborator

@matyasf matyasf commented Aug 13, 2024

Closes: INSTUI-4099, INSTUI-4062, INSTUI-4183
to test: check docs app, check output of npm run lint for erroneous lint warnings.

The good:

  • ui-eslint-config package is gone :)
  • Lots of small changes that were detected by the correctly configured linter, like packages/template- packages had some leftover files that could be deleted
  • no weird ESLint errors when nothing was wrong
  • no need for 100+ .eslintignore files
  • it detected some duplicate tests, these were removed
  • added a plugin for specifically linting vitest tests

The bad:

  • eslint-plugin-jsx-a11y is not yet converted to ESLint v9, add it back when its ready Add support for ESLint 9 jsx-eslint/eslint-plugin-jsx-a11y#978
  • eslint-import-resolver-typescript and eslint-plugin-import-x are not converted either, but these are less useful plugins
  • Our own ESLint plugin is not converted yet to ESLint v9, now its turned off, should be converted in the near future (and wont need its own package).
  • Docs app linting is not 100% yet because it has some messy interwoven browser+node code.

Other smaller changes:

  • Fixed a warning in Table about the isStacked and hover prop that was always showing in the console
  • Fixed a test that broke with the moment upgrade, turns out the test was bad and moment got better

@matyasf matyasf changed the title refactor: update dependencies, remove warning from Table header (WIP) update dependencies, remove warning from Table header Aug 13, 2024
Copy link

github-actions bot commented Aug 13, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-08-22 13:58 UTC

@matyasf matyasf force-pushed the update_deps branch 2 times, most recently from 78fb56d to 9355a95 Compare August 16, 2024 10:57
@matyasf matyasf changed the title (WIP) update dependencies, remove warning from Table header update ESLint to v9 and other smaller dependencies Aug 16, 2024
@@ -0,0 +1,216 @@
/*
Copy link
Collaborator Author

@matyasf matyasf Aug 16, 2024

Choose a reason for hiding this comment

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

This file was the bulk of the work, please read this file

@matyasf matyasf requested review from joyenjoyer and HerrTopi August 16, 2024 11:14
@matyasf matyasf self-assigned this Aug 16, 2024
@@ -483,7 +483,7 @@ class SourceCodeEditor extends Component<SourceCodeEditorProps> {
const { styles } = this.props

if (!styles?.theme || !styles.highlightStyle) {
return
return undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ESLint expects that a getter always returns a value. IMO this is a good rule, and its OK if we make such edge cases more explicit

Copy link
Contributor

@HerrTopi HerrTopi left a comment

Choose a reason for hiding this comment

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

Just a thought: shouldn't we turn "Unexpected any. Specify a different type" warnings off? Those are polluting the log and serve no real info.

Otherwise: great work!

@matyasf matyasf requested a review from joyenjoyer August 22, 2024 12:25
@matyasf
Copy link
Collaborator Author

matyasf commented Aug 22, 2024

Just a thought: shouldn't we turn "Unexpected any. Specify a different type" warnings off? Those are polluting the log and serve no real info.

Yep, it gets a bit spammy because we have a lot of these. But I think they are useful, we should try to get rid of anys

Copy link
Contributor

@joyenjoyer joyenjoyer left a comment

Choose a reason for hiding this comment

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

nice work

…x warnings in Table

ESLint now uses a flat config. our ESLint plugin is not in use yet, it will be added in a  future
commit
@matyasf matyasf merged commit 6be4f00 into master Aug 22, 2024
10 of 11 checks passed
@matyasf matyasf deleted the update_deps branch August 22, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants