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

feat: update repo to use flat config && update integration tests #22

Merged
merged 27 commits into from
Jul 9, 2024

Conversation

codiini
Copy link
Contributor

@codiini codiini commented Jul 4, 2024

This PR adds support for ESLint V9 Flat config and also updates the /integration-tests to support both flat-config and legacy-config.

Copy link

changeset-bot bot commented Jul 4, 2024

⚠️ No Changeset found

Latest commit: 0863962

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

@codiini codiini closed this Jul 4, 2024
@codiini codiini reopened this Jul 4, 2024
@codiini
Copy link
Contributor Author

codiini commented Jul 4, 2024

@ota-meshi I'm having issues with the Integration tests working on CI.

I got them to work locally using the ESLint class method, but that failed when I pushed to CI. Then I switched to using the execySync node process (mostly copied from the vue eslint plugin) in this commit but that failed locally and also on CI.

Do you know what the issue might be?

@ota-meshi
Copy link
Member

Wow! Thank you for this PR!

I haven't run it so I don't know, but we might need the --ext option, as the old ESLint only lints *.js files by default, or specifying the file name directly might solve the problem.

@ota-meshi
Copy link
Member

Ah, I think it's because the env isn't being passed and therefore the node path can't be resolved.

-  env: { ESLINT_USE_FLAT_CONFIG: 'false' }
+  env: { ...process.env,  ESLINT_USE_FLAT_CONFIG: 'false' }

@codiini
Copy link
Contributor Author

codiini commented Jul 5, 2024

@ota-meshi Thank you, I've made the update. The CI still fails for both flat and legacy config but with different errors this time

EDIT: The Legacy config test works now. Debugging the issue with the flat config now

parser: svelteParser
},
rules: {
'@intlify/svelte/no-raw-text': 'error'
Copy link
Member

Choose a reason for hiding this comment

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

We probably need to remove this. The rule needs to be flagged with a warning, otherwise execSync will throw an error.
Or we need to gather the reports in another way that doesn't use execSync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, so I'll update the code to work with the first option

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It worked locally but failed on the CI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just tried the second options. Also fails on CI

Copy link
Member

Choose a reason for hiding this comment

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

It worked locally but failed on the CI

I think it's failing with yarn install, it seems like it needs to install ignoring dependency version compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, it works! Thanks a lot @ota-meshi

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

Thanks so much!

@ota-meshi ota-meshi merged commit d1e388d into intlify:main Jul 9, 2024
11 checks passed
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.

None yet

2 participants