add eslint and bun

This commit is contained in:
notohh 2025-01-31 00:03:44 -05:00
parent be233e668e
commit ebb8d1688c
Signed by: notohh
GPG key ID: BD47506D475EE86D
6 changed files with 42 additions and 1088 deletions

View file

@ -6,7 +6,6 @@ const config = {
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
};

BIN
bun.lockb Executable file

Binary file not shown.

31
eslint.config.js Normal file
View file

@ -0,0 +1,31 @@
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser,
},
},
}
);

View file

@ -35,7 +35,7 @@
packages = with pkgsFor.${system}; [
nil
alejandra
nodejs_23
bun
svelte-language-server
gh-markdown-preview
];

1085
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,20 +9,29 @@
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint ./ & npx depcheck",
"lint:fix": "eslint ./src --fix"
},
"devDependencies": {
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.19.0",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/kit": "^2.16.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tailwindcss/vite": "^4.0.1",
"@typescript-eslint/parser": "^8.22.0",
"autoprefixer": "^10.4.20",
"daisyui": "^5.0.0-beta.6",
"eslint-plugin-svelte": "^2.46.1",
"prettier": "^3.4.2",
"prettier-eslint": "^16.3.0",
"svelte": "^5.19.6",
"svelte-check": "^4.1.4",
"tailwindcss": "^4.0.1",
"tailwindcss-motion": "^1.0.1",
"typescript": "^5.7.3",
"typescript-eslint": "^8.22.0",
"vite": "^6.0.11"
}
}