mirror of
https://github.com/YunoHost/yunohost-portal.git
synced 2024-09-03 20:06:23 +02:00
add eslint + prettier
This commit is contained in:
parent
f3eaa9fbaf
commit
61c57b876e
2 changed files with 34 additions and 2 deletions
21
.eslintrc.cjs
Normal file
21
.eslintrc.cjs
Normal file
|
@ -0,0 +1,21 @@
|
|||
module.exports = {
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/strongly-recommended',
|
||||
'@nuxtjs/eslint-config-typescript',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
rules: {
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
semi: false,
|
||||
tabWidth: 2,
|
||||
singleQuote: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
15
package.json
15
package.json
|
@ -5,14 +5,25 @@
|
|||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
"postinstall": "nuxt prepare",
|
||||
"lint:js": "eslint --ext \".ts,.vue\" --ignore-path .gitignore .",
|
||||
"lint:prettier": "prettier --check .",
|
||||
"lint": "yarn lint:js && yarn lint:prettier",
|
||||
"lintfix": "prettier --write --list-different . && yarn lint:js --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/devtools": "latest",
|
||||
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
||||
"@nuxtjs/google-fonts": "^3.0.1",
|
||||
"@nuxtjs/tailwindcss": "^5.3.5",
|
||||
"@types/node": "^18.16.19",
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"nuxt": "^3.6.2",
|
||||
"nuxt-icon": "^0.4.2"
|
||||
"nuxt-icon": "^0.4.2",
|
||||
"prettier": "^3.0.0",
|
||||
"typescript": "^5.1.6"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue