[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Update eslint config to support .svelte.ts

Kasper (Jul 4, 2025, 8:07 AM +0200) bead8238 532a7607

+60 -18
+22 -15
eslint.config.mjs
··· 1 + import prettier from 'eslint-config-prettier' 2 + import { includeIgnoreFile } from '@eslint/compat' 1 3 import js from '@eslint/js' 2 - import ts from 'typescript-eslint' 3 4 import svelte from 'eslint-plugin-svelte' 4 - import prettier from 'eslint-config-prettier' 5 5 import globals from 'globals' 6 + import { fileURLToPath } from 'node:url' 7 + import ts from 'typescript-eslint' 8 + import svelteConfig from './svelte.config.mjs' 6 9 7 - /** @type {import('eslint').Linter.Config[]} */ 8 - export default [ 10 + const gitignore_path = fileURLToPath(new URL('./.gitignore', import.meta.url)) 11 + 12 + export default ts.config( 13 + includeIgnoreFile(gitignore_path), 9 14 js.configs.recommended, 10 15 ...ts.configs.recommended, 11 - ...svelte.configs['flat/recommended'], 16 + ...svelte.configs.recommended, 12 17 prettier, 13 - ...svelte.configs['flat/prettier'], 18 + ...svelte.configs.prettier, 14 19 { 15 20 languageOptions: { 16 - globals: { 17 - ...globals.browser, 18 - ...globals.node, 19 - }, 21 + globals: { ...globals.browser, ...globals.node }, 22 + }, 23 + rules: { 24 + // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. 25 + // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors 26 + 'no-undef': 'off', 20 27 }, 21 28 }, 22 29 { 23 - files: ['**/*.svelte'], 30 + files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], 24 31 languageOptions: { 25 32 parserOptions: { 33 + projectService: true, 34 + extraFileExtensions: ['.svelte'], 26 35 parser: ts.parser, 36 + svelteConfig, 27 37 }, 28 38 }, 29 - }, 30 - { 31 - ignores: ['build/', '.svelte-kit/', 'dist/'], 32 39 }, 33 40 { 34 41 rules: { ··· 64 71 'svelte/require-each-key': 'off', // Unnecessary each key probably has performance downside 65 72 }, 66 73 }, 67 - ] 74 + )
+36 -3
package-lock.json
··· 8 8 "name": "ferrum", 9 9 "version": "0.19.8", 10 10 "devDependencies": { 11 + "@eslint/compat": "^1.3.1", 12 + "@eslint/js": "^9.30.1", 11 13 "@napi-rs/cli": "^2.18.4", 12 14 "@sveltejs/vite-plugin-svelte": "^5.1.0", 13 15 "@tailwindcss/vite": "^4.1.8", ··· 1123 1125 "node": "^12.0.0 || ^14.0.0 || >=16.0.0" 1124 1126 } 1125 1127 }, 1128 + "node_modules/@eslint/compat": { 1129 + "version": "1.3.1", 1130 + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.3.1.tgz", 1131 + "integrity": "sha512-k8MHony59I5EPic6EQTCNOuPoVBnoYXkP+20xvwFjN7t0qI3ImyvyBgg+hIVPwC8JaxVjjUZld+cLfBLFDLucg==", 1132 + "dev": true, 1133 + "license": "Apache-2.0", 1134 + "engines": { 1135 + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 1136 + }, 1137 + "peerDependencies": { 1138 + "eslint": "^8.40 || 9" 1139 + }, 1140 + "peerDependenciesMeta": { 1141 + "eslint": { 1142 + "optional": true 1143 + } 1144 + } 1145 + }, 1126 1146 "node_modules/@eslint/config-array": { 1127 1147 "version": "0.20.0", 1128 1148 "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", ··· 1234 1254 } 1235 1255 }, 1236 1256 "node_modules/@eslint/js": { 1237 - "version": "9.28.0", 1238 - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", 1239 - "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", 1257 + "version": "9.30.1", 1258 + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz", 1259 + "integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==", 1240 1260 "dev": true, 1241 1261 "license": "MIT", 1242 1262 "engines": { ··· 4988 5008 }, 4989 5009 "funding": { 4990 5010 "url": "https://opencollective.com/eslint" 5011 + } 5012 + }, 5013 + "node_modules/eslint/node_modules/@eslint/js": { 5014 + "version": "9.28.0", 5015 + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", 5016 + "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", 5017 + "dev": true, 5018 + "license": "MIT", 5019 + "engines": { 5020 + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 5021 + }, 5022 + "funding": { 5023 + "url": "https://eslint.org/donate" 4991 5024 } 4992 5025 }, 4993 5026 "node_modules/eslint/node_modules/brace-expansion": {
+2
package.json
··· 67 67 "name": "addon" 68 68 }, 69 69 "devDependencies": { 70 + "@eslint/compat": "^1.3.1", 71 + "@eslint/js": "^9.30.1", 70 72 "@napi-rs/cli": "^2.18.4", 71 73 "@sveltejs/vite-plugin-svelte": "^5.1.0", 72 74 "@tailwindcss/vite": "^4.1.8",