Skip to content

Update to Eslint 9#13

Draft
ChristianPraiss wants to merge 8 commits intomainfrom
feat/eslint-9
Draft

Update to Eslint 9#13
ChristianPraiss wants to merge 8 commits intomainfrom
feat/eslint-9

Conversation

@ChristianPraiss
Copy link
Copy Markdown
Contributor

@ChristianPraiss ChristianPraiss commented Jun 27, 2025

This is a draft and could probably be improved by stripping out more stuff.
A preliminary review could not hurt, even though it is still in draft.
All version will get a major increase so people will be aware of breaking changes with ESLint 9

TODOS:

  • Test with 2 existing projects (remex, aio)

@deathmaz
Copy link
Copy Markdown
Collaborator

didn't check everything just briefly skimmed through, but already few questions:

  • in a5243f4 a publish was made, but i don't see the updated versions here, what is the meaning of this commit? Was the publish reverted?
  • why the versions in the mentioned commit are already "final" and not alpha or beta if the work on this PR still not finished?
  • there's no need to publish to npmjs if you need to test something locally, you can use yarn pack to create needed artifacts and then install those via yarn install
  • if you want to test not only locally please release alpha or beta version and not final

@ChristianPraiss
Copy link
Copy Markdown
Contributor Author

ChristianPraiss commented Jun 27, 2025

Hey, I did not actually publish anything yet, just let it run through once to check if all works with the newest version, thus the versions also have not alpha beta or anything applied to them. Would revert/rerun the publish again once it is ready

@ChristianPraiss
Copy link
Copy Markdown
Contributor Author

Hey @deathmaz @kalievsky, will you guys have some time to check this soon?

@deathmaz
Copy link
Copy Markdown
Collaborator

Hi @ChristianPraiss cannot promise when exactly but will check at some point, want to also test it in one of my projects. Have you tried it on real projects on your side?

Copy link
Copy Markdown
Collaborator

@deathmaz deathmaz left a comment

Choose a reason for hiding this comment

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

  • Stylelint also was bumped few major version but i cannot verify if it still works fine as I'm not using it any more
  • some of the packages can be updated again since this PR was created
  • not yet tested in real project

- Added `globals` package to ESLint config for better global variable management.
- Updated dependencies in `eslint-config-convidera`, `eslint-config-ts-convidera`, and `eslint-config-vue3-convidera` to the latest versions.
- Adjusted ESLint rules and configurations for improved code quality and consistency.
- Removed deprecated or unnecessary configurations in ESLint setup.

This update enhances the linting process and ensures compatibility with the latest ESLint features.
…pport

- Added support for `.mts` and `.mjs` file extensions in ESLint configurations for both utils and vue-form-validator packages.
- Simplified the linting command in package.json files to use default extensions.

This update improves linting capabilities for modern JavaScript and TypeScript file formats.
- Added support for `defineOptions`, `defineSlots`, and `defineModel` as readonly properties in the ESLint configuration for Vue 3.

This update enhances linting capabilities for Vue 3 features, ensuring better code quality and consistency.
@ChristianPraiss
Copy link
Copy Markdown
Contributor Author

Soo, I updated it and gave it a round of testing. It's a slight bit stricter overall (tested on https://github.com/convidera/partnerlink), reporting some no-unused-vars and no-explicit-any warnings, but i guess those are very valid rules anyway. @jhoefker @deathmaz.

@deathmaz
Copy link
Copy Markdown
Collaborator

deathmaz commented Sep 2, 2025

@ChristianPraiss i tried it on my project and in some places eslint reported errors where it shouldn't:

Details image

in all defineEmits declared as:

const emit = defineEmits<{(e: 'close'): void,
  (e: 'success', payload: AppDataTaskApplicationFeedFeedItemResource): void
}>();

things like e and payload reported as unused vars. There's no error if emits are defined this way:

const emit = defineEmits<{
  close: [],
  success: [payload: AppDataTaskApplicationFeedFeedItemResource]
}>();

Because those are not errors and the syntax is a valid vue3 syntax, imo it's better to not report those things as errors if possible.

The rest of the reported issues i got mostly about no-explicit-any, which if needed could be changed on per project basis and i'm fine with it

@ChristianPraiss
Copy link
Copy Markdown
Contributor Author

Hey, thx for testing it out! Will check what can be done about the rule, will see if there is a vue-specific version or if the rule params have an option to fix this.

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.

2 participants