43 lines
1.0 KiB
JavaScript
43 lines
1.0 KiB
JavaScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
import vue from 'eslint-plugin-vue'
|
|
import vueParser from 'vue-eslint-parser'
|
|
|
|
const commonLanguageOptions = {
|
|
ecmaVersion: 2023,
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
}
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['dist', 'dist-electron', 'release', 'coverage', 'node_modules'] },
|
|
{
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
files: ['**/*.ts'],
|
|
languageOptions: commonLanguageOptions,
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
},
|
|
},
|
|
...vue.configs['flat/essential'],
|
|
{
|
|
extends: [...tseslint.configs.recommended],
|
|
files: ['**/*.vue'],
|
|
languageOptions: {
|
|
...commonLanguageOptions,
|
|
parser: vueParser,
|
|
parserOptions: {
|
|
parser: tseslint.parser,
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'vue/multi-word-component-names': 'off',
|
|
},
|
|
}
|
|
)
|