diff --git a/.eslintrc.js b/.eslintrc.js index 1fc0f23210..41a60d1f4b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,7 +22,7 @@ module.exports = { modules: true, }, }, - plugins: ['@typescript-eslint', 'import'], + plugins: ['@typescript-eslint', 'import', 'svelte3'], rules: { 'linebreak-style': ['error', 'unix'], quotes: ['error', 'single', { avoidEscape: true }], @@ -48,4 +48,16 @@ module.exports = { }, ], }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + }, + rules: { + 'no-inner-declarations': 0, + }, + }, + ], }; diff --git a/package.json b/package.json index 69a28546cf..b7a4ef0a8a 100644 --- a/package.json +++ b/package.json @@ -67,9 +67,11 @@ "@floating-ui/dom": "^1.5.3", "boon-js": "^2.0.4", "chrono-node": "2.3.9", + "eslint-plugin-svelte3": "^4.0.0", "eventemitter2": "^6.4.5", "mustache": "^4.2.0", "mustache-validator": "^0.2.0", - "rrule": "^2.7.2" + "rrule": "^2.7.2", + "svelte-eslint-parser": "^0.33.1" } } diff --git a/src/ui/DateEditor.svelte b/src/ui/DateEditor.svelte index 5376022e9c..a4bf54a2db 100644 --- a/src/ui/DateEditor.svelte +++ b/src/ui/DateEditor.svelte @@ -1,4 +1,4 @@ -