diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a160bc655..2f4ba0446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,16 +36,6 @@ jobs: onlyDiff: "true" header: "Bundle size report" # PR comment header - format: - needs: [build] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup - - - name: Format - run: pnpm format - lint: needs: [build] runs-on: ubuntu-latest diff --git a/.prettierignore b/.prettierignore index 85814a27d..6570797cc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,8 @@ +.cache +.changeset +.expo +.storybook +.wireit .vscode coverage dist @@ -10,12 +15,12 @@ node_modules npm-debug.log* lerna-debug.log* yarn-error.log* -.cache lerna.json tsconfig.json tsconfig.*.json storybook-static public artifacts -.expo -.wireit +stories +demo +website diff --git a/package-scripts.js b/package-scripts.js index 36ea7d02f..fe1bd06a7 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -39,19 +39,6 @@ module.exports = { "build:dist:min": "webpack --bail --config ../../config/webpack/webpack.config.js", - // Quality. - // - Format - // TODO(2375): Can we cache / incremental? - // https://github.com/FormidableLabs/victory/issues/2375 - "format:pkg": - 'prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --list-different "./**/*.{js,jsx,json,ts,tsx}"', - "format:pkg:fix": - 'prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write "./**/*.{js,jsx,json,ts,tsx}"', - "format:root": - 'prettier --list-different "./*.js*" "./{scripts,config,demo,docs,stories,test}/*.{js,jsx,json,ts,tsx}"', - "format:root:fix": - 'prettier --write "./*.js*" "./{scripts,config,demo,docs,stories,test}/*.{js,jsx,json,ts,tsx}"', - // - TypeScript // TODO(2375): Can we cache / incremental? // https://github.com/FormidableLabs/victory/issues/2375 diff --git a/package.json b/package.json index f7edd53d1..428a47367 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,9 @@ }, "homepage": "https://commerce.nearform.com/open-source/victory", "packageManager": "pnpm@7.33.7", + "dependencies": { + "clsx": "^2.1.1" + }, "devDependencies": { "@babel/cli": "7.23.9", "@babel/core": "7.23.9", @@ -143,10 +146,6 @@ "build:docs": "wireit", "format": "wireit", "format:fix": "wireit", - "format:root": "wireit", - "format:root:fix": "wireit", - "format:pkgs": "wireit", - "format:pkgs:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "lint:root": "wireit", @@ -266,86 +265,10 @@ ] }, "format": { - "dependencies": [ - "format:root", - "format:pkgs" - ] + "command": "prettier --config .prettierrc.json --ignore-path .prettierignore --check \"./**/*.{js,jsx,json,ts,tsx}\"" }, "format:fix": { - "dependencies": [ - "format:root:fix", - "format:pkgs:fix" - ] - }, - "format:root": { - "command": "nps format:root", - "files": [ - "*.js", - "*.json", - "scripts", - "config", - "demo", - "docs", - "stories", - "test", - "!**/node_modules/**" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:root:fix": { - "command": "pnpm run format:root || nps format:root:fix", - "files": [ - "*.js", - "*.json", - "scripts", - "config", - "demo", - "docs", - "stories", - "test", - "!**/node_modules/**" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:pkgs": { - "dependencies": [ - "./packages/victory-native:format", - "./packages/victory-vendor:format", - "./packages/victory:format", - "./packages/victory-area:format", - "./packages/victory-axis:format", - "./packages/victory-bar:format", - "./packages/victory-box-plot:format", - "./packages/victory-brush-container:format", - "./packages/victory-brush-line:format", - "./packages/victory-candlestick:format", - "./packages/victory-canvas:format", - "./packages/victory-chart:format", - "./packages/victory-core:format", - "./packages/victory-create-container:format", - "./packages/victory-cursor-container:format", - "./packages/victory-errorbar:format", - "./packages/victory-group:format", - "./packages/victory-histogram:format", - "./packages/victory-legend:format", - "./packages/victory-line:format", - "./packages/victory-pie:format", - "./packages/victory-polar-axis:format", - "./packages/victory-scatter:format", - "./packages/victory-selection-container:format", - "./packages/victory-shared-events:format", - "./packages/victory-stack:format", - "./packages/victory-tooltip:format", - "./packages/victory-voronoi:format", - "./packages/victory-voronoi-container:format", - "./packages/victory-zoom-container:format" - ] + "command": "prettier --config .prettierrc.json --ignore-path .prettierignore --write \"./**/*.{js,jsx,json,ts,tsx}\"" }, "lint": { "dependencies": [ @@ -540,48 +463,11 @@ "./packages/victory-zoom-container:types:create" ] }, - "format:pkgs:fix": { - "dependencies": [ - "./packages/victory-native:format:fix", - "./packages/victory-vendor:format:fix", - "./packages/victory:format:fix", - "./packages/victory-area:format:fix", - "./packages/victory-axis:format:fix", - "./packages/victory-bar:format:fix", - "./packages/victory-box-plot:format:fix", - "./packages/victory-brush-container:format:fix", - "./packages/victory-brush-line:format:fix", - "./packages/victory-candlestick:format:fix", - "./packages/victory-canvas:format:fix", - "./packages/victory-chart:format:fix", - "./packages/victory-core:format:fix", - "./packages/victory-create-container:format:fix", - "./packages/victory-cursor-container:format:fix", - "./packages/victory-errorbar:format:fix", - "./packages/victory-group:format:fix", - "./packages/victory-histogram:format:fix", - "./packages/victory-legend:format:fix", - "./packages/victory-line:format:fix", - "./packages/victory-pie:format:fix", - "./packages/victory-polar-axis:format:fix", - "./packages/victory-scatter:format:fix", - "./packages/victory-selection-container:format:fix", - "./packages/victory-shared-events:format:fix", - "./packages/victory-stack:format:fix", - "./packages/victory-tooltip:format:fix", - "./packages/victory-voronoi:format:fix", - "./packages/victory-voronoi-container:format:fix", - "./packages/victory-zoom-container:format:fix" - ] - }, "start:docs": { "command": "pnpm run --filter victory-docs start", "dependencies": [ "build:lib:esm" ] } - }, - "dependencies": { - "clsx": "^2.1.1" } } diff --git a/packages/victory-area/package.json b/packages/victory-area/package.json index 881510ca1..b7ad141d4 100644 --- a/packages/victory-area/package.json +++ b/packages/victory-area/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-axis/package.json b/packages/victory-axis/package.json index 1d9f5d058..746f1263f 100644 --- a/packages/victory-axis/package.json +++ b/packages/victory-axis/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-bar/package.json b/packages/victory-bar/package.json index ee910faf8..397276940 100644 --- a/packages/victory-bar/package.json +++ b/packages/victory-bar/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-box-plot/package.json b/packages/victory-box-plot/package.json index f84355d53..b25f20f08 100644 --- a/packages/victory-box-plot/package.json +++ b/packages/victory-box-plot/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-brush-container/package.json b/packages/victory-brush-container/package.json index 14364b099..ab15b367a 100644 --- a/packages/victory-brush-container/package.json +++ b/packages/victory-brush-container/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -200,32 +198,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-brush-line/package.json b/packages/victory-brush-line/package.json index 82df22565..3e754ed4e 100644 --- a/packages/victory-brush-line/package.json +++ b/packages/victory-brush-line/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -200,32 +198,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-candlestick/package.json b/packages/victory-candlestick/package.json index 455a30a96..3aba7b05e 100644 --- a/packages/victory-candlestick/package.json +++ b/packages/victory-candlestick/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -204,32 +202,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-canvas/package.json b/packages/victory-canvas/package.json index a5f290fc3..3538ce6f6 100644 --- a/packages/victory-canvas/package.json +++ b/packages/victory-canvas/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -206,32 +204,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-chart/package.json b/packages/victory-chart/package.json index 4d2bcdc16..5755cf1b5 100644 --- a/packages/victory-chart/package.json +++ b/packages/victory-chart/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -221,32 +219,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-core/package.json b/packages/victory-core/package.json index ea237c5fe..ac603118e 100644 --- a/packages/victory-core/package.json +++ b/packages/victory-core/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-create-container/package.json b/packages/victory-create-container/package.json index ee8bd5b98..04d4efb71 100644 --- a/packages/victory-create-container/package.json +++ b/packages/victory-create-container/package.json @@ -47,8 +47,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -234,32 +232,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-cursor-container/package.json b/packages/victory-cursor-container/package.json index b8d438dc3..f618e7826 100644 --- a/packages/victory-cursor-container/package.json +++ b/packages/victory-cursor-container/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-errorbar/package.json b/packages/victory-errorbar/package.json index 5fe5335b1..28b27b717 100644 --- a/packages/victory-errorbar/package.json +++ b/packages/victory-errorbar/package.json @@ -45,8 +45,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -202,32 +200,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-group/package.json b/packages/victory-group/package.json index 9e5a8b148..248c034e7 100644 --- a/packages/victory-group/package.json +++ b/packages/victory-group/package.json @@ -47,8 +47,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -211,32 +209,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-histogram/package.json b/packages/victory-histogram/package.json index 359f9d93f..d565dd380 100644 --- a/packages/victory-histogram/package.json +++ b/packages/victory-histogram/package.json @@ -45,8 +45,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -213,32 +211,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-legend/package.json b/packages/victory-legend/package.json index f107c6345..a8b7b42e0 100644 --- a/packages/victory-legend/package.json +++ b/packages/victory-legend/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-line/package.json b/packages/victory-line/package.json index 175595cb6..3c2a4a0ec 100644 --- a/packages/victory-line/package.json +++ b/packages/victory-line/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-pie/package.json b/packages/victory-pie/package.json index 15822269c..227c5652e 100644 --- a/packages/victory-pie/package.json +++ b/packages/victory-pie/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -205,32 +203,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-polar-axis/package.json b/packages/victory-polar-axis/package.json index 824336992..fdce3674b 100644 --- a/packages/victory-polar-axis/package.json +++ b/packages/victory-polar-axis/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-scatter/package.json b/packages/victory-scatter/package.json index 52b92e7b2..ccf840b92 100644 --- a/packages/victory-scatter/package.json +++ b/packages/victory-scatter/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-selection-container/package.json b/packages/victory-selection-container/package.json index bbd008e35..ebb257b44 100644 --- a/packages/victory-selection-container/package.json +++ b/packages/victory-selection-container/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -204,32 +202,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-shared-events/package.json b/packages/victory-shared-events/package.json index 24213d6ef..bdb4da2b0 100644 --- a/packages/victory-shared-events/package.json +++ b/packages/victory-shared-events/package.json @@ -44,8 +44,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -201,32 +199,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-stack/package.json b/packages/victory-stack/package.json index 496244d9e..e899dd299 100644 --- a/packages/victory-stack/package.json +++ b/packages/victory-stack/package.json @@ -49,8 +49,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -215,32 +213,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-tooltip/package.json b/packages/victory-tooltip/package.json index 16e218950..64bf46a54 100644 --- a/packages/victory-tooltip/package.json +++ b/packages/victory-tooltip/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-vendor/package.json b/packages/victory-vendor/package.json index 508eb9ba9..6bbd88484 100644 --- a/packages/victory-vendor/package.json +++ b/packages/victory-vendor/package.json @@ -63,8 +63,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -130,32 +128,6 @@ "build" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "scripts/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "scripts/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint scripts", "files": [ diff --git a/packages/victory-voronoi-container/package.json b/packages/victory-voronoi-container/package.json index d7d973ae4..cf4f15b19 100644 --- a/packages/victory-voronoi-container/package.json +++ b/packages/victory-voronoi-container/package.json @@ -45,8 +45,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -208,32 +206,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-voronoi/package.json b/packages/victory-voronoi/package.json index 8dddd0b4b..3801abefe 100644 --- a/packages/victory-voronoi/package.json +++ b/packages/victory-voronoi/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-zoom-container/package.json b/packages/victory-zoom-container/package.json index 64eee9a8a..bfbb33f7f 100644 --- a/packages/victory-zoom-container/package.json +++ b/packages/victory-zoom-container/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory/package.json b/packages/victory/package.json index 27a3d707c..86cb0c02d 100644 --- a/packages/victory/package.json +++ b/packages/victory/package.json @@ -68,8 +68,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -380,32 +378,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/scripts/sync-pkgs-wireit-helpers.js b/scripts/sync-pkgs-wireit-helpers.js index 66dcd52a5..e49328b8f 100644 --- a/scripts/sync-pkgs-wireit-helpers.js +++ b/scripts/sync-pkgs-wireit-helpers.js @@ -38,8 +38,6 @@ function generateWireitConfig(pkg, rootPkg) { "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit", @@ -186,23 +184,6 @@ function generateWireitConfig(pkg, rootPkg) { ], "packageLocks": ["pnpm-lock.yaml"] }, - - // For the "fix" task, we first run the normal check that may fail so that - // we get caching for packages without changed files: - ...["format", "format:fix"].reduce((wireit, key) => { - wireit[key] = { - "command": key === "format" ? "nps format:pkg" : "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json", - ], - "output": [], - "packageLocks": ["pnpm-lock.yaml"] - }; - return wireit; - }, {}), // Same as above ...["lint", "lint:fix"].reduce((wireit, key) => { wireit[key] = { diff --git a/scripts/sync-pkgs-wireit.js b/scripts/sync-pkgs-wireit.js index d01658b4e..03dda3f0b 100644 --- a/scripts/sync-pkgs-wireit.js +++ b/scripts/sync-pkgs-wireit.js @@ -76,8 +76,6 @@ const updateRootPkg = async ({ allPkgs }) => { [ { rootTask: "build", pkgTask: "build" }, { rootTask: "build:lib:esm", pkgTask: "build:lib:esm" }, - { rootTask: "format:pkgs", pkgTask: "format" }, - { rootTask: "format:pkgs:fix", pkgTask: "format:fix" }, { rootTask: "jest:pkgs", pkgTask: "jest" }, { rootTask: "types:check", pkgTask: "types:check" }, { rootTask: "types:create", pkgTask: "types:create" },