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

ESLint 9, flat config migration #1537

Merged
merged 50 commits into from
Sep 24, 2024
Merged

ESLint 9, flat config migration #1537

merged 50 commits into from
Sep 24, 2024

Conversation

Copy link

changeset-bot bot commented Apr 11, 2024

🦋 Changeset detected

Latest commit: 57c67df

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@renovate renovate bot force-pushed the renovate-eslint-9.x branch 5 times, most recently from f9c56b1 to a873c0d Compare April 17, 2024 06:37
@renovate renovate bot requested a review from a team as a code owner April 18, 2024 00:09
@samchungy
Copy link
Contributor

Wait for downstream to support: typescript-eslint/typescript-eslint#8211

@samchungy samchungy marked this pull request as draft April 18, 2024 00:16
@samchungy samchungy mentioned this pull request Apr 18, 2024
1 task
@72636c 72636c removed the request for review from a team April 18, 2024 00:31
@renovate renovate bot force-pushed the renovate-eslint-9.x branch 5 times, most recently from 8daf0c5 to 567c233 Compare April 24, 2024 00:39
@renovate renovate bot force-pushed the renovate-eslint-9.x branch 4 times, most recently from 07fed65 to bff669d Compare May 9, 2024 11:34
@renovate renovate bot force-pushed the renovate-eslint-9.x branch 3 times, most recently from 63c0c88 to c64c909 Compare May 22, 2024 04:35
@renovate renovate bot force-pushed the renovate-eslint-9.x branch 6 times, most recently from 3df0fe5 to c294e56 Compare June 5, 2024 00:14
AaronMoat and others added 2 commits September 9, 2024 10:21
Co-authored-by: Sam Chung <samc@seek.com.au>
},
);

const replaceAllUntilStable = (
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Could we use replaceAll instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately not. The regex replaces pairs into one; but for cases of three or more in a row, it needs multiple rounds to condense them. I'm open to better approaches, this was a tricky one because I didn't want to parse the file (and end up fully reformatting it when writing it back out), so everything I considered was piles of hacks (including this!)

@AaronMoat AaronMoat mentioned this pull request Sep 23, 2024
1 task
Copy link
Contributor

@samchungy samchungy left a comment

Choose a reason for hiding this comment

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

👏

'tmp*/',
],
},
...base.map(({ plugins: { jest: _jest, ...restPlugins } = {}, ...conf }) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

question: why do we need to ignore the jest plugin from the base?

Copy link
Contributor

Choose a reason for hiding this comment

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

This could be cleaned up after with an eslint-config-seek change, eslint currently yells if you try to redefine a plugin that's already defined, but if you defined it in a block with files you can't use it unless it's exactly the same files 😬

@@ -25,7 +25,13 @@ echo '--- pnpm build'
pnpm build

echo '--- pnpm pack'
# I'm sure there's a better way to do this
eslint_config_skuba_tar="$(pwd)/packages/eslint-config-skuba/$(cd packages/eslint-config-skuba && pnpm pack | grep -o 'eslint-config-skuba-.*\.tgz')"
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh gotcha because we're packing the thing but the eslint config dep is workspace:* it injects the workspace's current version into that so when we install it, it pulls latest. Damn

AaronMoat and others added 3 commits September 24, 2024 21:49
Co-authored-by: Sam Chung <samc@seek.com.au>
@AaronMoat
Copy link
Contributor

Huge PR so if anyone has feedback after the fact happy to loop back! Will endeavour to do some internal snapshot testing and the like on master too.

@AaronMoat AaronMoat merged commit 7797915 into main Sep 24, 2024
16 checks passed
@AaronMoat AaronMoat deleted the renovate-eslint-9.x branch September 24, 2024 11:59
@seek-oss-ci seek-oss-ci mentioned this pull request Sep 23, 2024
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.

lint: Create migration path to FlatESLint lint: eslintrc rules difficult to override
3 participants