Skip to content

Commit

Permalink
fix: flat config format
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed May 16, 2024
1 parent ca185f8 commit fbaf72d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
12 changes: 6 additions & 6 deletions configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export default defineConfig(options => {
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
),
...overrides(
tseslint.config(...tseslint.configs.stylisticTypeChecked),
{
files: [mixed ? GLOB_TS : GLOB_ALL],
},
),
{
languageOptions: {
parserOptions: {
Expand Down Expand Up @@ -110,12 +116,6 @@ export default defineConfig(options => {
},
},
...stylisticTs(),
...overrides(
tseslint.config(...tseslint.configs.stylisticTypeChecked),
{
files: [mixed ? GLOB_TS : GLOB_ALL],
},
),
{
files: [mixed ? GLOB_TS : GLOB_ALL],
plugins: {
Expand Down
24 changes: 14 additions & 10 deletions configs/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ export default defineConfig(options => {
...(options.jsx ? [
{
files: [GLOB_VUE],
parserOptions: {
project: null,
languageOptions: {
parserOptions: {
project: null,
},
},
},
] : []),
Expand Down Expand Up @@ -425,14 +427,16 @@ export default defineConfig(options => {
] : []),
...(options.vue.macros ? [
{
globals: {
$: 'readonly',
$$: 'readonly',
$ref: 'readonly',
$shallowRef: 'readonly',
$computed: 'readonly',
$customRef: 'readonly',
$toRef: 'readonly',
languageOptions: {
globals: {
$: 'readonly',
$$: 'readonly',
$ref: 'readonly',
$shallowRef: 'readonly',
$computed: 'readonly',
$customRef: 'readonly',
$toRef: 'readonly',
},
},
rules: {
// [覆盖 essential] 允许 defineProps 解构
Expand Down

0 comments on commit fbaf72d

Please sign in to comment.