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

Update code formatting CI job to fix failures and run prettier #2046

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

rocketnova
Copy link
Contributor

@rocketnova rocketnova commented Sep 15, 2023

Similar to #2021, currently, the CI "Check code formatting" job is failing on master:

> [email protected] check-format
> npx prettier --check src

npm WARN exec The following package was not found and will be installed: [email protected]
Checking formatting...
[warn] src/api/data-array.ts
[warn] src/api/inline-api.ts
[warn] src/api/plugin-api.ts
[warn] src/api/result.ts
[warn] src/data-import/inline-field.ts
[warn] src/data-import/markdown-file.ts
[warn] src/data-import/persister.ts
[warn] src/data-import/web-worker/import-impl.ts
[warn] src/data-import/web-worker/import-manager.ts
[warn] src/data-index/index.ts
[warn] src/data-index/resolver.ts
[warn] src/data-model/markdown.ts
[warn] src/data-model/value.ts
[warn] src/expression/binaryop.ts
[warn] src/expression/context.ts
[warn] src/expression/functions.ts
[warn] src/expression/parse.ts
[warn] src/main.ts
[warn] src/query/engine.ts
[warn] src/query/parse.ts
[warn] src/test/api/data-array.test.ts
[warn] src/test/function/eval.test.ts
[warn] src/test/function/functions.test.ts
[warn] src/test/function/string.test.ts
[warn] src/test/markdown/parse.file.test.ts
[warn] src/test/parse/parse.expression.test.ts
[warn] src/test/parse/parse.query.test.ts
[warn] src/ui/export/markdown.ts
[warn] src/ui/lp-render.ts
[warn] src/ui/markdown.tsx
[warn] src/ui/refreshable-view.ts
[warn] src/ui/render.ts
[warn] src/ui/views/calendar-view.ts
[warn] src/ui/views/inline-field.tsx
[warn] src/ui/views/inline-view.ts
[warn] src/ui/views/js-view.ts
[warn] src/ui/views/list-view.tsx
[warn] src/ui/views/table-view.tsx
[warn] src/ui/views/task-view.tsx
[warn] src/util/media.ts
[warn] src/util/normalize.ts
[warn] Code style issues found in 41 files. Run Prettier to fix.
Error: Process completed with exit code 1.

This is not happening locally and is resolved by this PR, which:

  1. Changes the format-check CI job to run npm run install before running prettier check
  2. Runs prettier on master to format existing code.

Note that the build step in the CI job will fail due to the issue identified in #2021. I have not pulled in that change to keep this PR targeted and narrow, but that's easy to do, if requested.

rocketnova added a commit to sneaky-foxes/obsidian-dataview that referenced this pull request Sep 15, 2023
@blacksmithgu blacksmithgu merged commit 5c61309 into blacksmithgu:master Sep 15, 2023
blacksmithgu pushed a commit that referenced this pull request Sep 15, 2023
* Add support for frontmatter links. Requires obsidian v1.4.0+.

* Run prettier.

* Fix format check CI job. See #2046.

* Fix build CI job. See #2021.
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