2022-10-04 10:48:23 +00:00
|
|
|
/* eslint-env node */
|
2022-10-03 19:36:55 +00:00
|
|
|
require('@rushstack/eslint-patch/modern-module-resolution')
|
2022-10-04 10:48:23 +00:00
|
|
|
|
2022-02-08 11:03:53 +00:00
|
|
|
module.exports = {
|
|
|
|
'root': true,
|
|
|
|
'env': {
|
|
|
|
'browser': true,
|
2022-10-17 14:12:16 +00:00
|
|
|
'es2022': true,
|
2022-02-08 11:03:53 +00:00
|
|
|
'node': true,
|
|
|
|
},
|
|
|
|
'extends': [
|
|
|
|
'eslint:recommended',
|
2022-10-03 19:36:55 +00:00
|
|
|
'plugin:vue/vue3-recommended',
|
2022-10-04 10:48:23 +00:00
|
|
|
'@vue/eslint-config-typescript/recommended',
|
2022-02-08 11:03:53 +00:00
|
|
|
],
|
|
|
|
'rules': {
|
2022-10-03 19:36:55 +00:00
|
|
|
'quotes': ['error', 'single'],
|
|
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
|
|
'semi': ['error', 'never'],
|
|
|
|
|
|
|
|
'vue/v-on-event-hyphenation': ['warn', 'never', { 'autofix': true }],
|
2024-02-07 11:18:19 +00:00
|
|
|
'vue/multi-word-component-names': 'off',
|
2022-10-03 19:36:55 +00:00
|
|
|
|
|
|
|
// uncategorized rules:
|
|
|
|
'vue/component-api-style': ['error', ['script-setup']],
|
|
|
|
'vue/component-name-in-template-casing': ['warn', 'PascalCase'],
|
|
|
|
'vue/custom-event-name-casing': ['error', 'camelCase'],
|
|
|
|
'vue/define-macros-order': 'error',
|
|
|
|
'vue/match-component-file-name': ['error', {
|
|
|
|
'extensions': ['.js', '.jsx', '.ts', '.tsx', '.vue'],
|
|
|
|
'shouldMatchCase': true,
|
|
|
|
}],
|
|
|
|
'vue/no-boolean-default': ['warn', 'default-false'],
|
|
|
|
'vue/match-component-import-name': 'error',
|
|
|
|
'vue/prefer-separate-static-class': 'warn',
|
|
|
|
|
|
|
|
'vue/padding-line-between-blocks': 'error',
|
|
|
|
'vue/next-tick-style': ['error', 'promise'],
|
|
|
|
'vue/block-lang': [
|
2022-02-08 11:03:53 +00:00
|
|
|
'error',
|
2022-10-03 19:36:55 +00:00
|
|
|
{ 'script': { 'lang': 'ts' } },
|
2022-02-08 11:03:53 +00:00
|
|
|
],
|
2022-10-03 19:36:55 +00:00
|
|
|
'vue/no-required-prop-with-default': ['error', { 'autofix': true }],
|
|
|
|
'vue/no-duplicate-attr-inheritance': 'error',
|
|
|
|
'vue/no-empty-component-block': 'error',
|
2024-02-07 11:18:19 +00:00
|
|
|
'vue/html-indent': ['error', 'tab'],
|
2022-02-08 11:03:53 +00:00
|
|
|
|
2022-10-03 19:36:55 +00:00
|
|
|
// vue3
|
|
|
|
'vue/no-ref-object-destructure': 'error',
|
2022-02-08 11:03:53 +00:00
|
|
|
},
|
|
|
|
'parser': 'vue-eslint-parser',
|
|
|
|
'parserOptions': {
|
|
|
|
'parser': '@typescript-eslint/parser',
|
2022-10-03 19:36:55 +00:00
|
|
|
'ecmaVersion': 'latest',
|
2022-02-08 11:03:53 +00:00
|
|
|
},
|
|
|
|
'ignorePatterns': [
|
|
|
|
'*.test.*',
|
|
|
|
'cypress/*',
|
|
|
|
],
|
|
|
|
}
|