Skip to content

Commit

Permalink
fix: flat configs
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Mar 12, 2024
1 parent 5cf9bb1 commit 95ddc6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,30 +281,36 @@ mod.configs = {
'vue3-strongly-recommended': require('./configs/vue3-strongly-recommended'),

// flat configs
'flat/base': Object.assign(baseConfig, require('./configs/flat/base.js')),
'flat/base': Object.assign({}, baseConfig, require('./configs/flat/base.js')),
'flat/vue2-essential': Object.assign(
{},
baseConfig,
require('./configs/flat/vue2-essential.js')
),
'flat/vue2-recommended': Object.assign(
{},
baseConfig,
require('./configs/flat/vue2-recommended.js')
),
'flat/vue2-strongly-recommended': Object.assign(
{},
baseConfig,
require('./configs/flat/vue2-strongly-recommended.js')
),

// in flat configs, non-prefixed config is for Vue 3 (unlike eslintrc configs)
'flat/essential': Object.assign(
{},
baseConfig,
require('./configs/flat/vue3-essential.js')
),
'flat/recommended': Object.assign(
{},
baseConfig,
require('./configs/flat/vue3-recommended.js')
),
'flat/strongly-recommended': Object.assign(
{},
baseConfig,
require('./configs/flat/vue3-strongly-recommended.js')
)
Expand Down
14 changes: 7 additions & 7 deletions tools/update-lib-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ mod.configs = {
'vue3-strongly-recommended': require('./configs/vue3-strongly-recommended'),
// flat configs
'flat/base': Object.assign(baseConfig, require('./configs/flat/base.js')),
'flat/vue2-essential': Object.assign(baseConfig, require('./configs/flat/vue2-essential.js')),
'flat/vue2-recommended': Object.assign(baseConfig, require('./configs/flat/vue2-recommended.js')),
'flat/vue2-strongly-recommended': Object.assign(baseConfig, require('./configs/flat/vue2-strongly-recommended.js')),
'flat/base': Object.assign({}, baseConfig, require('./configs/flat/base.js')),
'flat/vue2-essential': Object.assign({}, baseConfig, require('./configs/flat/vue2-essential.js')),
'flat/vue2-recommended': Object.assign({}, baseConfig, require('./configs/flat/vue2-recommended.js')),
'flat/vue2-strongly-recommended': Object.assign({}, baseConfig, require('./configs/flat/vue2-strongly-recommended.js')),
// in flat configs, non-prefixed config is for Vue 3 (unlike eslintrc configs)
'flat/essential': Object.assign(baseConfig, require('./configs/flat/vue3-essential.js')),
'flat/recommended': Object.assign(baseConfig, require('./configs/flat/vue3-recommended.js')),
'flat/strongly-recommended': Object.assign(baseConfig, require('./configs/flat/vue3-strongly-recommended.js')),
'flat/essential': Object.assign({}, baseConfig, require('./configs/flat/vue3-essential.js')),
'flat/recommended': Object.assign({}, baseConfig, require('./configs/flat/vue3-recommended.js')),
'flat/strongly-recommended': Object.assign({}, baseConfig, require('./configs/flat/vue3-strongly-recommended.js')),
}
module.exports = mod
Expand Down

0 comments on commit 95ddc6f

Please sign in to comment.