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

Unify eslint configurations #65

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Conversation

Tellus
Copy link
Collaborator

@Tellus Tellus commented Nov 27, 2023

Updating the eslint configuration ended up requiring me to migrate everything at once, as well as the prettier configurations, so this PR should manage to close #44, #43, #42, #41, #40, #39, #38, #37, #36, #35, #34, #33, #32, #31, #30, and #3 (apologies for the massive spam).

A few notes on the changes:

  • eslint has introduced a new config format, "flat" configs. The notion is to stop using .eslintrc files (which use strings to point to plugins/configurations), and move to a eslint.config.js file that imports the packages directly and passes the plugin objects back to eslint. It seems like a reasonable change, but some of the plugins currently in use have not yet added support for flat configs (see ESLint Flat Config Support typescript-eslint/typescript-eslint#7694). As a result, the new monorepo configuration does not use flat configs, but it should be a priority to switch over once the plugins we depend on have added support.
  • a good deal (but not all) packages had set the rule sonarjs/no-duplicate-string. I've worked on the assumption that this was because some eslint configs had simply not had the rule added, and put it in the monorepo root config. This can be overridden if necessary.
  • it looked like my VSCode was giving wonky eslint results without a prettier configuration in the root folder, so created one and removed all the separate configs (they are all identical).

When merging this PR, consider squashing first - there are several intermediary commits that I think would just pollute the history

@Tellus Tellus added this to the Unify eslint configurations milestone Nov 27, 2023
@Tellus Tellus linked an issue Nov 27, 2023 that may be closed by this pull request
Copy link

changeset-bot bot commented Nov 27, 2023

⚠️ No Changeset found

Latest commit: 220c26f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Tellus
Copy link
Collaborator Author

Tellus commented Nov 27, 2023

A changeset was omitted on purpose. None of the changes in the PR affect package functionalities and are functionally indistinct from those already published.

@Tellus Tellus changed the title 3 create root eslint configuration Unify eslint configurations Nov 27, 2023
@AntonioEstriga AntonioEstriga merged commit 11b6e98 into main Nov 28, 2023
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.

@qualweb/wcag-techniques: migrate eslint config to use monorepo root Create root eslint configuration
2 participants