diff --git a/app/.eslintrc.js b/app/.eslintrc.js index 3e4cbdce..c2b207aa 100644 --- a/app/.eslintrc.js +++ b/app/.eslintrc.js @@ -7,32 +7,12 @@ module.exports = { extends: [ 'plugin:vue/strongly-recommended', 'eslint:recommended', - 'standard' + 'plugin:prettier/recommended', ], rules: { - 'vue/max-attributes-per-line': [ - 'error', - { - singleline: 3, - multiline: 3 - } - ], - 'vue/multi-word-component-names': 'off', // FIXME this should be adressed at some point - 'no-console': 'warn', - 'template-curly-spacing': 'off', - camelcase: 'warn', - indent: 'off', - 'no-irregular-whitespace': 'off', 'no-unused-vars': [ 'warn', - { varsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' } + { varsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }, ], - quotes: 'warn', - 'no-multiple-empty-lines': [ - 'error', - { - max: 2 - } - ] - } + }, } diff --git a/app/.prettierignore b/app/.prettierignore new file mode 100644 index 00000000..849ddff3 --- /dev/null +++ b/app/.prettierignore @@ -0,0 +1 @@ +dist/ diff --git a/app/.prettierrc b/app/.prettierrc new file mode 100644 index 00000000..ad7671ce --- /dev/null +++ b/app/.prettierrc @@ -0,0 +1,19 @@ +{ + "semi": false, + "tabWidth": 2, + "singleQuote": true, + "overrides": [ + { + "files": "**/*.json", + "options": { + "tabWidth": 4 + } + }, + { + "files": "./*.json", + "options": { + "tabWidth": 2 + } + } + ] +} diff --git a/app/package.json b/app/package.json index 6f6b06ad..9c044232 100644 --- a/app/package.json +++ b/app/package.json @@ -7,8 +7,10 @@ "scripts": { "dev": "vite", "build": "vite build", - "lint": "eslint --ext .js,.vue src", - "lint-fix": "lint --fix" + "lint:js": "eslint --ext \".ts,.vue,.cjs,.js\" --ignore-path ../.gitignore .", + "lint:prettier": "prettier --check .", + "lint": "npm run lint:js && npm run lint:prettier", + "lintfix": "prettier --write --list-different . && npm run lint:js --fix" }, "dependencies": { "@fontsource/fira-code": "^4.5.13", @@ -28,11 +30,12 @@ "@vitejs/plugin-vue2": "^2.2.0", "bootstrap": "^4.6.0", "eslint": "^8.36.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-vue": "^9.10.0", "popper.js": "^1.16.0", "portal-vue": "^2.1.7", "sass": "^1.60.0", - "standard": "^17.0.0", "vite": "^4.2.1" }, "browserslist": [