intlify / eslint-plugin-svelte

ESLint plugin for internationalization with Svelte
MIT License
4 stars 3 forks source link

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

Closed codiini closed 4 months ago

codiini commented 4 months ago

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

changeset-bot[bot] commented 4 months ago

⚠️ No Changeset found

Latest commit: 0863962a1bb5926965ee73e36558c2b61f6188fb

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 commented 4 months ago

@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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

@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