chore: replace standard with prettier

This commit is contained in:
axolotle 2024-02-24 17:54:16 +01:00
parent d5c91135bb
commit fb0ec742f5
4 changed files with 29 additions and 26 deletions

View file

@ -7,32 +7,12 @@ module.exports = {
extends: [ extends: [
'plugin:vue/strongly-recommended', 'plugin:vue/strongly-recommended',
'eslint:recommended', 'eslint:recommended',
'standard' 'plugin:prettier/recommended',
], ],
rules: { 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': [ 'no-unused-vars': [
'warn', 'warn',
{ varsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' } { varsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
], ],
quotes: 'warn', },
'no-multiple-empty-lines': [
'error',
{
max: 2
}
]
}
} }

1
app/.prettierignore Normal file
View file

@ -0,0 +1 @@
dist/

19
app/.prettierrc Normal file
View file

@ -0,0 +1,19 @@
{
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"overrides": [
{
"files": "**/*.json",
"options": {
"tabWidth": 4
}
},
{
"files": "./*.json",
"options": {
"tabWidth": 2
}
}
]
}

View file

@ -7,8 +7,10 @@
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"lint": "eslint --ext .js,.vue src", "lint:js": "eslint --ext \".ts,.vue,.cjs,.js\" --ignore-path ../.gitignore .",
"lint-fix": "lint --fix" "lint:prettier": "prettier --check .",
"lint": "npm run lint:js && npm run lint:prettier",
"lintfix": "prettier --write --list-different . && npm run lint:js --fix"
}, },
"dependencies": { "dependencies": {
"@fontsource/fira-code": "^4.5.13", "@fontsource/fira-code": "^4.5.13",
@ -28,11 +30,12 @@
"@vitejs/plugin-vue2": "^2.2.0", "@vitejs/plugin-vue2": "^2.2.0",
"bootstrap": "^4.6.0", "bootstrap": "^4.6.0",
"eslint": "^8.36.0", "eslint": "^8.36.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.10.0", "eslint-plugin-vue": "^9.10.0",
"popper.js": "^1.16.0", "popper.js": "^1.16.0",
"portal-vue": "^2.1.7", "portal-vue": "^2.1.7",
"sass": "^1.60.0", "sass": "^1.60.0",
"standard": "^17.0.0",
"vite": "^4.2.1" "vite": "^4.2.1"
}, },
"browserslist": [ "browserslist": [