Files

81 lines
2.0 KiB
JavaScript
Raw Permalink Normal View History

import eslint from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import eslintPluginVue from 'eslint-plugin-vue'
import globals from 'globals'
import typescriptEslint from 'typescript-eslint'
export default typescriptEslint.config(
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/out/**',
'**/release/**',
'**/.output/**',
'**/.wxt/**',
'**/.vite/**',
'**/coverage/**',
'**/components.d.ts',
'**/auto-imports.d.ts',
'**/stats.html',
'server/**',
'apps/browser-extension/**',
],
},
{
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
],
files: ['**/*.{js,mjs,cjs,ts,tsx,vue}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
parserOptions: {
parser: typescriptEslint.parser,
extraFileExtensions: ['.vue'],
},
},
rules: {
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
'vue/attribute-hyphenation': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/require-default-prop': 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-useless-escape': 'warn',
'no-useless-assignment': 'warn',
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
},
},
{
files: ['**/*.{test,spec}.{ts,tsx,js}'],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
},
},
eslintConfigPrettier,
)