Skip to content

Commit 4ee91f2

Browse files
committed
refactor(app): move to a full React library
1 parent 430f3e5 commit 4ee91f2

File tree

1,694 files changed

+21047
-7192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,694 files changed

+21047
-7192
lines changed

.cds/actions/setup.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "setup"
2+
description: "Setup ODS repository"
3+
runs:
4+
runs-on: library/node-22
5+
steps:
6+
- name: Checkout code
7+
uses: actions/checkout
8+
9+
- name: Install Yarn
10+
run: npm i --force -g yarn
11+
12+
- name: Install dependencies
13+
run: yarn

.cds/workflows/pull-request-check.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: pull-request-check
2+
3+
on: [push]
4+
5+
integrations:
6+
- artifactory-digital-tools-tech-components-ods
7+
8+
jobs:
9+
deploy-storybook:
10+
runs-on: library/node-22
11+
steps:
12+
- name: Setup repository
13+
uses: .cds/actions/setup.yml
14+
15+
- name: Build ODS
16+
run: yarn build:prod
17+
18+
- name: Generate documentation
19+
run: yarn doc
20+
21+
- name: Build storybook
22+
run: yarn build:storybook
23+
24+
- uses: library/serveStaticFiles
25+
with:
26+
name: ods-storybook
27+
destination: ${{ git.ref_name }}
28+
source: packages/storybook/dist
29+
30+
e2e-tests:
31+
runs-on: library/node-22
32+
steps:
33+
- name: Install needed libraries
34+
run: |
35+
apt-get update -y
36+
apt install -y ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
37+
38+
- name: Setup repository
39+
uses: .cds/actions/setup.yml
40+
41+
- name: Build ODS
42+
run: yarn build:prod
43+
44+
- name: Run e2e tests
45+
run: yarn test:e2e:ci
46+
47+
linters:
48+
runs-on: library/node-22
49+
steps:
50+
- name: Setup repository
51+
uses: .cds/actions/setup.yml
52+
53+
- name: Run linter TS
54+
run: yarn lint:ts
55+
56+
- name: Run linter SCSS
57+
run: yarn lint:scss
58+
59+
unit-tests:
60+
runs-on: library/node-22
61+
steps:
62+
- name: Setup repository
63+
uses: .cds/actions/setup.yml
64+
65+
- name: Run unit tests
66+
run: yarn test:spec:ci

.eslintrc

+23-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"extends": [
33
"eslint:recommended",
4-
"plugin:@typescript-eslint/recommended"
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:react/recommended",
6+
"plugin:react/jsx-runtime"
57
],
68
"parser": "@typescript-eslint/parser",
79
"parserOptions": {
@@ -12,7 +14,8 @@
1214
"plugins": [
1315
"@typescript-eslint",
1416
"eslint-plugin-import",
15-
"eslint-plugin-tsdoc"
17+
"eslint-plugin-tsdoc",
18+
"react"
1619
],
1720
"root": true,
1821
"rules": {
@@ -26,19 +29,23 @@
2629
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
2730
"array-bracket-spacing": ["error", "never"],
2831
"arrow-parens": ["error", "always"],
29-
"arrow-spacing": ["error", { "before": true, "after": true }],
32+
"arrow-spacing": ["error", { "after": true, "before": true }],
3033
"brace-style": ["error", "1tbs"],
3134
"comma-dangle": ["error", "always-multiline"],
3235
"complexity": ["error"],
3336
"curly": ["error", "all"],
3437
"default-case": "error",
3538
"func-call-spacing": ["error", "never"],
36-
"func-style": ["error", "declaration"],
39+
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
3740
"function-call-argument-newline": ["error", "consistent"],
3841
"import/no-unresolved": "error",
3942
"import/order": [
4043
"error",
4144
{
45+
"alphabetize": {
46+
"caseInsensitive": true,
47+
"order": "asc"
48+
},
4249
"groups": [
4350
"type",
4451
"builtin", // Built-in imports (come from NodeJS native) go first
@@ -51,10 +58,13 @@
5158
"unknown" // <- unknown
5259
],
5360
"newlines-between": "never",
54-
"alphabetize": {
55-
"order": "asc",
56-
"caseInsensitive": true
57-
}
61+
"pathGroups": [
62+
{
63+
"group": "object",
64+
"pattern": "{.,..}/*.scss", // same directory only
65+
"position": "after"
66+
}
67+
]
5868
}
5969
],
6070
"indent": ["error", 2, { "SwitchCase": 1 }],
@@ -65,7 +75,7 @@
6575
"newline-per-chained-call": "off",
6676
"no-array-constructor": "error",
6777
"no-await-in-loop": "error",
68-
"no-console": ["error", { "allow": ["warn", "error"] }],
78+
"no-console": ["error", { "allow": ["error", "warn"] }],
6979
"no-extra-bind": "error",
7080
"no-magic-numbers": "off",
7181
"no-multi-spaces": "error",
@@ -75,6 +85,7 @@
7585
"object-curly-spacing": ["error", "always"],
7686
"operator-linebreak": ["error", "before", { "overrides": { "&&": "after" }}],
7787
"quotes": ["error", "single"],
88+
"react/prop-types": 0,
7889
"semi": ["error", "always"],
7990
"sort-imports": [
8091
"error",
@@ -94,6 +105,9 @@
94105
"typescript": {
95106
"project": "./tsconfig.json"
96107
}
108+
},
109+
"react": {
110+
"version": "detect"
97111
}
98112
}
99113
}

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Created by https://www.toptal.com/developers/gitignore/api/node
32
# Edit at https://www.toptal.com/developers/gitignore?templates=node
43

