Set up eslint

This commit is contained in:
Joscha 2025-02-10 14:49:52 +01:00
parent 447bcf39a7
commit 92f5e37a4c
5 changed files with 1044 additions and 2 deletions

21
gdn-app/eslint.config.js Normal file
View file

@ -0,0 +1,21 @@
// https://eslint.org/docs/latest/use/configure/
// https://eslint.vuejs.org/user-guide/
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";
import configPrettier from "eslint-config-prettier";
export default tseslint.config(
{ ignores: ["dist/", "src/vite-env.d.ts"] },
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...pluginVue.configs["flat/recommended"],
// We don't want prettier's formatting decisions being second-guessed by eslint.
configPrettier,
// We need to tell the vue parser that it should use the ts parser instead of the js parser.
{ files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser } } },
);