Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/frontend_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v5.0.0
with:
version: 8.14.0
version: 10.24.0
working-directory: ./frontend

- name: Install dependencies
Expand Down
36 changes: 0 additions & 36 deletions frontend/.eslintrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2023 Marlon W (Mawoka)
#
# SPDX-License-Identifier: MPL-2.0

.gitignore
src/lib/i18n/locales/*.json
pnpm-lock.yaml
src/app.html
88 changes: 88 additions & 0 deletions frontend/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// SPDX-FileCopyrightText: 2023 Marlon W (Mawoka)
//
// SPDX-License-Identifier: MPL-2.0

const { defineConfig, globalIgnores } = require('eslint/config');

const tsParser = require('@typescript-eslint/parser');
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
const globals = require('globals');
const js = require('@eslint/js');
const svelte = require('eslint-plugin-svelte');

module.exports = defineConfig([
js.configs.recommended,
svelte.configs.recommended,
globalIgnores(['**/*.cjs', 'src/app.html']),
{
languageOptions: {
sourceType: 'module',
ecmaVersion: 2020,

globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.{ts,js}'],
languageOptions: {
parser: tsParser
},

plugins: {
'@typescript-eslint': typescriptEslint
},

rules: {
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_.*'
}
],

'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_.*'
}
]
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: tsParser,
extraFileExtensions: ['.svelte']
}
}
},
{
files: ['**/*.svelte', '**/*.ts', '**/*.js'],

rules: {
'a11y-click-events-have-key-events': 'off',
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_.*'
}
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_.*'
}
],
'svelte/no-at-html-tags': 'warn',
'svelte/require-each-key': 'warn'
},

plugins: {
'@typescript-eslint': typescriptEslint
}
}
]);
8 changes: 5 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . '!src/lib/i18n/locales/*.json' '!pnpm-lock.yaml' '!src/app.html' && eslint --ignore-path .gitignore .",
"lint-without-format-checking": "eslint --ignore-path .gitignore .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. . '!src/lib/i18n/locales/*.json'",
"lint": "prettier --check --plugin-search-dir=. . '!src/lib/i18n/locales/*.json' '!pnpm-lock.yaml' '!src/app.html' && eslint .",
"lint-without-format-checking": "eslint .",
"format": "prettier --write --plugin-search-dir=. . '!src/lib/i18n/locales/*.json'",
"run:prod": "node index.js",
"translations-scan": "i18next-scanner --config i18next-scanner.config.engine.cjs src/**/*.svelte"
},
Expand Down Expand Up @@ -58,6 +58,7 @@
"dompurify": "^3.3.0",
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.17.0",
"felte": "^1.3.0",
"fuse.js": "^7.1.0",
"highlight.js": "^11.11.1",
Expand All @@ -82,6 +83,7 @@
"socket.io-client": "^4.8.1",
"svelte": "^5.42.2",
"svelte-check": "^4.3.3",
"svelte-eslint-parser": "^1.6.0",
"svelte-preprocess": "^6.0.3",
"svelte-range-slider-pips": "^4.1.0",
"svelte-tippy": "^1.3.2",
Expand Down
Loading
Loading