diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index 486343ef..5b98d833 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -7,16 +7,18 @@ on: # Triggers the workflow on push or pull request events but only for the develop branch push: branches: [develop] - pull_request: - branches: - - '*' + pull_request_target: + types: [synchronize, opened] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +permissions: + checks: write # Needed to write annotations + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - style: + init_style_jobs: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -24,6 +26,8 @@ jobs: steps: - name: Fetch repo uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Install node uses: actions/setup-node@v2 @@ -40,4 +44,3 @@ jobs: prettier: true eslint_dir: src eslint_extensions: ts,vue - prettier_dir: src diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..69125b33 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +package-lock.json +dist/ +public/ +components.d.ts \ No newline at end of file diff --git a/cypress.json b/cypress.json index fe9238de..fa9bfa9c 100644 --- a/cypress.json +++ b/cypress.json @@ -1,3 +1,3 @@ { - "baseUrl": "http://localhost:4173" + "baseUrl": "http://localhost:4173" } diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json index 02e42543..519902d7 100644 --- a/cypress/fixtures/example.json +++ b/cypress/fixtures/example.json @@ -1,5 +1,5 @@ { - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" } diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 59b2bab6..fe51f29d 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -17,6 +17,6 @@ */ // eslint-disable-next-line no-unused-vars module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config } diff --git a/package-lock.json b/package-lock.json index 4068642e..c192fab1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4937,9 +4937,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz", + "integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -5548,6 +5548,20 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -8410,9 +8424,9 @@ } }, "node_modules/vite": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.8.1.tgz", - "integrity": "sha512-Typ8qjUnW0p53gBsJpisrKcZlEbUPZATja9BG6Z09QZjg9YrnEn/htkr/VH4WhnH7eNUQeSD+wKI1lHzQRWskw==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.8.4.tgz", + "integrity": "sha512-GwtOkkaT2LDI82uWZKcrpRQxP5tymLnC7hVHHqNkhFNknYr0hJUlDLfhVRgngJvAy3RwypkDCWtTKn1BjO96Dw==", "dev": true, "dependencies": { "esbuild": "^0.14.14", @@ -13126,9 +13140,9 @@ } }, "eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz", + "integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==", "dev": true, "requires": {} }, @@ -13457,6 +13471,13 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -15537,9 +15558,9 @@ } }, "vite": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.8.1.tgz", - "integrity": "sha512-Typ8qjUnW0p53gBsJpisrKcZlEbUPZATja9BG6Z09QZjg9YrnEn/htkr/VH4WhnH7eNUQeSD+wKI1lHzQRWskw==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.8.4.tgz", + "integrity": "sha512-GwtOkkaT2LDI82uWZKcrpRQxP5tymLnC7hVHHqNkhFNknYr0hJUlDLfhVRgngJvAy3RwypkDCWtTKn1BjO96Dw==", "dev": true, "requires": { "esbuild": "^0.14.14", diff --git a/package.json b/package.json index 97d946e6..0846286d 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "serve": "vite serve", "build": "vite build && npm run build.zip", "format": "npm run format:base -- --write", - "format:base": "prettier .prettierrc src vite.config.ts package.json public/manifest.json .eslintrc.json .github/ index.html *.yml *.md", + "format:base": "prettier .", "format:check": "npm run format:base -- --check", "lint": "eslint --ext .ts,.vue --ignore-path .gitignore src", "lint:fix": "eslint --ext .ts,.vue --ignore-path .gitignore src --fix", diff --git a/src/locales/de.json b/src/locales/de.json index 3b603411..982a0015 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -80,10 +80,10 @@ "DescriptionPreviouslyThrottled": "rPI ARM-Kern(e) wurde(n) seit dem letzten Einschalten mindestens einmal gedrosselt.", "DescriptionPreviouslyTemperatureLimited": "Die Temperatur des rPi uC (nur 3A+/3B+) lag seit dem letzten Einschalten mindestens einmal über dem Soft-Limit (Standard 60C)." }, - "NumberInput":{ - "NoEmptyAllowedError" : "Feld darf nicht leer sein!", - "GreaterOrEqualError" : "Muss größer oder gleich {min} sein!", - "MustBeBetweenError" : "Muss zwischen {min} und {max} liegen!" + "NumberInput": { + "NoEmptyAllowedError": "Feld darf nicht leer sein!", + "GreaterOrEqualError": "Muss größer oder gleich {min} sein!", + "MustBeBetweenError": "Muss zwischen {min} und {max} liegen!" } }, "EmergencyStopDialog": { diff --git a/src/locales/en.json b/src/locales/en.json index 007565e6..76016f19 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -80,10 +80,10 @@ "DescriptionPreviouslyThrottled": "rPI ARM core(s) where throttled down at least once since last power-on.", "DescriptionPreviouslyTemperatureLimited": "rPi uC (3A+/3B+ only) temperature was at least once above the soft limit (default 60C) since last power-on." }, - "NumberInput":{ - "NoEmptyAllowedError" : "Input must not be empty!", - "GreaterOrEqualError" : "Must be grater or equal than {min}!", - "MustBeBetweenError" : "Must be between {min} and {max}!" + "NumberInput": { + "NoEmptyAllowedError": "Input must not be empty!", + "GreaterOrEqualError": "Must be grater or equal than {min}!", + "MustBeBetweenError": "Must be between {min} and {max}!" } }, "EmergencyStopDialog": { diff --git a/tsconfig.json b/tsconfig.json index 17a3cc6c..420ce6c7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,50 +1,39 @@ { - "compilerOptions": { - "target": "esnext", - "module": "esnext", - "strict": true, - "jsx": "preserve", - "importHelpers": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "sourceMap": true, - "baseUrl": ".", - "types": [ - "cypress", - "vite/client", - "vuetify", - "@intlify/vite-plugin-vue-i18n/client", - "vite-plugin-pwa/client" - ], - "paths": { - "@/*": [ - "src/*" - ] + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "strict": true, + "jsx": "preserve", + "importHelpers": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "sourceMap": true, + "baseUrl": ".", + "types": [ + "cypress", + "vite/client", + "vuetify", + "@intlify/vite-plugin-vue-i18n/client", + "vite-plugin-pwa/client" + ], + "paths": { + "@/*": ["src/*"] + }, + "lib": ["esnext", "dom", "dom.iterable", "scripthost"], + "typeRoots": ["./node_modules/vuetify/types"] }, - "lib": [ - "esnext", - "dom", - "dom.iterable", - "scripthost" + "include": [ + "components.d.ts", + "src/main.ts", + "src/*/*.ts", + "src/**/*.tsx", + "src/**/*.vue", + "cypress/**/*.ts", + "tests/**/*.ts", + "tests/**/*.tsx" ], - "typeRoots": [ - "./node_modules/vuetify/types" - ] - }, - "include": [ - "components.d.ts", - "src/main.ts", - "src/*/*.ts", - "src/**/*.tsx", - "src/**/*.vue", - "cypress/**/*.ts", - "tests/**/*.ts", - "tests/**/*.tsx" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file + "exclude": ["node_modules"] +} diff --git a/vue-i18n-extract.config.js b/vue-i18n-extract.config.js index 0827f162..c8f44980 100644 --- a/vue-i18n-extract.config.js +++ b/vue-i18n-extract.config.js @@ -4,6 +4,6 @@ module.exports = { options: { output: false, add: false, - dynamic: true - } -} \ No newline at end of file + dynamic: true, + }, +}