Skip to content

Commit

Permalink
chore: fixed vue file error
Browse files Browse the repository at this point in the history
  • Loading branch information
vtrbo committed Jul 29, 2023
1 parent 30878bf commit 45db326
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/eslint-config-svelte/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ module.exports = !SVELTE
],
extends: [
'plugin:svelte/recommended',
// TS
// ? '@vtrbo/eslint-config-ts'
// : '@vtrbo/eslint-config-basic',
TS
? '@vtrbo/eslint-config-ts'
: '@vtrbo/eslint-config-basic',
],
rules: {
'svelte/max-attributes-per-line': 'off',
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-vue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ module.exports = !VUE
VV === 3
? 'plugin:vue/vue3-recommended'
: 'plugin:vue/recommended',
// TS
// ? '@vtrbo/eslint-config-ts'
// : '@vtrbo/eslint-config-basic',
TS
? '@vtrbo/eslint-config-ts'
: '@vtrbo/eslint-config-basic',
],
rules: {
'vue/max-attributes-per-line': 'off',
Expand Down
13 changes: 12 additions & 1 deletion packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ const { defineConfig } = require('eslint-define-config')
const { isPackageExists } = require('local-pkg')

const TS = isPackageExists('typescript')
const VUE = isPackageExists('vue')
const SVELTE = isPackageExists('svelte')

const EXTENDS = []

if (!VUE && !SVELTE) {
if (TS)
EXTENDS.push('@vtrbo/eslint-config-ts')
else
EXTENDS.push('@vtrbo/eslint-config-basic')
}

module.exports = defineConfig({
extends: [
TS ? '@vtrbo/eslint-config-ts' : '@vtrbo/eslint-config-basic',
...EXTENDS,
'@vtrbo/eslint-config-vue',
'@vtrbo/eslint-config-svelte',
],
Expand Down

0 comments on commit 45db326

Please sign in to comment.