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": [
"standard",
"eslint:recommended",
"plugin:json/recommended-with-comments",
"plugin:@eslint-community/eslint-comments/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
@ -14,7 +13,6 @@
"plugin:promise/recommended",
"plugin:security/recommended",
"plugin:vue/vue3-recommended",
"plugin:vuetify/recommended",
"plugin:storybook/recommended",
"plugin:prettier/recommended"
],
@ -30,8 +28,7 @@
"promise",
"security",
"vue",
"storybook",
"json"
"storybook"
],
"settings": {
"import/resolver": {
@ -123,12 +120,26 @@
"promise/no-multiple-resolved": "error"
},
"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"],
"extends": [
"plugin:vitest/all"
]
}
"extends": ["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:
########################################################
# ######################################################
# 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
image: it4c/frontend:local-development
@ -20,9 +18,9 @@ services:
# bind the local folder to the docker to allow live reload
- ./:/app
########################################################
# ######################################################
# 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
image: it4c/frontend:local-storybook
@ -40,9 +38,9 @@ services:
# bind the local folder to the docker to allow live reload
- ./:/app
########################################################
# 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
image: it4c/frontend:local-documentation
@ -63,4 +61,4 @@ services:
volumes:
frontend_node_modules:
storybook_node_modules:
documentation_node_modules:
documentation_node_modules:

View File

@ -1,10 +1,8 @@
# This file defines the production settings. It is overwritten by docker-compose.override.yml,
# 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:
# > docker-compose -f docker-compose.yml up
version: "3.4"
# > docker-compose -f docker-compose.yml up
version: '3.4'
services:
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
@ -26,10 +24,10 @@ services:
# - BUILD_COMMIT="0000000"
- NODE_ENV="production"
# env_file:
# - ./.env
# - ./frontend/.env
# - ./.env
# - ./frontend/.env
networks:
external-net:
internal-net:
internal: true
internal: true

58
package-lock.json generated
View File

@ -59,6 +59,7 @@
"eslint-plugin-vitest": "^0.3.9",
"eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vuetify": "^2.1.0",
"eslint-plugin-yml": "^1.10.0",
"happy-dom": "^12.10.3",
"prettier": "^3.1.0",
"react": "^18.2.0",
@ -11959,6 +11960,18 @@
"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": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz",
@ -12632,6 +12645,51 @@
"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": {
"version": "5.1.1",
"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",
"storybook": "storybook dev -p 6006",
"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:coverage": "npm run test:unit -- run --coverage",
"test": "npm run test:lint && npm run test:unit:coverage",
@ -96,6 +96,7 @@
"eslint-plugin-vitest": "^0.3.9",
"eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vuetify": "^2.1.0",
"eslint-plugin-yml": "^1.10.0",
"happy-dom": "^12.10.3",
"prettier": "^3.1.0",
"react": "^18.2.0",