Skip to content

Commit cc4d834

Browse files
mfranzkemichaelmkrausnmerget
authored
feat: added codespell (#4619)
* feat: added codespell * fix: lang annotations and spelling * refactor: further adaptions * chore: probably we just need to consolidate them * refactor: further adaptions * refactor: further adaptions * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * chore: another try * chore: another try * refactor: finalized this ignore configuration * refactor: further optimizations * Update research-other-design-systems.md * Update research-other-design-systems.md * Update research-other-design-systems.md * refactor: slight optimization * refactor: we should ignore those at their specific places * chore: let's get fancy on this one * chore: another one bites the dust * chore: fake it till you make it * refactor: added config file * Update .codespellrc * Update .codespellrc * Update 01-lint.yml * Update .codespellrc * chore: update codespell configuration to include additional file types to skip * chore: adapt codespell ignore words * chore: add pre-commit hook for codespell and adapt configuration * Update .github/workflows/01-lint.yml * chore: add codespell linting command to package.json and update lint-staged configuration * Apply suggestions from code review * refactor: moved that configuration file * feat: added necessary node package * refactor: we need to switch to that other library --------- Co-authored-by: Michael Kraus <[email protected]> Co-authored-by: Nicolas Merget <[email protected]> Co-authored-by: Nicolas Merget <[email protected]>
1 parent fe63360 commit cc4d834

File tree

34 files changed

+1241
-92
lines changed

34 files changed

+1241
-92
lines changed

.config/.lintstagedrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ export default {
1212
'**/package.json': [
1313
() => 'npm install --package-lock-only --ignore-scripts',
1414
'npm run lint:package-json'
15+
],
16+
'*.{md,mdx,txt,yml,yaml,ts,tsx,js,jsx,html,css,scss,sass,vue}': [
17+
() => 'npm run lint:codespell'
1518
]
1619
};

.config/cspell.config.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { defineConfig } from 'cspell';
2+
3+
export default defineConfig({
4+
version: '0.2',
5+
ignorePaths: [
6+
'*.lock',
7+
'package-lock.json',
8+
'node_modules',
9+
'.git',
10+
'__snapshots__',
11+
'dist',
12+
'build',
13+
'coverage',
14+
'*.svg',
15+
'*.png',
16+
'*.jpg',
17+
'*.jpeg',
18+
'*.gif',
19+
'*.ico',
20+
'*.woff',
21+
'*.woff2',
22+
'*.ttf',
23+
'*.eot',
24+
'**/build-*/**',
25+
'**/test-results/**',
26+
'./showcases/screen-reader/translations.ts',
27+
'storybooks/_storybook/src/welcome.mdx',
28+
'showcases/shared/*.json',
29+
'**/test/**',
30+
'packages/migration/**',
31+
'output/**',
32+
// Examples
33+
'showcases/react-showcase/src/components/form/index.tsx',
34+
'showcases/patternhub/pages/foundations/densities/examples.tsx',
35+
'showcases/angular-showcase/src/app/components/form/form.component.ts'
36+
],
37+
dictionaries: [
38+
'custom-words',
39+
'typescript',
40+
'css',
41+
'vue',
42+
'lorem',
43+
'lorem-ipsum',
44+
'npm',
45+
'node',
46+
'docker'
47+
],
48+
49+
// Tell CSpell about your dictionary
50+
dictionaryDefinitions: [
51+
{
52+
name: 'custom-words',
53+
path: './cspellignorewords.txt',
54+
addWords: true
55+
}
56+
]
57+
});

.config/cspellignorewords.txt

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
moz
2+
webkit
3+
merget
4+
franzke
5+
cicd
6+
Patternhub
7+
Textlink
8+
Navi
9+
Textareas
10+
vmodel
11+
textarevalue
12+
textareav
13+
Vetur
14+
robotstxt
15+
guidepup
16+
Guidepup
17+
Marketingportal
18+
llms
19+
checkins
20+
wombot
21+
zeplin
22+
styleguide
23+
behaviour
24+
navigations
25+
infotext
26+
loadingindicator
27+
sidenavi
28+
practise
29+
describedbyid
30+
ariaexpanded
31+
ariapressed
32+
standardised
33+
Lyne
34+
Webapps
35+
Barmer
36+
codespell
37+
Informationstechnikzentrum
38+
Koli
39+
steht
40+
Komponentenbibliothek
41+
Barrierefreiheit
42+
WPDS
43+
USWDS
44+
WCAG
45+
twbs
46+
Telerik
47+
Mistica
48+
stylised
49+
colour
50+
summarised
51+
customised
52+
selectpanel
53+
selectmultiple
54+
Dismissable
55+
subcomponents
56+
spacebar
57+
navs
58+
tabgroup
59+
tabtitle
60+
fittet
61+
brandings
62+
sublicensable
63+
NCIDS
64+
packagr
65+
fesm
66+
describedby
67+
labelledby
68+
referrerpolicy
69+
haspopup
70+
arialive
71+
screenreader
72+
snackbars
73+
bday
74+
untick
75+
networkidle
76+
domcontentloaded
77+
prettylights
78+
doctag
79+
mainnavigation
80+
hygen
81+
deutschebahn
82+
extranet
83+
shiki
84+
nord
85+
angulars
86+
occaecati
87+
ngmodel
88+
johndoe
89+
COMMITISH
90+
licence
91+
mdfiles
92+
DBUX
93+
dbux
94+
cssprop
95+
propertyname
96+
nodir
97+
Systel
98+
Nutzungsbedingungen
99+
Allgemeine
100+
behaviours
101+
tellerrand
102+
Personenverkehr
103+
screenreaders
104+
opionionated
105+
minireset
106+
jgthms
107+
dbneoscreensans
108+
postbuild
109+
whitelabel
110+
customisation
111+
closerequest
112+
closedby
113+
symbl
114+
unicodes
115+
pyftsubset
116+
fonttools
117+
Subline
118+
inlist
119+
dbbutton
120+
webauthn
121+
impp
122+
dblink
123+
dbradio
124+
dbcheckbox
125+
dbtabitem
126+
testv
127+
htmlid
128+
optgroups
129+
dbfooter
130+
dbheader
131+
subnavigation
132+
mypath
133+
subnavigation
134+
icononly
135+
autodocs
136+
amazonq
137+
Edgi
138+
dbtabpanel
139+
dbtablist

.github/workflows/01-lint-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
- name: 🔄 Init Cache
2222
uses: ./.github/actions/npm-cache
2323

24+
# 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).
25+
- name: 📖 Check spelling
26+
run: |
27+
npm run lint:codespell
28+
2429
- name: ⚡ Run Lint
2530
if: ${{ matrix.command == 'lint' }}
2631
run: |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ node node_modules/@db-ux/db-theme-illustrative-icons/build/scripts/index.js
2020
If you're contributing from a fork in your user space, please also set up those credentials from the Marketing portal in your fork repository as repository secrets. You need these credentials for the pipeline to decrypt the brand assets correctly.
2121

2222
> [!NOTE]
23-
> 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`)
23+
> 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`)
2424
2525
## Start locally
2626

