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

feat: add prettier config and test npm script #232

Merged
merged 18 commits into from
Mar 5, 2024

Conversation

karstens
Copy link
Contributor

@karstens karstens commented Feb 23, 2024

Description

  • adding a prettier config to match our other repos/tools
  • check all scripts / tasks to run via moon
  • replace yarn with pnpm everywhere
  • fix lint-stage and git hooks

Motivation

  • make code better

Screenshots

To-do list

  • This pull request is ready to merge.

@karstens karstens marked this pull request as draft February 23, 2024 16:05
package.json Outdated Show resolved Hide resolved
@karstens karstens marked this pull request as ready for review February 28, 2024 18:36
@karstens karstens self-assigned this Feb 28, 2024
@karstens
Copy link
Contributor Author

karstens commented Mar 1, 2024

@GarthDB This is ready to merge.

I pushed two commits:

  • one that replaced all npx with pnpm calls, so the tasks can be run via moon
  • one that fixed the husky/commit-msg, which was not set as executable.

Thanks
Frank

Copy link

changeset-bot bot commented Mar 1, 2024

⚠️ No Changeset found

Latest commit: a2b9d9f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@GarthDB GarthDB force-pushed the karstens/fix--little-improvements branch from ab9de59 to 30ab9ac Compare March 1, 2024 19:30
@GarthDB
Copy link
Member

GarthDB commented Mar 1, 2024

Run report for a2b9d9f1

Total time: 26.2s | Comparison time: 24.2s | Estimated loss: 2s (7.6% slower)

