2022-09-12 02:41:50 -07:00
|
|
|
/**
|
|
|
|
* @type {import('@types/eslint').ESLint.ConfigData}
|
|
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
plugins: ['vue'],
|
|
|
|
|
2023-12-28 00:49:58 -08:00
|
|
|
extends: ['plugin:vue/vue3-recommended', '@vue/typescript', './base'],
|
2022-09-12 02:41:50 -07:00
|
|
|
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
es6: true,
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
|
2022-11-15 09:20:54 -08:00
|
|
|
ignorePatterns: ['**/*.js', '**/*.d.ts', 'vite.config.ts', '**/*.ts.snap'],
|
2022-09-12 02:41:50 -07:00
|
|
|
|
2023-05-24 01:12:41 -07:00
|
|
|
overrides: [
|
2023-12-29 01:45:55 -08:00
|
|
|
{
|
2024-03-13 08:52:29 -07:00
|
|
|
files: [
|
|
|
|
'**/*.test.ts',
|
|
|
|
'**/test/**/*.ts',
|
|
|
|
'**/__tests__/**/*.ts',
|
|
|
|
'**/*.stories.ts',
|
|
|
|
],
|
2023-12-29 01:45:55 -08:00
|
|
|
rules: {
|
|
|
|
'import/no-extraneous-dependencies': 'off',
|
|
|
|
},
|
|
|
|
},
|
2023-05-24 01:12:41 -07:00
|
|
|
],
|
|
|
|
|
2022-09-12 02:41:50 -07:00
|
|
|
rules: {
|
|
|
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
|
|
semi: [2, 'always'],
|
|
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
|
|
'no-tabs': 0,
|
|
|
|
'no-labels': 0,
|
2022-11-18 05:59:31 -08:00
|
|
|
'vue/no-deprecated-slot-attribute': 'error',
|
|
|
|
'vue/no-deprecated-slot-scope-attribute': 'error',
|
|
|
|
'vue/no-multiple-template-root': 'error',
|
|
|
|
'vue/v-slot-style': 'error',
|
2023-05-19 06:31:16 -07:00
|
|
|
'vue/no-unused-components': 'error',
|
|
|
|
'vue/multi-word-component-names': 'off',
|
2024-01-11 06:15:54 -08:00
|
|
|
'@typescript-eslint/no-use-before-define': 'off',
|
2023-11-22 06:01:22 -08:00
|
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
2023-12-28 00:49:58 -08:00
|
|
|
'vue/component-name-in-template-casing': [
|
|
|
|
'error',
|
|
|
|
'PascalCase',
|
|
|
|
{
|
|
|
|
registeredComponentsOnly: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'vue/no-reserved-component-names': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
disallowVueBuiltInComponents: true,
|
|
|
|
disallowVue3BuiltInComponents: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'vue/prop-name-casing': ['error', 'camelCase'],
|
|
|
|
'vue/attribute-hyphenation': ['error', 'always'],
|
2023-12-29 01:45:55 -08:00
|
|
|
'import/no-extraneous-dependencies': 'warn',
|
2023-05-16 02:43:46 -07:00
|
|
|
|
2023-07-28 00:51:07 -07:00
|
|
|
// TODO: fix these
|
|
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
2023-11-22 06:01:22 -08:00
|
|
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
|
|
'@typescript-eslint/no-unsafe-return': 'off',
|
2023-07-28 00:51:07 -07:00
|
|
|
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
|
|
'@typescript-eslint/unbound-method': 'off',
|
2023-11-22 06:01:22 -08:00
|
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
2023-07-28 00:51:07 -07:00
|
|
|
|
2023-05-16 02:43:46 -07:00
|
|
|
// TODO: remove these
|
|
|
|
'vue/no-mutating-props': 'warn',
|
2023-05-19 06:31:16 -07:00
|
|
|
'vue/no-side-effects-in-computed-properties': 'warn',
|
|
|
|
'vue/no-v-text-v-html-on-component': 'warn',
|
|
|
|
'vue/return-in-computed-property': 'warn',
|
2023-12-08 03:51:49 -08:00
|
|
|
'n8n-local-rules/no-plain-errors': 'off',
|
2022-09-12 02:41:50 -07:00
|
|
|
},
|
|
|
|
};
|