ソースを参照

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
     - name: Get changed lang files
18
     - name: Get changed lang files
19
       id: lang-files
19
       id: lang-files
20
       run: echo "all=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE 'lang\/\S+' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
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
     - run: npm install
21
     - run: npm install
25
     - name: Check git status
22
     - name: Check git status
26
       run: git status
23
       run: git status
32
       run: npm run lint:lang
29
       run: npm run lint:lang
33
     - name: Check if the git repository is clean
30
     - name: Check if the git repository is clean
34
       run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
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
   linux-build:
33
   linux-build:
37
     name: Build Frontend (Linux)
34
     name: Build Frontend (Linux)
38
     runs-on: ubuntu-latest
35
     runs-on: ubuntu-latest

+ 1
- 1
package.json ファイルの表示

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

読み込み中…
キャンセル
保存