Skip to content

Commit

Permalink
ci(strict): add eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Jun 26, 2024
1 parent 59551fe commit d3c28e2
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 113 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/strict-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,22 @@ jobs:

- uses: ./.github/workflows/actions/turbo

- name: Install tsc-output-parser
- name: Collect metrics
run: |
ROOT=$(pwd)
npm install -g @aivenio/[email protected]
cd ./packages/core
npx tsc --strictNullChecks --strictPropertyInitialization --noEmit --pretty false | npx tsc-output-parser > $ROOT/strict_${{ matrix.branch }}.json
pnpm exec tsc --strictNullChecks --strictPropertyInitialization --noEmit --pretty false | npx tsc-output-parser > $ROOT/strict_${{ matrix.branch }}.json
pnpm lint --format json -o $ROOT/eslint_${{ matrix.branch }}.json
cd $ROOT
- name: Upload strict_${{ matrix.branch }}.json
uses: actions/upload-artifact@v4
with:
name: strict_${{ matrix.branch }}
path: 'strict_${{ matrix.branch }}.json'
path: |
'strict_${{ matrix.branch }}.json'
'eslint_${{ matrix.branch }}.json'
comment_on_pr:
permissions:
Expand Down
1 change: 1 addition & 0 deletions packages/core/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
playwright-ct.config.ts
playwright.config.ts
stencil.config.ts
src/components.d.ts
3 changes: 2 additions & 1 deletion packages/core/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"react/jsx-no-bind": 0,
"react/jsx-uses-react": 0,
"react/react-in-jsx-scope": 0,
"@typescript-eslint/no-confusing-non-null-assertion": "error"
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-explicit-any": "warn"
}
}
6 changes: 5 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
"baseUrl": ".",
"paths": {
"@utils/test": ["src/tests/utils/test"]
}
},
// Strict check uncomment to check for strict
// "strictNullChecks": true,
// "strictPropertyInitialization": true,
// "noImplicitAny": true,
},
"include": ["src"],
"exclude": ["node_modules"]
Expand Down
Loading

0 comments on commit d3c28e2

Please sign in to comment.