@@ -11,7 +10,7 @@ yarn-debug.log*
1110
yarn-error.log*
1211
lerna-debug.log*
1312

14-
# Stencil #
13+
-# Stencil #
1514
.stencil/
1615
dist/
1716
loader/
@@ -140,6 +139,7 @@ Thumbs.db
140139

141140
# remove generated definition files
142141
*.d.ts
142+
!modules.d.ts
143143

144144
# used file storing the artijfrog token, used when building docker image
145145
/artitoken

package.json

+7-12
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@
77
"license": "Apache-2.0",
88
"workspaces": [
99
"packages/examples/*",
10-
"packages/ods",
11-
"packages/ods/react",
12-
"packages/ods/react/tests/*",
13-
"packages/ods/src/components/!(dist|loader)*",
14-
"packages/ods/style",
15-
"packages/ods/vue",
16-
"packages/ods/vue/tests/*",
10+
"packages/ods-react",
11+
"packages/ods-react/src/components/*",
1712
"packages/storybook",
1813
"packages/themes"
1914
],
@@ -22,11 +17,11 @@
2217
"build:prod": "lerna run --stream build:prod",
2318
"build:storybook": "lerna run --stream build:storybook",
2419
"clean": "lerna run clean",
25-
"doc": "lerna run doc",
20+
"doc": "lerna run --concurrency 1 doc",
2621
"lint": "yarn lint:ts && yarn lint:scss",
2722
"lint:a11y": "lerna run lint:a11y",
28-
"lint:ts": "lerna run lint:ts",
29-
"lint:scss": "lerna run lint:scss",
23+
"lint:ts": "lerna run --concurrency 1 lint:ts",
24+
"lint:scss": "lerna run --concurrency 1 lint:scss",
3025
"new:component": "plop --plopfile scripts/component-generator/plopfile.js component",
3126
"ods:graduate": "yarn ods:release:prepare && yarn version:graduate",
3227
"ods:major": "yarn ods:release:prepare && yarn version:major",
@@ -65,6 +60,7 @@
6560
"eslint-import-resolver-typescript": "3.6.1",
6661
"eslint-plugin-import": "2.29.1",
6762
"eslint-plugin-jsx-a11y": "6.8.0",
63+
"eslint-plugin-react": "7.37.4",
6864
"eslint-plugin-tsdoc": "0.2.17",
6965
"husky": "4.3.8",
7066
"lerna": "3.22.1",
@@ -76,11 +72,10 @@
7672
"stylelint-formatter-html": "1.0.1"
7773
},
7874
"engines": {
79-
"node": ">= 18.17",
75+
"node": ">= 22",
8076
"yarn": ">= 2.4.0"
8177
},
8278
"resolutions": {
83-
"@types/react": "18.2.56",
8479
"@types/scheduler": "< 0.23.0"
8580
}
8681
}

0 commit comments

Comments
 (0)