-
Notifications
You must be signed in to change notification settings - Fork 33
chore: migrate from cli-style to the shared style configs #1765
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
18a2bbd
chore(lint): move eslint and prettier onto the shared style configs
HendrikThePendric 0d3718b
style: reflow markdown list markers for prettier 3
HendrikThePendric 55a7d4e
style: reformat code with prettier 3
HendrikThePendric 96f8deb
fix(lint): resolve errors surfaced by the new eslint config
HendrikThePendric 053e073
chore(deps): drop the typescript-eslint parser pin
HendrikThePendric a34a43e
chore: replace the cli-style commitlint config with a local one
HendrikThePendric edbe27d
chore(deps): remove @dhis2/cli-style
HendrikThePendric ecd4df6
chore: move ci and local development onto the current node lts
HendrikThePendric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| yarn d2-style check commit "$1" | ||
| yarn commitlint --edit "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,20 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
| set -e | ||
|
|
||
| yarn d2-style check --staged | ||
| staged_files_without_deletions() { | ||
| git diff --cached --name-only --diff-filter=d | grep -E "$1" || true | ||
| } | ||
|
|
||
| check() { | ||
| files=$1 | ||
| shift | ||
|
|
||
| if [ -n "$files" ]; then | ||
| printf '%s\n' "$files" | tr '\n' '\0' | xargs -0 "$@" | ||
| fi | ||
| } | ||
|
|
||
| check "$(staged_files_without_deletions '\.(js|jsx|ts|tsx)$')" \ | ||
| yarn eslint --no-warn-ignored | ||
| check "$(staged_files_without_deletions '\.(js|jsx|ts|tsx|md|json|yml|html|css)$')" \ | ||
| yarn prettier --check --ignore-unknown | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20 | ||
| v24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,20 @@ | ||
| .yarn/ | ||
| .d2/ | ||
| **/locales/ | ||
| cypress/assets/*.js | ||
|
|
||
| # Documentation files that are generated on CI | ||
| API.md | ||
|
|
||
| # Generated from the SVG sources by `yarn setup` | ||
| icons/src/react/ | ||
|
|
||
| # Build output, generated locally by `yarn build` (docusaurus site into dist/, | ||
| # its build cache into docs/.docusaurus/). Without these, `yarn build` followed | ||
| # by `yarn lint` fails on generated files nobody wrote. | ||
| dist/ | ||
| **/build/ | ||
| **/.docusaurus/ | ||
|
|
||
| # Release notes, written by semantic-release | ||
| CHANGELOG.md |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import config from '@dhis2/config-prettier' | ||
|
|
||
| /** | ||
| * @type {import("prettier").Config} | ||
| */ | ||
| export default { ...config } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I normally use lint-staged here .. maybe we could discuss what approach to take in general and standardise, but happy with this if it works