ci: fixes linting and release-local-ui target (#683)

1. Created separate tsconfig files for tests and prod code, including the test files in the test config.

2. Fixed linting error in DBEditTimeChartForm found while running local linting.

3. Excluded coverage CSS from the style lint task.

4. Updated app Dockerfile with test configuration and ran locally to ensure it was working.

Ref: HDX-1502
This commit is contained in:
Dan Hable 2025-03-13 18:11:46 -05:00 committed by GitHub
parent b7ae39259e
commit 5db2767015
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 27 additions and 6 deletions

View file

@ -0,0 +1,7 @@
---
"@hyperdx/common-utils": patch
"@hyperdx/api": patch
"@hyperdx/app": patch
---
Fixed CI linting and UI release task.

View file

@ -5,7 +5,7 @@ module.exports = {
plugins: ['@typescript-eslint', 'prettier', 'simple-import-sort'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
project: ['./tsconfig.json', './tsconfig.test.json'],
},
extends: [
'eslint:recommended',

View file

@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules"]
}

View file

@ -4,7 +4,7 @@ module.exports = {
plugins: ['simple-import-sort', '@typescript-eslint', 'prettier'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
project: ['./tsconfig.json', './tsconfig.test.json'],
},
extends: [
'next',

View file

@ -1,3 +1,4 @@
.next
.storybook
node_modules
coverage

View file

@ -7,7 +7,7 @@ WORKDIR /app
COPY .yarn ./.yarn
COPY .yarnrc.yml yarn.lock package.json nx.json .prettierrc .prettierignore ./
COPY ./packages/common-utils ./packages/common-utils
COPY ./packages/app/jest.config.js ./packages/app/tsconfig.json ./packages/app/package.json ./packages/app/next.config.js ./packages/app/mdx.d.ts ./packages/app/.eslintrc.js ./packages/app/
COPY ./packages/app/jest.config.js ./packages/app/tsconfig.json ./packages/app/tsconfig.test.json ./packages/app/package.json ./packages/app/next.config.js ./packages/app/mdx.d.ts ./packages/app/.eslintrc.js ./packages/app/
RUN yarn install --mode=skip-build && yarn cache clean

View file

@ -422,7 +422,7 @@ export default function EditTimeChartForm({
// Emulate the date range picker auto-searching similar to dashboards
useEffect(() => {
setQueriedConfig(config => {
setQueriedConfig((config: ChartConfigWithDateRange | undefined) => {
if (config == null) {
return config;
}

View file

@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules"]
}

View file

@ -4,7 +4,7 @@ module.exports = {
plugins: ['@typescript-eslint', 'prettier', 'simple-import-sort'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
project: ['./tsconfig.json', './tsconfig.test.json'],
},
extends: [
'eslint:recommended',

View file

@ -25,5 +25,6 @@
"strict": true,
"target": "ES2022"
},
"include": ["src"]
"include": ["src"],
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
}

View file

@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules"]
}