-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: add support for eslint flat config - eslint-plugin-qwik #6048
Comments
I am using
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import prettierPlugin from 'eslint-plugin-prettier';
import qwikPlugin from 'eslint-plugin-qwik';
import globals from 'globals';
/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
{
files: ['src/**/*.ts*'],
languageOptions: {
globals: {
...globals.node,
},
parser: typescriptParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
project: ['./tsconfig.json'],
sourceType: 'module',
tsconfigRootDir: import.meta.dir,
},
},
plugins: {
'@typescript-eslint': typescriptPlugin,
prettier: prettierPlugin,
qwik: qwikPlugin,
},
rules: {
...prettierPlugin.configs.recommended.rules,
...qwikPlugin.configs.recommended.rules,
...typescriptPlugin.configs['strict-type-checked'].rules,
...typescriptPlugin.configs['stylistic-type-checked'].rules,
},
},
]; |
yes this kind of work but the types are not well defined |
Temporary workaround: use ESLint official pnpm add -D @eslint/eslintrc // eslint.config.js
import { FlatCompat } from "@eslint/eslintrc";
const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
});
export default [
// other configs
...compat.extends("plugin:qwik/recommended")
]; |
@JerryWu1234 how about this one? |
I can do it |
@wmertens and someone is focusing on. |
Please add support for ESLint 9, including Flat config support.
See:
Thanks!
Maintainer update:
The idea is that the plugin keeps supporting v8, but also supports v9 better so that the types work correctly.
Furthermore, the qwik codebase and starters should use v9, so all eslint configs need updating.
The text was updated successfully, but these errors were encountered: