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

chore(share-data): add format and lint targets for js #16529

Merged
merged 5 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 21 additions & 0 deletions shared-data/.eslintignore
Copy link
Member

Choose a reason for hiding this comment

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

You may not need to add this, I think it will use the top level one directory up but try it out!

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**/node_modules/**
**/coverage/**
**/dist/**/*
**/lib/**/*
**/build/**
**/venv/**
.opentrons_config
**/tsconfig*.json
**/vite.config.mts
# prettier
**/package.json
**/CHANGELOG.md

# components library
storybook-static

# python projects and tools
**/.mypy_cache/**
**/.pytest_cache/**

python/**
17 changes: 15 additions & 2 deletions shared-data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@ tests ?=
cov_opts ?= --coverage=true
test_opts ?=

FORMAT_FILE_GLOB = "**/*.@(ts|tsx|js|json|md|yml)"
Copy link
Contributor

Choose a reason for hiding this comment

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

need to add yml?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess it doesn't hurt..?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, it won't cause any issue.


# Top level targets

.PHONY: all
all: clean dist

.PHONY: setup
setup: setup-py setup-js
setup: setup-py

.PHONY: dist
dist: dist-js dist-py
dist: dist-py

.PHONY: clean
clean: clean-py

.PHONY: format
format: format-js format-py

# JavaScript targets

.PHONY: lib-js
Expand All @@ -34,6 +39,14 @@ lib-js:
build-ts:
yarn tsc --build --emitDeclarationOnly

.PHONY: format-js
format-js:
yarn prettier --ignore-path .eslintignore --write $(FORMAT_FILE_GLOB)

.PHONY: lint-js
lint-js:
Copy link
Contributor

Choose a reason for hiding this comment

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

missing eslint, yarn eslint

yarn prettier --ignore-path .eslintignore --check $(FORMAT_FILE_GLOB)

# Python targets

.PHONY: setup-py
Expand Down
Loading