Set up eslint

This commit is contained in:
Joscha 2025-03-02 18:37:53 +01:00
parent 4c8a22368d
commit de4574f938
3 changed files with 1044 additions and 2 deletions

1013
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
import eslint from "@eslint/js";
import prettier from "eslint-config-prettier";
import vue from "eslint-plugin-vue";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{ files: ["**/*.{js,mjs,cjs,ts,vue}"] },
{ ignores: ["dist/"] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
eslint.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
...vue.configs["flat/recommended"],
prettier,
{
files: ["**/*.vue"],
languageOptions: { parserOptions: { parser: tseslint.parser } },
},
);

View file

@ -5,17 +5,23 @@
"type": "module",
"scripts": {
"dev": "vite",
"check": "vue-tsc -b",
"build": "vue-tsc -b && vite build",
"check": "vue-tsc -b && eslint",
"build": "pnpm check && vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.13"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/tsconfig": "^0.7.0",
"eslint": "^9.21.0",
"eslint-config-prettier": "^10.0.2",
"eslint-plugin-vue": "^9.32.0",
"globals": "^16.0.0",
"typescript": "~5.7.3",
"typescript-eslint": "^8.25.0",
"vite": "^6.2.0",
"vite-plugin-vue-devtools": "^7.7.2",
"vue-tsc": "^2.2.8"