build: Update ESLint to v9 (#16639)

This commit is contained in:
Elias Meire
2025-06-27 10:42:47 +02:00
committed by GitHub
parent a99ccfffe1
commit 0775fd859e
176 changed files with 5417 additions and 4111 deletions

View File

@@ -1,42 +0,0 @@
const sharedOptions = require('@n8n/eslint-config/shared');
/**
* @type {import('@types/eslint').ESLint.ConfigData}
*/
module.exports = {
extends: ['@n8n/eslint-config/frontend'],
...sharedOptions(__dirname, 'frontend'),
rules: {
// TODO: Remove these
'id-denylist': 'warn',
'import/extensions': 'warn',
'import/no-default-export': 'warn',
'import/order': 'off',
'import/no-cycle': 'warn',
'import/no-duplicates': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/dot-notation': 'warn',
'@typescript-eslint/lines-between-class-members': 'warn',
'@typescript-eslint/member-delimiter-style': 'warn',
'@typescript-eslint/naming-convention': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-for-in-array': 'warn',
'@typescript-eslint/no-loop-func': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
},
};

View File

@@ -9,4 +9,4 @@ postcss.config.js
vue.config.js
dist/report.html
public/
.eslintrc.js
eslint.config.js

View File

@@ -0,0 +1,58 @@
import { defineConfig } from 'eslint/config';
import { frontendConfig } from '@n8n/eslint-config/frontend';
export default defineConfig(frontendConfig, {
rules: {
// TODO: Remove these
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'id-denylist': 'warn',
'no-case-declarations': 'warn',
'no-useless-escape': 'warn',
'no-prototype-builtins': 'warn',
'no-empty': 'warn',
'no-fallthrough': 'warn',
'no-extra-boolean-cast': 'warn',
'no-sparse-arrays': 'warn',
'no-control-regex': 'warn',
'import-x/extensions': 'warn',
'import-x/no-default-export': 'warn',
'import-x/order': 'off',
'import-x/no-cycle': 'warn',
'import-x/no-duplicates': 'warn',
'no-unsafe-optional-chaining': 'warn',
'@typescript-eslint/no-restricted-types': 'warn',
'@typescript-eslint/dot-notation': 'warn',
'@stylistic/lines-between-class-members': 'warn',
'@stylistic/member-delimiter-style': 'warn',
'@typescript-eslint/naming-convention': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-for-in-array': 'warn',
'@typescript-eslint/no-loop-func': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
'@typescript-eslint/require-await': 'warn',
'@typescript-eslint/prefer-promise-reject-errors': 'warn',
'@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'vue/attribute-hyphenation': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
},
});

View File

@@ -3,14 +3,15 @@
"version": "1.100.0",
"description": "Workflow Editor UI for n8n",
"main": "index.js",
"type": "module",
"scripts": {
"clean": "rimraf dist .turbo",
"build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
"typecheck": "vue-tsc --noEmit",
"typecheck:watch": "vue-tsc --watch --noEmit",
"dev": "pnpm serve",
"lint": "eslint src --ext .js,.ts,.vue --quiet",
"lintfix": "eslint src --ext .js,.ts,.vue --fix",
"lint": "eslint src --quiet",
"lintfix": "eslint src --fix",
"format": "biome format --write . && prettier --write . --ignore-path ../../../.prettierignore",
"format:check": "biome ci . && prettier --check . --ignore-path ../../../.prettierignore",
"serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vite --host 0.0.0.0 --port 8080 dev",
@@ -80,7 +81,7 @@
"qrcode.vue": "^3.3.4",
"stream-browserify": "^3.0.0",
"timeago.js": "^4.0.2",
"typescript": "catalog:frontend",
"typescript": "catalog:",
"uuid": "catalog:",
"v3-infinite-loading": "^1.2.2",
"vue": "catalog:frontend",
@@ -114,17 +115,17 @@
"@types/uuid": "catalog:",
"@vitejs/plugin-legacy": "^6.0.2",
"@vitejs/plugin-vue": "catalog:frontend",
"@vitest/coverage-v8": "catalog:frontend",
"@vitest/coverage-v8": "catalog:",
"browserslist-to-esbuild": "^2.1.1",
"fake-indexeddb": "^6.0.0",
"miragejs": "^0.1.48",
"unplugin-icons": "^0.19.0",
"unplugin-vue-components": "^0.27.2",
"vite": "catalog:frontend",
"vite": "catalog:",
"vite-plugin-static-copy": "2.2.0",
"vite-svg-loader": "5.1.0",
"vitest": "catalog:frontend",
"vitest-mock-extended": "catalog:frontend",
"vitest": "catalog:",
"vitest-mock-extended": "catalog:",
"vue-tsc": "catalog:frontend"
},
"peerDependencies": {

View File

@@ -1,6 +1,6 @@
<script setup>
import { ref, computed, watch } from 'vue';
// eslint-disable-next-line import/no-extraneous-dependencies
// eslint-disable-next-line import-x/no-extraneous-dependencies
import { ElSelect, ElOption, ElOptionGroup } from 'element-plus';
import { capitalCase } from 'change-case';
import { useI18n } from '@n8n/i18n';

View File

@@ -1,8 +0,0 @@
module.exports = {
env: {
mocha: true,
},
rules: {
strict: 'off',
},
};