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

Fixed typescript props bug and added typescript compile to linting process #1485

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
Fixed typescript props bug and added typescript compile to lint process
  • Loading branch information
mariano-formidable committed Feb 6, 2020
commit 42e3db41bf4b74e298dbefbb2eee6878b8176ef7
8 changes: 5 additions & 3 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
default: "karma start ./config/karma/karma.conf.js"
},
test: {
ci: npsUtils.series.nps("build-package-libs", "karma.ci"),
cov: npsUtils.series.nps("build-package-libs", "karma.cov"),
dev: "karma start ./config/karma/karma.conf.dev.js",
default: npsUtils.series.nps("build-package-libs", "karma")
Expand All @@ -39,20 +38,22 @@ module.exports = {
stories: "eslint --color stories",
storybook: "eslint --color --no-ignore .storybook/config.js",
test: "eslint --color test",
ts: npsUtils.series.nps("build-package-libs", "compile-ts"),
default: npsUtils.series.nps(
"lint.test",
"lint.stories",
"lint.storybook",
"lint.demo",
"lint.src"
"lint.src",
"lint.ts"
)
},
format: {
default: 'prettier --write "./**/*.{js,jsx,json,ts,tsx}"',
ci: 'prettier --list-different "./**/*.{js,jsx,json,ts,tsx}"'
},
check: {
ci: npsUtils.series.nps("format.ci", "lint", "test.ci"),
ci: npsUtils.series.nps("format.ci", "lint", "karma.ci"),
Copy link
Member Author

Choose a reason for hiding this comment

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

The lint process for typescript involves running build-package-libs, which test.ci also did, so I removed test.ci and replaced it with karma.ci since the packages will already be built for karma.

Let me know if this doesn't make sense or might produce some other problems, I just didn't want build-package-libs to run twice during ci if we didn't need it.

cov: npsUtils.series.nps("lint", "test.cov"),
dev: npsUtils.series.nps("lint", "test.dev"),
default: npsUtils.series.nps("lint", "test")
Expand All @@ -71,6 +72,7 @@ module.exports = {
default: npsUtils.concurrent.nps("clean.es", "clean.lib", "clean.dist"),
all: "lerna exec --parallel -- nps clean"
},
"compile-ts": "tsc --project tsconfig.json --noEmit",
// Version testing helpers
"lerna-dry-run": "lerna publish --skip-git --skip-npm --loglevel silly",
// TODO: organize build scripts once build perf is sorted out
Expand Down
2 changes: 2 additions & 0 deletions packages/victory-chart/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import * as React from "react";
import {
CategoryPropType,
EventPropTypeInterface,
DomainPropType,
DomainPaddingPropType,
Expand All @@ -20,6 +21,7 @@ import {
} from "victory-core";

export interface VictoryChartProps extends VictoryCommonProps {
categories?: CategoryPropType;
domain?: DomainPropType;
domainPadding?: DomainPaddingPropType;
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
Expand Down
1 change: 0 additions & 1 deletion packages/victory-core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ export type ColorScalePropType =

export interface VictoryCommonProps {
animate?: boolean | AnimatePropTypeInterface;
categories?: string | { x?: string[]; y?: string[] };
name?: string;
height?: number;
horizontal?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
}
},
"include": [
"**/*.ts",
"**/*.tsx"
"**/src/*",
"demo/ts/*"
],
"exclude": [
"node_modules",
Expand Down