Action Time Status Info
🟩 SyncWorkspace 0ms Passed
🟩 SetupNodeTool(20.0.0) 3.8s Passed
🟩 InstallNodeDeps(20.0.0) 8.6s Passed
🟩 SyncNodeProject(contrast-colors) 0.1ms Passed
🟩 SyncNodeProject(ui) 0.3ms Passed
🟩 RunTask(contrast-colors:test) 2.3s Passed
🟩 RunTask(ui:makeDistDir) 33.5ms Passed
🟩 RunTask(ui:copyCNAME) 35.6ms Passed
🟩 RunTask(ui:copyUIIcons) 75.6ms Passed
🟩 RunTask(ui:copyWorkflowIcons) 66.1ms Passed
🟩 RunTask(ui:buildSite) 11.4s Passed
Touched files
.github/workflows/ci.yml
.gitignore
.gitmodules
.husky/.gitignore
.moon/toolchain.yml
.moon/workspace.yml
.prettierignore
.prettierrc
README.md
docs/ui/README.md
docs/ui/moon.yml
docs/ui/package.json
docs/ui/src/APCAlookup.js
docs/ui/src/demo.css
docs/ui/src/demo.js
docs/ui/src/htmlHead.html
docs/ui/src/index.js
docs/ui/src/js/addBulkDialog.js
docs/ui/src/js/addColorsFromImage.js
docs/ui/src/js/addFromURL.js
docs/ui/src/js/addLightnessBulkDialog.js
docs/ui/src/js/addScaleBulkDialog.js
docs/ui/src/js/bulkConvertDialog.js
docs/ui/src/js/chroma-plus.js
docs/ui/src/js/colorDetailsPanel.js
docs/ui/src/js/colorScale.js
docs/ui/src/js/colorScaleDiverging.js
docs/ui/src/js/colorScaleQualitative.js
docs/ui/src/js/colorScaleSequential.js
docs/ui/src/js/colorWheel.js
docs/ui/src/js/compareColors.js
docs/ui/src/js/convertColors.js
docs/ui/src/js/create3dModel.js
docs/ui/src/js/createBaseScaleOptions.js
docs/ui/src/js/createChart.js
docs/ui/src/js/createDemos.js
docs/ui/src/js/createHtmlElement.js
docs/ui/src/js/createInterpolationCharts.js
docs/ui/src/js/createOutputColors.js
docs/ui/src/js/createOutputParameters.js
docs/ui/src/js/createPaletteCharts.js
docs/ui/src/js/createPanelReportTable.js
docs/ui/src/js/createRGBchannelChart.js
docs/ui/src/js/createRatioChart.js
docs/ui/src/js/createSVGgradient.js
docs/ui/src/js/createSVGswatches.js
docs/ui/src/js/createSVGuiKit.js
docs/ui/src/js/createSamples.js
docs/ui/src/js/createTable.js
docs/ui/src/js/createXML.js
docs/ui/src/js/cvdColors.js
docs/ui/src/js/d3.js
docs/ui/src/js/demos/demo_chord.js
docs/ui/src/js/demos/demo_choropleth.js
docs/ui/src/js/demos/demo_density.js
docs/ui/src/js/demos/demo_donut.js
docs/ui/src/js/demos/demo_heatmap.js
docs/ui/src/js/demos/demo_hexbin.js
docs/ui/src/js/demos/demo_scatter.js
docs/ui/src/js/demos/demo_stackedArea.js
docs/ui/src/js/demos/demo_violinJitter.js
docs/ui/src/js/getThemeData.js
docs/ui/src/js/initialDivergingScale.js
docs/ui/src/js/initialQualitativeScale.js
docs/ui/src/js/initialSequentialScale.js
docs/ui/src/js/initialTheme.js
docs/ui/src/js/keyColors.js
docs/ui/src/js/pageLoader.js
docs/ui/src/js/params.js
docs/ui/src/js/polarColorPath.js
docs/ui/src/js/popover.js
docs/ui/src/js/predefinedColorNames.js
docs/ui/src/js/ramps.js
docs/ui/src/js/ratios.js
docs/ui/src/js/scaleKeyColors.js
docs/ui/src/js/sliderInput.js
docs/ui/src/js/sortColorScales.js
docs/ui/src/js/tabs.js
docs/ui/src/js/themeTitle.js
docs/ui/src/js/themeUpdate.js
docs/ui/src/js/toast.js
docs/ui/src/js/toggleSwatchAttributes.js
docs/ui/src/js/tooltip.js
docs/ui/src/js/utils.js
docs/ui/src/scales.html
docs/ui/src/scales.js
docs/ui/src/scss/colorinputs.scss
docs/ui/src/scss/components/articleCard.scss
docs/ui/src/scss/components/colorPicker.scss
docs/ui/src/scss/components/colorSlider.scss
docs/ui/src/scss/components/dialog.scss
docs/ui/src/scss/components/header.scss
docs/ui/src/scss/components/outputSwatches.scss
docs/ui/src/scss/components/sections.scss
docs/ui/src/scss/components/selectBox.scss
docs/ui/src/scss/components/textfield.scss
docs/ui/src/scss/converter.scss
docs/ui/src/scss/style.scss
docs/ui/src/theme.html
docs/ui/src/theme.js
docs/ui/src/tools.html
docs/ui/src/tools.js
docs/ui/src/views/GithubLink.html
docs/ui/src/views/LogoLink.html
docs/ui/src/views/dialog_bulkColorConverter.html
docs/ui/src/views/dialog_importURL.html
docs/ui/src/views/footer.html
docs/ui/src/views/header.html
docs/ui/src/views/header_scales.html
docs/ui/src/views/header_tools.html
docs/ui/src/views/home_articles.html
docs/ui/src/views/home_contribute.html
docs/ui/src/views/home_gettingStarted.html
docs/ui/src/views/home_learn.html
docs/ui/src/views/home_main.html
docs/ui/src/views/home_sidenav.html
docs/ui/src/views/tab_colorCompare.html
docs/ui/src/views/tab_colorConverter.html
docs/ui/src/views/tab_swatches.html
docs/ui/src/views/tab_theme.html
docs/ui/src/views/toast_cvdPreview.html
package.json
packages/contrast-colors/.eslintrc.json
packages/contrast-colors/README.md
packages/contrast-colors/index.d.ts
packages/contrast-colors/index.js
packages/contrast-colors/lib/backgroundcolor.js
packages/contrast-colors/lib/chroma-plus.js
packages/contrast-colors/lib/color.js
packages/contrast-colors/lib/curve.js
packages/contrast-colors/lib/theme.js
packages/contrast-colors/lib/utils.js
packages/contrast-colors/moon.yml
packages/contrast-colors/package.json
packages/contrast-colors/test/backgroundColor.test.js
packages/contrast-colors/test/colorSetters.test.js
packages/contrast-colors/test/contrast.test.js
packages/contrast-colors/test/convertColorValue.test.js
packages/contrast-colors/test/createScale.test.js
packages/contrast-colors/test/minPositive.test.js
packages/contrast-colors/test/ratioName.test.js
packages/contrast-colors/test/searchColors.test.js
packages/contrast-colors/test/theme.test.js
packages/contrast-colors/test/themeSetters.test.js
pnpm-lock.yaml

with:
fetch-depth: 0
- uses: moonrepo/setup-moon-action@v1
- run: moon ci
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GarthDB should this really run moon ci? Currently, moon ci run all tasks, including the deploySite task. Is that what should happen here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think, it would be enough to run the test and build tasks here, like:
moon ci :lint :test :buildSite

https://moonrepo.dev/docs/guides/ci#choosing-targets

Copy link
Member

Choose a reason for hiding this comment

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

If I move the tasks to moon I can define which ones are local only.

@GarthDB
Copy link
Member

GarthDB commented Mar 5, 2024

It's close to ready I'm just fixing the tasks to not all run on CI.

@GarthDB GarthDB force-pushed the karstens/fix--little-improvements branch from 50b090c to a2b9d9f Compare March 5, 2024 20:29
@GarthDB GarthDB merged commit 27c7ea7 into monorepo Mar 5, 2024
3 checks passed
@GarthDB GarthDB deleted the karstens/fix--little-improvements branch March 5, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants