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

Example eslint v9 config #17

Closed
LucasHillDex opened this issue Jun 19, 2024 · 4 comments · Fixed by #20
Closed

Example eslint v9 config #17

LucasHillDex opened this issue Jun 19, 2024 · 4 comments · Fixed by #20
Labels
help wanted Extra attention is needed Type: Feature Includes new features

Comments

@LucasHillDex
Copy link

Would it be possible to provide a config that will work with the new flat config format in eslint v9?

I see that support was added in this PR: #12

However, when I look at the code I don't see an exported config that is compatible with v9. All the exported configs use the old "extends" format https://github.com/intlify/eslint-plugin-svelte/blob/main/lib/configs/recommended.ts. I could totally be missing it though.

Thanks!

@LucasHillDex
Copy link
Author

I was able to get this working by using the eslint compat helper..

import { fixupPluginRules } from '@eslint/compat';
import intlifySvelte from '@intlify/eslint-plugin-svelte';

const intlifyFixedPlugin = fixupPluginRules(intlifySvelte);

export default [
  {
    plugins: {
      '@intlify/svelte': intlifyFixedPlugin
    },
    rules: {
      '@intlify/svelte/no-raw-text': 'error'
    },
    ignores: ['**/*.test.svelte']
  },

But a native flat config format would be great!

@ota-meshi
Copy link
Member

Oh, the plugin doesn't provide flat config yet.
Could you please consider opening a PR if possible?

@ota-meshi ota-meshi added help wanted Extra attention is needed Type: Feature Includes new features labels Jun 19, 2024
@codiini
Copy link
Contributor

codiini commented Jun 30, 2024

Hey @ota-meshi I'd like to pick this up

@ota-meshi
Copy link
Member

@codiini Thank you! I'm looking forward to your pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Type: Feature Includes new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants