n8n/packages/@n8n_io/eslint-config/frontend.js
Csaba Tuncsik 50f568560f
perf: Make frontend linting faster (no-changelog) (#7717)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected]>
2023-11-22 15:01:22 +01:00

57 lines
1.6 KiB
JavaScript

/**
* @type {import('@types/eslint').ESLint.ConfigData}
*/
module.exports = {
plugins: ['vue'],
extends: ['plugin:vue/vue3-essential', '@vue/typescript', './base'],
env: {
browser: true,
es6: true,
node: true,
},
ignorePatterns: ['**/*.js', '**/*.d.ts', 'vite.config.ts', '**/*.ts.snap'],
overrides: [
{
files: ['src/**/*.vue'],
rules: {
'n8n-local-rules/dangerously-use-html-string-missing': 'error',
},
},
],
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,
'vue/no-deprecated-slot-attribute': 'error',
'vue/no-deprecated-slot-scope-attribute': 'error',
'vue/no-multiple-template-root': 'error',
'vue/v-slot-style': 'error',
'vue/no-unused-components': 'error',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-explicit-any': 'error',
// TODO: fix these
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
// TODO: remove these
'vue/no-mutating-props': 'warn',
'vue/no-side-effects-in-computed-properties': 'warn',
'vue/no-v-text-v-html-on-component': 'warn',
'vue/return-in-computed-property': 'warn',
},
};