[Eslint] Fix config
This commit is contained in:
parent
9005bd089a
commit
6a362a963f
@ -61,46 +61,24 @@ const style = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {import('eslint').Linter.FlatConfig[]} */
|
/** @type {import('eslint').Linter.Config} */
|
||||||
export default tseslint.config(
|
export default tseslint.config(
|
||||||
// Base JavaScript rules
|
// Base JavaScript rules
|
||||||
eslint.configs.recommended,
|
eslint.configs.recommended,
|
||||||
...tseslint.configs.recommended,
|
tseslint.configs.recommended,
|
||||||
style,
|
style,
|
||||||
|
|
||||||
// TypeScript support
|
|
||||||
// {
|
|
||||||
// files: ['**/*.ts', '**/*.tsx'],
|
|
||||||
// languageOptions: {
|
|
||||||
// parser: parserTs,
|
|
||||||
// parserOptions: {
|
|
||||||
// ecmaVersion: 'latest',
|
|
||||||
// sourceType: 'module',
|
|
||||||
// project: './tsconfig.json',
|
|
||||||
// ecmaFeatures: {
|
|
||||||
// jsx: true,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// plugins: {
|
|
||||||
// '@typescript-eslint': typescript,
|
|
||||||
// },
|
|
||||||
// rules: {
|
|
||||||
// ...typescript.configs.recommended.rules,
|
|
||||||
// ...style.rules,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
|
|
||||||
// Vue support (including TS and JSX inside SFCs)
|
// Vue support (including TS and JSX inside SFCs)
|
||||||
{
|
{
|
||||||
files: ['**/*.vue'],
|
files: ['**/*.vue'],
|
||||||
extends: [
|
|
||||||
'plugin: vue/recommended'
|
|
||||||
],
|
|
||||||
plugins: {
|
plugins: {
|
||||||
'vue-eslint-parser': vue,
|
'vue': vue,
|
||||||
'@typescript-eslint': typescript,
|
'@typescript-eslint': typescript,
|
||||||
},
|
},
|
||||||
|
extends: [
|
||||||
|
eslint.configs.recommended,
|
||||||
|
...vue.configs['flat/recommended']
|
||||||
|
],
|
||||||
rules: {
|
rules: {
|
||||||
...typescript.configs.recommended.rules,
|
...typescript.configs.recommended.rules,
|
||||||
...style.rules,
|
...style.rules,
|
||||||
@ -111,7 +89,7 @@ export default tseslint.config(
|
|||||||
'vue/script-indent': ['error', 4],
|
'vue/script-indent': ['error', 4],
|
||||||
'vue/max-attributes-per-line': ['error', {
|
'vue/max-attributes-per-line': ['error', {
|
||||||
singleline: 3,
|
singleline: 3,
|
||||||
multiline: { max: 1, allowFirstLine: false },
|
multiline: 1,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user