DIO-5 Added ESLint and Prettier to project

This commit is contained in:
Liviu Burcusel 2025-10-19 17:07:14 +02:00
parent 1dece38124
commit 1e9d4e9104
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
4 changed files with 1584 additions and 11 deletions

9
.prettierrc.json Normal file
View file

@ -0,0 +1,9 @@
{
"useTabs": false,
"tabWidth": 2,
"printWidth": 128,
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"arrowParens": "avoid"
}

29
eslint.config.js Normal file
View file

@ -0,0 +1,29 @@
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginVue from "eslint-plugin-vue";
import globals from "globals";
import typescriptEslint from "typescript-eslint";
export default typescriptEslint.config(
{ ignores: ["*.d.ts", "**/coverage", "**/dist"] },
{
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs["flat/recommended"],
],
files: ["**/*.{ts,vue}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: globals.browser,
parserOptions: {
parser: typescriptEslint.parser,
},
},
rules: {
// your rules
},
},
eslintConfigPrettier
);

1547
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,9 @@
"test": "vitest run",
"coverage": "vitest run --coverage",
"build-only": "vite build",
"type-check": "vue-tsc --build"
"type-check": "vue-tsc --build",
"lint": "eslint \"**/*.{vue,ts}\"",
"lint-files": "eslint --ext .js,.ts,.vue"
},
"dependencies": {
"@mdi/font": "^7.4.47",
@ -30,11 +32,17 @@
"@vitest/coverage-v8": "^3.2.4",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.7.0",
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-vue": "^10.5.1",
"globals": "^16.4.0",
"happy-dom": "^20.0.5",
"npm-run-all2": "^8.0.4",
"prettier": "3.6.2",
"resize-observer-polyfill": "^1.5.1",
"sass-embedded": "^1.92.1",
"typescript": "~5.8.0",
"typescript-eslint": "^8.46.1",
"vite": "^7.0.6",
"vite-plugin-vue-devtools": "^8.0.0",
"vitest": "^3.2.4",