Max ESLint warnings 0 (#4158)

* Fix ESLint warnings. Update workflows. 0 ESLint warnings for auto-test

* json-yaml-validate: Fix `unable to find version `v2``
This commit is contained in:
Adam Stachowicz 2023-12-04 10:19:18 +00:00 committed by GitHub
parent 9c56c9b346
commit 74a908a069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 19 deletions

View file

@ -78,7 +78,7 @@ module.exports = {
"checkLoops": false, "checkLoops": false,
}], }],
"space-before-blocks": "warn", "space-before-blocks": "warn",
//'no-console': 'warn', //"no-console": "warn",
"no-extra-boolean-cast": "off", "no-extra-boolean-cast": "off",
"no-multiple-empty-lines": [ "warn", { "no-multiple-empty-lines": [ "warn", {
"max": 1, "max": 1,
@ -90,7 +90,8 @@ module.exports = {
"no-unneeded-ternary": "error", "no-unneeded-ternary": "error",
"array-bracket-newline": [ "error", "consistent" ], "array-bracket-newline": [ "error", "consistent" ],
"eol-last": [ "error", "always" ], "eol-last": [ "error", "always" ],
//'prefer-template': 'error', //"prefer-template": "error",
"template-curly-spacing": [ "warn", "never" ],
"comma-dangle": [ "warn", "only-multiline" ], "comma-dangle": [ "warn", "only-multiline" ],
"no-empty": [ "error", { "no-empty": [ "error", {
"allowEmptyCatch": true "allowEmptyCatch": true

View file

@ -27,10 +27,10 @@ jobs:
steps: steps:
- run: git config --global core.autocrlf false # Mainly for Windows - run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }} - name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- run: npm install npm@9 -g - run: npm install npm@9 -g
@ -55,10 +55,10 @@ jobs:
steps: steps:
- run: git config --global core.autocrlf false # Mainly for Windows - run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }} - name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- run: npm install npm@9 -g - run: npm install npm@9 -g
@ -69,24 +69,24 @@ jobs:
steps: steps:
- run: git config --global core.autocrlf false # Mainly for Windows - run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Use Node.js 14 - name: Use Node.js 14
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 14 node-version: 14
- run: npm install - run: npm install
- run: npm run lint - run: npm run lint:prod
e2e-tests: e2e-tests:
needs: [ check-linters ] needs: [ check-linters ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: git config --global core.autocrlf false # Mainly for Windows - run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Use Node.js 14 - name: Use Node.js 14
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 14 node-version: 14
- run: npm install - run: npm install
@ -98,10 +98,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: git config --global core.autocrlf false # Mainly for Windows - run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Use Node.js 14 - name: Use Node.js 14
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 14 node-version: 14
- run: npm install - run: npm install

View file

@ -14,10 +14,10 @@ jobs:
node-version: [16] node-version: [16]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'

View file

@ -6,7 +6,7 @@ on:
pull_request: pull_request:
branches: branches:
- master - master
- 2.0.X - 1.23.X
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@ -17,11 +17,11 @@ jobs:
json-yaml-validate: json-yaml-validate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: json-yaml-validate - name: json-yaml-validate
id: json-yaml-validate id: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v1.3.0 uses: GrantBirki/json-yaml-validate@v2.4.0
with: with:
comment: "true" # enable comment mode comment: "true" # enable comment mode
exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions

View file

@ -9,7 +9,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v7 - uses: actions/stale@v8
with: with:
stale-issue-message: 'We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.' stale-issue-message: 'We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.'
close-issue-message: 'This issue was closed because it has been stalled for 2 days with no activity.' close-issue-message: 'This issue was closed because it has been stalled for 2 days with no activity.'

View file

@ -13,10 +13,12 @@
"install-legacy": "npm install", "install-legacy": "npm install",
"update-legacy": "npm update", "update-legacy": "npm update",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint:js-prod": "npm run lint:js -- --max-warnings 0",
"lint-fix:js": "eslint --ext \".js,.vue\" --fix --ignore-path .gitignore .", "lint-fix:js": "eslint --ext \".js,.vue\" --fix --ignore-path .gitignore .",
"lint:style": "stylelint \"**/*.{vue,css,scss}\" --ignore-path .gitignore", "lint:style": "stylelint \"**/*.{vue,css,scss}\" --ignore-path .gitignore",
"lint-fix:style": "stylelint \"**/*.{vue,css,scss}\" --fix --ignore-path .gitignore", "lint-fix:style": "stylelint \"**/*.{vue,css,scss}\" --fix --ignore-path .gitignore",
"lint": "npm run lint:js && npm run lint:style", "lint": "npm run lint:js && npm run lint:style",
"lint:prod": "npm run lint:js-prod && npm run lint:style",
"dev": "concurrently -k -r \"wait-on tcp:3000 && npm run start-server-dev \" \"npm run start-frontend-dev\"", "dev": "concurrently -k -r \"wait-on tcp:3000 && npm run start-server-dev \" \"npm run start-frontend-dev\"",
"start-frontend-dev": "cross-env NODE_ENV=development vite --host --config ./config/vite.config.js", "start-frontend-dev": "cross-env NODE_ENV=development vite --host --config ./config/vite.config.js",
"start-frontend-devcontainer": "cross-env NODE_ENV=development DEVCONTAINER=1 vite --host --config ./config/vite.config.js", "start-frontend-devcontainer": "cross-env NODE_ENV=development DEVCONTAINER=1 vite --host --config ./config/vite.config.js",