2022-10-04 12:48:23 +02:00
|
|
|
/* eslint-env node */
|
2022-10-03 21:36:55 +02:00
|
|
|
require('@rushstack/eslint-patch/modern-module-resolution')
|
2022-10-04 12:48:23 +02:00
|
|
|
|
2022-02-08 12:03:53 +01:00
|
|
|
module.exports = {
|
|
|
|
'root': true,
|
|
|
|
'env': {
|
|
|
|
'browser': true,
|
2022-10-17 16:12:16 +02:00
|
|
|
'es2022': true,
|
2022-02-08 12:03:53 +01:00
|
|
|
'node': true,
|
|
|
|
},
|
|
|
|
'extends': [
|
|
|
|
'eslint:recommended',
|
2022-10-03 21:36:55 +02:00
|
|
|
'plugin:vue/vue3-recommended',
|
2022-10-04 12:48:23 +02:00
|
|
|
'@vue/eslint-config-typescript/recommended',
|
2022-02-08 12:03:53 +01:00
|
|
|
],
|
|
|
|
'rules': {
|
2022-10-03 21:36:55 +02:00
|
|
|
'quotes': ['error', 'single'],
|
|
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
|
|
'semi': ['error', 'never'],
|
|
|
|
|
|
|
|
'vue/v-on-event-hyphenation': ['warn', 'never', { 'autofix': true }],
|
2024-02-07 12:18:19 +01:00
|
|
|
'vue/multi-word-component-names': 'off',
|
2022-10-03 21:36:55 +02:00
|
|
|
|
|
|
|
// uncategorized rules:
|
|
|
|
'vue/component-api-style': ['error', ['script-setup']],
|
2024-06-17 17:31:37 +02:00
|
|
|
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
2024-06-18 17:48:04 +02:00
|
|
|
'globals': ['RouterView', 'RouterLink', 'Icon', 'Notifications', 'Modal', 'Card'],
|
2024-06-17 17:31:37 +02:00
|
|
|
}],
|
2022-10-03 21:36:55 +02:00
|
|
|
'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 12:03:53 +01:00
|
|
|
'error',
|
2022-10-03 21:36:55 +02:00
|
|
|
{ 'script': { 'lang': 'ts' } },
|
2022-02-08 12:03:53 +01:00
|
|
|
],
|
2022-10-03 21:36:55 +02:00
|
|
|
'vue/no-duplicate-attr-inheritance': 'error',
|
|
|
|
'vue/no-empty-component-block': 'error',
|
2024-02-07 12:18:19 +01:00
|
|
|
'vue/html-indent': ['error', 'tab'],
|
2022-02-08 12:03:53 +01:00
|
|
|
|
2022-10-03 21:36:55 +02:00
|
|
|
// vue3
|
2024-06-17 09:18:02 +00:00
|
|
|
'vue/no-ref-object-reactivity-loss': 'error',
|
|
|
|
'vue/no-setup-props-reactivity-loss': 'warn', // TODO: switch to error after vite `propsDestructure` is removed
|
2022-02-08 12:03:53 +01:00
|
|
|
},
|
|
|
|
'parser': 'vue-eslint-parser',
|
|
|
|
'parserOptions': {
|
|
|
|
'parser': '@typescript-eslint/parser',
|
2022-10-03 21:36:55 +02:00
|
|
|
'ecmaVersion': 'latest',
|
2024-06-18 17:53:10 +02:00
|
|
|
'tsconfigRootDir': __dirname,
|
2022-02-08 12:03:53 +01:00
|
|
|
},
|
|
|
|
'ignorePatterns': [
|
|
|
|
'*.test.*',
|
|
|
|
'cypress/*',
|
|
|
|
],
|
|
|
|
}
|