Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

91 changes: 0 additions & 91 deletions .eslintrc.js

This file was deleted.

8 changes: 4 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ _text_

### Known issues

- [ ] _issue_
- [ ] _issue_

---

### Checklist

- [ ] API docs are generated
- [ ] Tests were added
- [ ] Storybook demos were added
- [ ] API docs are generated
- [ ] Tests were added
- [ ] Storybook demos were added

_All points above should be relevant for feature PRs. For bugfixes, some points might not be relevant. In that case, just check them anyway to signal the work is done._

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dhis2-deploy-netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x

# We use Netlify only for deploy previews, production docs are hosted at developers.dhis2.org
# Don't build anything, just copy the _redirects file into the dist directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dhis2-preview-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'

- run: yarn install --frozen-lockfile
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'

- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: JulienKode/pull-request-name-linter-action@v0.5.0
with:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

# The title is untrusted input, so it reaches the shell through
# the environment.
- name: Lint pull request title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | yarn commitlint

lint-commits:
runs-on: ubuntu-latest
Expand All @@ -29,12 +31,8 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'

- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: wagoid/commitlint-github-action@v5
with:
configFile: ${{ steps.commitlint.outputs.config_path }}
- uses: wagoid/commitlint-github-action@v6
10 changes: 5 additions & 5 deletions .github/workflows/dhis2-verify-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'

- run: |
Expand All @@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'

- uses: actions/download-artifact@v4
Expand All @@ -87,7 +87,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'

- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x

- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
token: ${{ env.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: 'yarn'
- uses: dhis2/action-commit-signing@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-and-upload-bom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x

- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
1 change: 0 additions & 1 deletion .hooks/.gitignore

This file was deleted.

3 changes: 1 addition & 2 deletions .hooks/commit-msg
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"
20 changes: 18 additions & 2 deletions .hooks/pre-commit
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() {

Copy link
Copy Markdown
Collaborator

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

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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v24
8 changes: 8 additions & 0 deletions .prettierignore
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
5 changes: 0 additions & 5 deletions .prettierrc.js

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.mjs
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 }
18 changes: 9 additions & 9 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ In React fashion we rely on composition to enable the goal of having

This means that:

- complex components are constructed by connecting several simple
components,
- complex components are constructed by connecting several simple
components,

- a consumer must have direct access to the building blocks that make up
composed components,
- a consumer must have direct access to the building blocks that make up
composed components,

- components need to be isolated from each other with a well defined
interface and scope,
- components need to be isolated from each other with a well defined
interface and scope,

- components needs to be reusable across many contexts.
- components needs to be reusable across many contexts.

> _Note_: Components are published under the `@dhis2-ui` scope, and will
> eventually be considered part of the external API as things stabilize.
Expand Down Expand Up @@ -110,6 +110,6 @@ through that collection.

UI uses two different scopes on NPM to publish:

- `@dhis2/ui*`: Collections and utilities.
- `@dhis2/ui*`: Collections and utilities.

- `@dhis2-ui/*`: Component packages are published under this scope.
- `@dhis2-ui/*`: Component packages are published under this scope.
Loading
Loading