generated from lvzhenbo/naive-tailwind-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
931 additions
and
930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { defineFlatConfig } from 'eslint-define-config'; | ||
import js from '@eslint/js'; | ||
import pluginVue from 'eslint-plugin-vue'; | ||
import vueTsEslintConfig from '@vue/eslint-config-typescript'; | ||
import prettierConfig from '@vue/eslint-config-prettier'; | ||
import parserVue from 'vue-eslint-parser'; | ||
import AutoImport from './.eslintrc-auto-import.json' with { type: 'json' }; | ||
|
||
export default defineFlatConfig([ | ||
...pluginVue.configs['flat/recommended'], | ||
js.configs.recommended, | ||
...vueTsEslintConfig({ | ||
supportedScriptLangs: { | ||
ts: true, | ||
tsx: true, | ||
}, | ||
}), | ||
{ | ||
name: 'app/vue-files', | ||
files: ['**/*.vue'], | ||
languageOptions: { | ||
parser: parserVue, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'app/files-to-lint', | ||
files: ['**/*.{ts,mts,tsx,vue}'], | ||
languageOptions: { | ||
globals: { | ||
...AutoImport.globals, | ||
}, | ||
}, | ||
rules: { | ||
// 允许被禁止的类型 https://typescript-eslint.io/rules/ban-types/ | ||
'@typescript-eslint/ban-types': 'off', | ||
// 允许any类型 https://typescript-eslint.io/rules/no-explicit-any/ | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// 允许任何TS指令注释 https://typescript-eslint.io/rules/ban-ts-comment | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
// 允许空函数 https://typescript-eslint.io/rules/no-empty-function/ | ||
'@typescript-eslint/no-empty-function': 'off', | ||
// 关闭强制多词组件名 https://eslint.vuejs.org/rules/multi-word-component-names.html | ||
'vue/multi-word-component-names': 'off', | ||
// 强制执行自我关闭风格 https://eslint.vuejs.org/rules/html-self-closing.html | ||
'vue/html-self-closing': [ | ||
'error', | ||
{ | ||
html: { | ||
void: 'always', | ||
normal: 'never', | ||
component: 'always', | ||
}, | ||
svg: 'always', | ||
math: 'always', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'app/files-to-ignore', | ||
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], | ||
}, | ||
prettierConfig, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.