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 9 Flat Config #573

Merged
merged 6 commits into from
Oct 9, 2024
Merged

Conversation

haoqunjiang
Copy link
Member

@haoqunjiang haoqunjiang commented Oct 5, 2024

Description

Fixes #488

The major redesign is done at vuejs/create-eslint-config@1d657db (the CLI part is irrelevant to this project)

As it's implemented in a hurry (ESLint 8 reached EOL on Oct. 5), after testing locally, I pinned the @vue/create-eslint-config dependency version here in case of any unintended breakage later.

I will follow up on this feature to improve the code quality in a few days.

@haoqunjiang haoqunjiang marked this pull request as draft October 5, 2024 19:58
@haoqunjiang haoqunjiang marked this pull request as ready for review October 5, 2024 20:27
@haoqunjiang haoqunjiang requested a review from cexbrayat October 5, 2024 20:27
@haoqunjiang haoqunjiang merged commit 053c8ab into main Oct 9, 2024
202 checks passed
@haoqunjiang haoqunjiang deleted the feat-eslint-flat-config branch October 9, 2024 06:34
@yanhao98
Copy link

yanhao98 commented Oct 11, 2024

image

有问题的代码:

<script setup lang="tsx">
import type { FunctionalComponent } from 'vue';

const FComponent: FunctionalComponent<{ prop: string }> = (props, context) => (
  <>
    <div>
      <span>This is a functional component with prop: {JSON.stringify(props)}</span>
    </div>
  </>
);
</script>

vue-macros 的里也会有问题。可能在.vue文件里面的tsx都有问题?

<script setup lang="tsx">
defineRender(
  <div>
    <span>Hello defineRender()</span>
  </div>,
);
</script>

image

抱歉,我配置了supportedScriptLangs就可以了。

  ...vueTsEslintConfig({
    supportedScriptLangs: {
      ts: true,
      tsx: true,
    }
  }),

@messenjer
Copy link
Contributor

@yanhao98
Copy link

@yanhao98, could you create an issue ? https://github.com/vuejs/create-vue/issues/new/choose

谢谢,这个问题已经解决了。是我自己没有配置好。
The issue has been resolved. It was my own configuration mistake.

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.

ESLint v9 support
3 participants