docs/adr/adr-01-framework.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To achieve this we started with [Web Components](https://github.com/db-ui/elemen
1414
But we've encountered a number of problems with this approach:
1515

1616
- No auto-complete in IDE: Without `.d.ts` files you aren't able to use TypeScript properly
17-
- No specific framework solutions, for example Angulars [Reactive Forms](https://angular.io/guide/reactive-forms)
17+
- No specific framework solutions, for example Angular [Reactive Forms](https://angular.io/guide/reactive-forms)
1818
- Wrapping Components for React: Because of the virtual DOM Events need some wrapping, even [Lit](https://lit.dev/docs/frameworks/react/) needs this
1919
- Composition of nested Components (Accordion & AccordionItem etc.): Writing a components with Shadow DOM and nesting is complex and time-consuming
2020

@@ -53,7 +53,7 @@ We still expect Web Components to be the perfect solution for the future, but es
5353

5454
#### Evaluation
5555

56-
- Generated artefacts are "native" to each framework
56+
- Generated artifacts are "native" to each framework
5757
- Flexible build system with plugins
5858
- Builder.io as maintainer
5959
- TypeScript (tsx)
@@ -63,7 +63,7 @@ We still expect Web Components to be the perfect solution for the future, but es
6363

6464
#### Evaluation
6565

66-
- Generated artefacts are only slightly larger than Vanilla JS
66+
- Generated artifacts are only slightly larger than Vanilla JS
6767
- Polyfills are handled automatically
6868
- Flexible build system
6969
- With Ionic, a larger project is behind it as a maintainer

docs/adr/adr-02-monorepo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Decision and Rationale
44

5-
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).
5+
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).
66

77
## Problem description and context
88

docs/how-to-develop-a-component.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ We use [Mitosis](https://github.com/BuilderIO/Mitosis/tree/main/docs) to develop
5757

5858
### Good to know
5959

60-
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()`.
61-
2. Try to enable multiple ways of data-binding: For example in `select` you are able to pass in a list of `<option>` via the `props.children` similiar to standard HTML composition, but we also give the developers the possibility to pass in a stripped down option list via another property: `options?: DBSelectOptionType[]`. We populate this with the internal `<For>` from Mitosis.
60+
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.myAwesomeFunction()`.
61+
2. Try to enable multiple ways of data-binding: For example in `select` you are able to pass in a list of `<option>` via the `props.children` similar to standard HTML composition, but we also give the developers the possibility to pass in a stripped down option list via another property: `options?: DBSelectOptionType[]`. We populate this with the internal `<For>` from Mitosis.
6262
Why do we do this? We have multiple frameworks and all behave differently. With multiple ways of data-binding we try to provide a JS framework native experience as closely as we can.
6363
3. Try to parameterize a lot: For example if your component includes an icon button you should give it a text for accessibility. You should provide a default text, so it can't be empty, but you should also let the user change it with a property e.g. `iconButtonText`.
6464
4. To enable some native functionalities for Vue and Angular (`v-model` and `[(ng-model)]`) you might need to add some extra code to your component. At the generation process you might select `formValue` anyhow, but otherwise take a look at the `input` to see what you need to add to make this work.
@@ -94,13 +94,13 @@ Maybe you need to change the navigation to see the component: `showcases/angular
9494

9595
### React
9696

97-
Go to `showcases/react-showcase/src/components/my-awesome-component/index.tsx` and update the properties inside the `getMyAwsomeComponent` function and inside the `tsx` component. Again check out some existing component to get a feeling for this.
97+
Go to `showcases/react-showcase/src/components/my-awesome-component/index.tsx` and update the properties inside the `getMyAwesomeComponent` function and inside the `tsx` component. Again check out some existing component to get a feeling for this.
9898

9999
Maybe you need to change the navigation to see the component: `showcases/react-showcase/src/utils/navigation-item.tsx`
100100

101101
### Vue
102102

103-
Go to `showcases/vue-showcase/src/components/my-awesome-component/MyAwesomeComponent.vue` and update the properties inside the `DBMyAwsomeComponent` with `exampleProps.xxx`. Again check out some existing component to get a feeling for this.
103+
Go to `showcases/vue-showcase/src/components/my-awesome-component/MyAwesomeComponent.vue` and update the properties inside the `DBMyAwesomeComponent` with `exampleProps.xxx`. Again check out some existing component to get a feeling for this.
104104

105105
Maybe you need to change the navigation to see the component: `showcases/vue-showcase/src/utils/navigation-items.ts`
106106

docs/migration/alpha-beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
| Name | Description | Action |
1919
| --------------------------------- | -------------------------------------------------------------------------------------------------------- | ------ |
20-
| ❌ removed `style-dictonary` | all variables will be generated in [theme-builder](https://github.com/db-ux-design-system/theme-builder) | --- |
20+
| ❌ removed `style-dictionary` | all variables will be generated in [theme-builder](https://github.com/db-ux-design-system/theme-builder) | --- |
2121
| ❌ removed `zeplin-styleguide.js` | we use `Figma` in the future | --- |
2222

2323
## Components

docs/research-other-design-systems.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We'd like to maintain a list of other design systems that might be interesting f
2424
- Web Components / StencilJS
2525
- [Porsche Design System](https://designsystem.porsche.com/v3/)
2626
- Web Components / StencilJS
27-
- [Barmer Puls Design System](https://barmer-puls.entw.bconnect.barmer.de/)
27+
- [Barmer Puls Design System](https://barmer-puls.entw.bconnect.barmer.de/) <!-- codespell:ignore -->
2828
- React Native
2929
- [Storybook](https://barmer-puls-react.entw.bconnect.barmer.de/?path=/story/surfaces-accordion--base)
3030
- [SAP UI5 Web Components](https://sap.github.io/ui5-webcomponents/)
@@ -40,7 +40,7 @@ We'd like to maintain a list of other design systems that might be interesting f
4040
- HTML & CSS first
4141
- JavaScript only as an addition, mainly because of that the target are content pages even only
4242
- Web Components (upcoming)
43-
- ["Informationstechnikzentrum Bund" Germany / KoliBri steht für "Komponentenbibliothek für die Barrierefreiheit"](https://public-ui.github.io/)
43+
- ["Informationstechnikzentrum Bund" Germany / KoliBri steht für "Komponentenbibliothek für die Barrierefreiheit"](https://public-ui.github.io/) <!-- codespell:ignore -->
4444
- Web Components / StencilJS
4545
- [Washington Post Design System (WPDS)](https://build.washingtonpost.com/)
4646
- React

0 commit comments

Comments
 (0)