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: support eslint flat config #119

Open
3 tasks done
pawel-twardziak opened this issue Oct 15, 2024 · 4 comments
Open
3 tasks done

feat: support eslint flat config #119

pawel-twardziak opened this issue Oct 15, 2024 · 4 comments

Comments

@pawel-twardziak
Copy link

Prerequisites

Describe the Feature Request

To support flat config of eslint

Describe the Use Case

NX workspace

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

@pawel-twardziak
Copy link
Author

I am on it

@Oleksandr-Poshtaruk-KSO
Copy link

Oleksandr-Poshtaruk-KSO commented Dec 26, 2024

Any update guys? Want to install it for eslint 9 with FlatConfig but get error
TypeError: Key "rules": Key "@stencil-community/strict-boolean-conditions": Could not find plugin "@stencil-community".
Would appreciate any solution

@Oleksandr-Poshtaruk-KSO
Copy link

Oleksandr-Poshtaruk-KSO commented Dec 26, 2024

Seems like made it work with:

//eslint.config.mjs
import stencilPlugin from '@stencil-community/eslint-plugin'; // 0.9.0
import globals from 'globals';
import reactPlugin from 'eslint-plugin-react';
import typescriptEslintParser from '@typescript-eslint/parser';
import tseslint from 'typescript-eslint';
...
export default [
....
...tseslint.configs.recommended,
  {
    files: ['**/*.{ts, tsx}'],
    languageOptions: {
      parser: typescriptEslintParser,
      parserOptions: {
        project: './tsconfig.json',
      },
      sourceType: 'module',
      globals: globals.browser
    },
    plugins: {
      '@stencil-community': stencilPlugin,
      react: reactPlugin,
    },
    rules: {
      ...stencilPlugin.configs.strict.rules,

      "@typescript-eslint/semi": 'off',
      "@typescript-eslint/brace-style": 'off',
      "@typescript-eslint/func-call-spacing": 'off',

    },
  },
]

And had to turn off these rules. I think they are missed in "@typescript-eslint/eslint-plugin": "8.18.2",
"@typescript-eslint/semi": 'off',
"@typescript-eslint/brace-style": 'off',
"@typescript-eslint/func-call-spacing": 'off',

@pawel-twardziak
Copy link
Author

Sorry @Oleksandr-Poshtaruk-KSO , it takes way longer than I expected. Good I've found a solution.

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

No branches or pull requests

2 participants