diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000000..1ea9900bd343 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +skip = *.lock,*.json,node_modules,.git,__snapshots__,__snapshots__,dist,build,coverage,*.svg,*.png,*.jpg,*.jpeg,*.gif,*.ico,*.woff,*.woff2,*.ttf,*.eot,./showcases/screen-reader/translations.ts diff --git a/.config/.codespellignorewords b/.config/.codespellignorewords new file mode 100644 index 000000000000..4e769678c156 --- /dev/null +++ b/.config/.codespellignorewords @@ -0,0 +1,3 @@ +moz +webkit +merget diff --git a/.config/.lintstagedrc.js b/.config/.lintstagedrc.js index fafd909006f1..e96f8636a845 100644 --- a/.config/.lintstagedrc.js +++ b/.config/.lintstagedrc.js @@ -16,4 +16,7 @@ export default { () => 'npm install --package-lock-only --ignore-scripts', 'npx npm-package-json-lint' ], + '*.{md,mdx,txt,yml,yaml,ts,tsx,js,jsx,html,css,scss,sass,vue}': [ + 'npm run lint:codespell -- --write-changes --' + ] }; diff --git a/.github/workflows/01-lint.yml b/.github/workflows/01-lint.yml index 95c0755fd4e4..ee03d83cf9e9 100644 --- a/.github/workflows/01-lint.yml +++ b/.github/workflows/01-lint.yml @@ -14,6 +14,13 @@ jobs: - name: πŸ”„ Init Cache uses: ./.github/actions/npm-cache + # For now we keep this check in the codebase, even though that we already do the codespell check on git pre-commit hook. We might remove this check in the pipeline (even though that performance is not an issue, but it might be good for reducing external dependencies). + - name: πŸ“– Check spelling + uses: codespell-project/actions-codespell@v2 + with: + ignore_words_file: .config/.codespellignorewords + check_filenames: true + - name: ⚑ Run Lint run: | npm run postinstall --workspace=nuxt-showcase diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d14daefe038a..bfede2d9d0dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ node node_modules/@db-ux/db-theme-illustrative-icons/build/scripts/index.js ``` > [!NOTE] -> If you missed setting up the `.env`-file before running `npm install`, you may need to re-install your packages to ensure the postinstall scrips are executed for decrypting the fonts and other artifacts (`rm --recursive --force node_modules/@db-ux/db-theme* && npm update @db-ux/db-theme`) +> If you missed setting up the `.env`-file before running `npm install`, you may need to re-install your packages to ensure the postinstall scripts are executed for decrypting the fonts and other artifacts (`rm --recursive --force node_modules/@db-ux/db-theme* && npm update @db-ux/db-theme`) ## Start locally diff --git a/docs/adr/adr-02-monorepo.md b/docs/adr/adr-02-monorepo.md index 68e614f28788..248b465e0eec 100644 --- a/docs/adr/adr-02-monorepo.md +++ b/docs/adr/adr-02-monorepo.md @@ -2,7 +2,7 @@ ## Decision and Rationale -To reduce the amount of time spent deploying and linking dependant packages, we combined [base](https://github.com/db-ui/base), [core](https://github.com/db-ui/core) and [elements](https://github.com/db-ui/elements) into a single monorepo, and evolved afterwards regarding new technologies (compare to ADR 01). +To reduce the amount of time spent deploying and linking dependent packages, we combined [base](https://github.com/db-ui/base), [core](https://github.com/db-ui/core) and [elements](https://github.com/db-ui/elements) into a single monorepo, and evolved afterwards regarding new technologies (compare to ADR 01). ## Problem description and context diff --git a/docs/how-to-develop-a-component.md b/docs/how-to-develop-a-component.md index 3337feeb3998..92455375b807 100644 --- a/docs/how-to-develop-a-component.md +++ b/docs/how-to-develop-a-component.md @@ -58,7 +58,7 @@ We use [Mitosis](https://github.com/BuilderIO/Mitosis/tree/main/docs) to develop ### Good to know 1. You cannot use functions directly in a Mitosis component. A function has to be inside the `state`. So add your function to the `model.ts` `DBMyAwesomeComponentDefaultState`. Then you can define your component inside the `.tsx` file and use it in the `jsx` with `state.myAwsomeFunction()`. -2. Try to enable multiple ways of data-binding: For example in `select` you are able to pass in a list of `