From 7c01de48ae9d259b194bd6bad35dc5bb30bbd568 Mon Sep 17 00:00:00 2001 From: lorenzo-pomili Date: Fri, 3 Nov 2023 07:39:12 +0100 Subject: [PATCH] INT-3242: [TEST] fix linter --- .eslintrc.js | 21 +++-- package.json | 5 +- src/main/component/Editor.svelte | 32 +++++--- yarn.lock | 127 +++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 28 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 431697f..e6db741 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,5 @@ module.exports = { - parser: '@typescript-eslint/parser', - plugins: ['svelte3', '@typescript-eslint'], + env: { browser: true, node: true @@ -8,11 +7,13 @@ module.exports = { overrides: [ { files: ['*.svelte'], - processor: 'svelte3/svelte3', + parser: 'svelte-eslint-parser', extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking'], parserOptions: { - project: 'tsconfig.json', - sourceType: 'module' + project: './tsconfig.json', + sourceType: 'module', + parser: '@typescript-eslint/parser', + extraFileExtensions: ['.svelte'] }, rules: { "eqeqeq": "error" @@ -26,12 +27,10 @@ module.exports = { sourceType: "module" }, rules: { - "@tinymce/prefer-fun": "off" + "@tinymce/prefer-fun": "off", + "@typescript-eslint/no-duplicate-imports": "off", + "@typescript-eslint/no-parameter-properties": "off" } } - ], - settings: { - 'svelte3/typescript': () => require('typescript'), - 'svelte3/typescript': true - } + ] } \ No newline at end of file diff --git a/package.json b/package.json index 3e1feba..8c75945 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,8 @@ "@tinymce/beehive-flow": "^0.19.0", "@tinymce/eslint-plugin": "^1.9.2", "@tsconfig/svelte": "^2.0.0", - "@typescript-eslint/eslint-plugin": "^4.29.2", - "@typescript-eslint/parser": "^4.29.2", + "@typescript-eslint/eslint-plugin": "^6.9.0", + "@typescript-eslint/parser": "^6.9.0", "babel-loader": "^8.2.2", "eslint": "^7.32.0", "eslint-plugin-svelte": "^2.34.0", @@ -69,6 +69,7 @@ "svelte-check": "^3.4.3", "svelte-loader": "^3.1.8", "svelte-preprocess": "^5.0.3", + "tinymce": "^6.7.2", "tslib": "^2.3.1", "typescript": "^5.0.0", "webpack": "^5.76.2" diff --git a/src/main/component/Editor.svelte b/src/main/component/Editor.svelte index 1212b1b..74941a0 100644 --- a/src/main/component/Editor.svelte +++ b/src/main/component/Editor.svelte @@ -1,16 +1,30 @@