Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(frontend): Add tsc to lint #9911

Merged
merged 3 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,17 @@ task yarnBuild(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
outputs.dir('dist')
}

task cleanGenerate {
delete fileTree(dir: 'src', include: '**/*.generated.ts')
}

task cleanExtraDirs {
delete 'node_modules/.yarn-integrity'
delete 'dist'
delete 'tmp'
delete 'just'
delete fileTree(dir: 'src', include: '*.generated.ts')
}
cleanExtraDirs.finalizedBy(cleanGenerate)
clean.finalizedBy(cleanExtraDirs)

configurations {
Expand Down
6 changes: 4 additions & 2 deletions datahub-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@
"build": "yarn run generate && NODE_OPTIONS='--max-old-space-size=3072 --openssl-legacy-provider' CI=false vite build",
"test": "vitest",
"generate": "graphql-codegen --config codegen.yml",
"lint": "eslint . --ext .ts,.tsx --quiet",
"lint-fix": "eslint '*/**/*.{ts,tsx}' --quiet --fix"
"lint": "eslint . --ext .ts,.tsx --quiet && yarn type-check",
"lint-fix": "eslint '*/**/*.{ts,tsx}' --quiet --fix",
"type-check": "tsc --noEmit -p tsconfig.test.json",
"type-watch": "tsc -w --noEmit -p tsconfig.test.json"
},
"browserslist": {
"production": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function EntityInfo({ formUrn }: Props) {
>
View Profile <LinkOut style={{ marginLeft: '4px' }} />
</StyledLink>
<DatasetStatsSummarySubHeader properties={{ shouldWrap: true }} />
<DatasetStatsSummarySubHeader />
<FormInfoWrapper>
<FormInfo shouldDisplayBackground formUrn={formUrn} />
</FormInfoWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default function FormByEntity({ formUrn }: Props) {
dataNotCombinedWithSiblings: selectedEntityData,
routeToTab: () => {},
refetch,
lineage: undefined,
}}
>
<ContentWrapper>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable class-methods-use-this */
import React, { ComponentType } from 'react';
import { Plugin } from '@remirror/pm/state';
import type { Plugin } from 'prosemirror-state';
import {
ApplySchemaAttributes,
CommandFunction,
Expand Down Expand Up @@ -64,7 +64,7 @@ class DataHubMentionsExtension extends NodeExtension<DataHubMentionsOptions> {
});
}

createNodeSpec(extra: ApplySchemaAttributes, override: NodeSpecOverride): NodeExtensionSpec {
createNodeSpec(extra: ApplySchemaAttributes, override: Partial<NodeSpecOverride>): NodeExtensionSpec {
return {
inline: true,
marks: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const InputFieldsTab = () => {
<SchemaTable
schemaMetadata={null}
rows={rows}
editMode={false}
editableSchemaMetadata={null}
usageStats={null}
schemaFieldBlameList={null}
Expand Down
3 changes: 2 additions & 1 deletion datahub-web-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"jsx": "react-jsx",
"types": ["vitest/globals"]
},
"include": ["src", "src/conf/theme/styled-components.d.ts", "vite.config.ts", ".eslintrc.js"]
"include": ["src", "src/conf/theme/styled-components.d.ts", "vite.config.ts", ".eslintrc.js"],
"exclude": ["**/*.generated.ts"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can undo this change

}
23 changes: 23 additions & 0 deletions datahub-web-react/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"noImplicitAny": false,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": false,
"noEmit": true,
"jsx": "react-jsx",
"types": ["vitest/globals"]
},
"include": ["src", "src/conf/theme/styled-components.d.ts", "vite.config.ts", ".eslintrc.js"],
"exclude": ["**/*.test.ts*"],
}
Loading