浏览代码

fix(CI): Eslint warning for testing ignored files.

factor2
Hristo Terezov 2 年前
父节点
当前提交
f02c7557af
共有 2 个文件被更改,包括 2 次插入5 次删除
  1. 1
    4
      .github/workflows/ci.yml
  2. 1
    1
      package.json

+ 1
- 4
.github/workflows/ci.yml 查看文件

@@ -18,9 +18,6 @@ jobs:
18 18
     - name: Get changed lang files
19 19
       id: lang-files
20 20
       run: echo "all=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE 'lang\/\S+' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
21
-    - name: Get changed files for eslint
22
-      id: eslint-files
23
-      run: echo "files=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE '\S*(\.js|\.ts|\.tsx)(\s|$)' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
24 21
     - run: npm install
25 22
     - name: Check git status
26 23
       run: git status
@@ -32,7 +29,7 @@ jobs:
32 29
       run: npm run lint:lang
33 30
     - name: Check if the git repository is clean
34 31
       run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
35
-    - run: npm run lint:ci --files=${{ steps.eslint-files.outputs.files }} && npm run tsc:ci
32
+    - run: npm run lint:ci && npm run tsc:ci
36 33
   linux-build:
37 34
     name: Build Frontend (Linux)
38 35
     runs-on: ubuntu-latest

+ 1
- 1
package.json 查看文件

@@ -192,7 +192,7 @@
192 192
     "tsc:web": "tsc --noEmit --project tsconfig.web.json",
193 193
     "tsc:native": "tsc --noEmit --project tsconfig.native.json",
194 194
     "tsc:ci": "npm run tsc:web && npm run tsc:native",
195
-    "lint:ci": "eslint --ext .js,.ts,.tsx --max-warnings 0 ",
195
+    "lint:ci": "eslint --ext .js,.ts,.tsx --max-warnings 0 .",
196 196
     "lint:lang": "for file in lang/*.json; do npx --yes jsonlint -q $file || exit 1; done",
197 197
     "lang-sort": "./resources/lang-sort.sh",
198 198
     "lint-fix": "eslint --ext .js,.ts,.tsx --max-warnings 0 --fix .",

正在加载...
取消
保存