mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
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:
parent
b7ae39259e
commit
5db2767015
11 changed files with 27 additions and 6 deletions
7
.changeset/quiet-dryers-taste.md
Normal file
7
.changeset/quiet-dryers-taste.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
"@hyperdx/common-utils": patch
|
||||
"@hyperdx/api": patch
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
Fixed CI linting and UI release task.
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
4
packages/api/tsconfig.test.json
Normal file
4
packages/api/tsconfig.test.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
.next
|
||||
.storybook
|
||||
node_modules
|
||||
coverage
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
4
packages/app/tsconfig.test.json
Normal file
4
packages/app/tsconfig.test.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@
|
|||
"strict": true,
|
||||
"target": "ES2022"
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
|
||||
}
|
||||
|
|
|
|||
4
packages/common-utils/tsconfig.test.json
Normal file
4
packages/common-utils/tsconfig.test.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Loading…
Reference in a new issue