yml linter, cleanup eslint (by filetype)

This commit is contained in:
Ulf Gebhardt 2023-11-17 17:12:42 +01:00
parent 4e54d703cd
commit 9a0ae2ac83
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
5 changed files with 94 additions and 28 deletions

View File

@ -6,7 +6,6 @@
"extends": [ "extends": [
"standard", "standard",
"eslint:recommended", "eslint:recommended",
"plugin:json/recommended-with-comments",
"plugin:@eslint-community/eslint-comments/recommended", "plugin:@eslint-community/eslint-comments/recommended",
"plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended",
"plugin:import/recommended", "plugin:import/recommended",
@ -14,7 +13,6 @@
"plugin:promise/recommended", "plugin:promise/recommended",
"plugin:security/recommended", "plugin:security/recommended",
"plugin:vue/vue3-recommended", "plugin:vue/vue3-recommended",
"plugin:vuetify/recommended",
"plugin:storybook/recommended", "plugin:storybook/recommended",
"plugin:prettier/recommended" "plugin:prettier/recommended"
], ],
@ -30,8 +28,7 @@
"promise", "promise",
"security", "security",
"vue", "vue",
"storybook", "storybook"
"json"
], ],
"settings": { "settings": {
"import/resolver": { "import/resolver": {
@ -123,12 +120,26 @@
"promise/no-multiple-resolved": "error" "promise/no-multiple-resolved": "error"
}, },
"overrides": [ "overrides": [
{
"files": ["*.json"],
"plugins": ["json"],
"extends": ["plugin:json/recommended-with-comments"]
},
{
"files": ["*.vue"],
"plugins": ["vuetify"],
"extends": ["plugin:vuetify/recommended"]
},
{ {
"files": ["**/*.test.[tj]s"], // or any other pattern "files": ["**/*.test.[tj]s"],
"plugins": ["vitest"], "plugins": ["vitest"],
"extends": [ "extends": ["plugin:vitest/all"]
"plugin:vitest/all" },
] {
} "files": ["*.yaml", "*.yml"],
"parser": "yaml-eslint-parser",
"plugins": ["yml"],
"extends": ["plugin:yml/prettier"]
}
] ]
} }

View File

@ -1,10 +1,8 @@
version: "3.4" version: '3.4'
services: services:
# ######################################################
########################################################
# FRONTEND ############################################# # FRONTEND #############################################
######################################################## # ######################################################
frontend: frontend:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: it4c/frontend:local-development image: it4c/frontend:local-development
@ -20,9 +18,9 @@ services:
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./:/app - ./:/app
######################################################## # ######################################################
# STORYBOOK ############################################ # STORYBOOK ############################################
######################################################## # ######################################################
storybook: storybook:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: it4c/frontend:local-storybook image: it4c/frontend:local-storybook
@ -40,9 +38,9 @@ services:
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./:/app - ./:/app
######################################################## # ######################################################
# DOCUMENTATIOn ######################################## # DOCUMENTATION ########################################
######################################################## # ######################################################
documentation: documentation:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: it4c/frontend:local-documentation image: it4c/frontend:local-documentation

View File

@ -2,9 +2,7 @@
# which defines the development settings. The override.yml is loaded by default. Therefore it # which defines the development settings. The override.yml is loaded by default. Therefore it
# is required to explicitly define if you want an production build: # is required to explicitly define if you want an production build:
# > docker-compose -f docker-compose.yml up # > docker-compose -f docker-compose.yml up
version: '3.4'
version: "3.4"
services: services:
frontend: frontend:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
@ -26,8 +24,8 @@ services:
# - BUILD_COMMIT="0000000" # - BUILD_COMMIT="0000000"
- NODE_ENV="production" - NODE_ENV="production"
# env_file: # env_file:
# - ./.env # - ./.env
# - ./frontend/.env # - ./frontend/.env
networks: networks:
external-net: external-net:

58
package-lock.json generated
View File

@ -59,6 +59,7 @@
"eslint-plugin-vitest": "^0.3.9", "eslint-plugin-vitest": "^0.3.9",
"eslint-plugin-vue": "^9.18.1", "eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vuetify": "^2.1.0", "eslint-plugin-vuetify": "^2.1.0",
"eslint-plugin-yml": "^1.10.0",
"happy-dom": "^12.10.3", "happy-dom": "^12.10.3",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"react": "^18.2.0", "react": "^18.2.0",
@ -11959,6 +11960,18 @@
"url": "https://opencollective.com/eslint" "url": "https://opencollective.com/eslint"
} }
}, },
"node_modules/eslint-compat-utils": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz",
"integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==",
"dev": true,
"engines": {
"node": ">=12"
},
"peerDependencies": {
"eslint": ">=6.0.0"
}
},
"node_modules/eslint-config-prettier": { "node_modules/eslint-config-prettier": {
"version": "9.0.0", "version": "9.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz",
@ -12632,6 +12645,51 @@
"vuetify": "^3.0.0" "vuetify": "^3.0.0"
} }
}, },
"node_modules/eslint-plugin-yml": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.10.0.tgz",
"integrity": "sha512-53SUwuNDna97lVk38hL/5++WXDuugPM9SUQ1T645R0EHMRCdBIIxGye/oOX2qO3FQ7aImxaUZJU/ju+NMUBrLQ==",
"dev": true,
"dependencies": {
"debug": "^4.3.2",
"eslint-compat-utils": "^0.1.0",
"lodash": "^4.17.21",
"natural-compare": "^1.4.0",
"yaml-eslint-parser": "^1.2.1"
},
"engines": {
"node": "^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ota-meshi"
},
"peerDependencies": {
"eslint": ">=6.0.0"
}
},
"node_modules/eslint-plugin-yml/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dev": true,
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/eslint-plugin-yml/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"node_modules/eslint-scope": { "node_modules/eslint-scope": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",

View File

@ -38,7 +38,7 @@
"server:prod": "cross-env NODE_ENV=production npm run server", "server:prod": "cross-env NODE_ENV=production npm run server",
"storybook": "storybook dev -p 6006", "storybook": "storybook dev -p 6006",
"storybook:build": "storybook build -o build/storybook", "storybook:build": "storybook build -o build/storybook",
"test:lint": "eslint --ext .vue,.ts,.tsx,.js,.jsx,.json --max-warnings 0 --ignore-path .gitignore .", "test:lint": "eslint --ext .vue,.ts,.tsx,.js,.jsx,.json,.yml,.yaml --max-warnings 0 --ignore-path .gitignore .",
"test:unit": "vitest", "test:unit": "vitest",
"test:unit:coverage": "npm run test:unit -- run --coverage", "test:unit:coverage": "npm run test:unit -- run --coverage",
"test": "npm run test:lint && npm run test:unit:coverage", "test": "npm run test:lint && npm run test:unit:coverage",
@ -96,6 +96,7 @@
"eslint-plugin-vitest": "^0.3.9", "eslint-plugin-vitest": "^0.3.9",
"eslint-plugin-vue": "^9.18.1", "eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vuetify": "^2.1.0", "eslint-plugin-vuetify": "^2.1.0",
"eslint-plugin-yml": "^1.10.0",
"happy-dom": "^12.10.3", "happy-dom": "^12.10.3",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"react": "^18.2.0", "react": "^18.2.0",