mirror of
https://github.com/golutra/golutra.git
synced 2026-09-24 16:07:01 +08:00
71 lines
1.7 KiB
JavaScript
71 lines
1.7 KiB
JavaScript
import js from '@eslint/js';
|
|
import vue from 'eslint-plugin-vue';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
import vueParser from 'vue-eslint-parser';
|
|
import prettier from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['node_modules', 'dist', 'coverage']
|
|
},
|
|
js.configs.recommended,
|
|
...vue.configs['flat/recommended'],
|
|
{
|
|
files: ['**/*.ts'],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module'
|
|
},
|
|
globals: {
|
|
...globals.browser
|
|
}
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tsPlugin
|
|
},
|
|
rules: {
|
|
...tsPlugin.configs.recommended.rules,
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
'@typescript-eslint/no-explicit-any': 'error'
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.vue'],
|
|
languageOptions: {
|
|
parser: vueParser,
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
parser: tsParser
|
|
},
|
|
globals: {
|
|
...globals.browser
|
|
}
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tsPlugin
|
|
},
|
|
rules: {
|
|
...tsPlugin.configs.recommended.rules,
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false }],
|
|
'vue/multi-word-component-names': ['error', { ignores: ['App', 'Settings'] }],
|
|
'vue/attributes-order': 'off'
|
|
}
|
|
},
|
|
{
|
|
files: ['vite.config.ts', 'eslint.config.js'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
prettier
|
|
];
|