Skip to content

Commit

Permalink
fix: simplify rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Aug 7, 2024
1 parent 7bea4d6 commit 818743a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
6 changes: 0 additions & 6 deletions src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import type { Linter } from 'eslint'
export const typescriptCore = tseslint.config({
extends: [...tseslint.configs.recommended],
files: [GLOB_TS, GLOB_TSX],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
sourceType: 'module',
},
},
name: 'sxzz/typescript',
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
Expand Down
16 changes: 9 additions & 7 deletions src/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ const vue2Rules: Linter.RulesRecord = {
delete vue2Rules['vue/component-tags-order']
delete vue3Rules['vue/component-tags-order']

const vueTs: Linter.Config[] = typescriptCore.map((config) => {
return {
...config,
files: [GLOB_VUE],
name: `sxzz/vue/${config.name?.replace('sxzz/', '') || 'anonymous'}`,
}
})
const vueTs: Linter.Config[] = typescriptCore
.filter((config) => config.name !== 'typescript-eslint/base')
.map((config) => {
return {
...config,
files: [GLOB_VUE],
name: `sxzz/vue/${config.name?.replace('sxzz/', '') || 'anonymous'}`,
}
})

export const vue: Linter.Config[] = [
...vueTs,
Expand Down

0 comments on commit 818743a

Please sign in to comment.