Skip to content

Commit e75b0a9

Browse files
committed
chore: migrate to oxlint/oxfmt, add commitizen, add TypeScript types, update tabbable to v6
- Replace ESLint/Prettier with oxlint and oxfmt - Install commitizen with cz-conventional-changelog and prepare-commit-msg hook - Add TypeScript types.ts files for all components from pr/typescript-types - Update tabbable from v4 to v6 (named export API), remove @types/tabbable - Fix CdrPopover to imperatively set aria-controls on trigger child via onMounted - Fix CdrLabelStandalone whitespace in required/optional spans - Add 68 new component entrypoints in src/entrypoints/ - Update and regenerate all affected test snapshots (60+ updated) - Tests: 4 pre-existing failures remain (missing deps), 0 new failures
1 parent 538f1c2 commit e75b0a9

423 files changed

Lines changed: 20267 additions & 6405 deletions

File tree

Some content is hidden

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

.commitlintrc.js

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
export default {
2-
rules: {
3-
'body-leading-blank': [1, 'always'],
4-
'footer-leading-blank': [0, 'always'],
5-
'header-max-length': [2, 'always', 100],
6-
'scope-case': [2, 'always', 'lower-case'],
2+
rules: {
3+
'body-leading-blank': [1, 'always'],
4+
'footer-leading-blank': [0, 'always'],
5+
'header-max-length': [2, 'always', 100],
6+
'scope-case': [2, 'always', 'lower-case'],
77

8-
'subject-case': [
9-
2,
10-
'never',
11-
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
12-
],
13-
'subject-empty': [2, 'never'],
14-
'subject-full-stop': [2, 'never', '.'],
15-
'type-case': [0, 'always', 'lower-case'],
16-
'type-empty': [2, 'never'],
17-
'type-enum': [
18-
2,
19-
'always',
20-
[
21-
'feat',
22-
'fix',
23-
'docs',
24-
'style',
25-
'refactor',
26-
'perf',
27-
'test',
28-
'chore',
29-
'revert',
30-
'build',
31-
'WIP'
32-
]
33-
]
34-
}
35-
};
8+
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
9+
'subject-empty': [2, 'never'],
10+
'subject-full-stop': [2, 'never', '.'],
11+
'type-case': [0, 'always', 'lower-case'],
12+
'type-empty': [2, 'never'],
13+
'type-enum': [
14+
2,
15+
'always',
16+
[
17+
'feat',
18+
'fix',
19+
'docs',
20+
'style',
21+
'refactor',
22+
'perf',
23+
'test',
24+
'chore',
25+
'revert',
26+
'build',
27+
'WIP',
28+
],
29+
],
30+
},
31+
};

.czrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"path": "cz-conventional-changelog",
3+
"types": [
4+
{ "value": "feat", "name": "feat: A new feature" },
5+
{ "value": "fix", "name": "fix: A bug fix" },
6+
{ "value": "docs", "name": "docs: Documentation only changes" },
7+
{ "value": "style", "name": "style: Formatting, missing semi-colons, etc; no logic change" },
8+
{ "value": "refactor", "name": "refactor: A code change that is neither a bug fix nor a new feature" },
9+
{ "value": "perf", "name": "perf: A code change that improves performance" },
10+
{ "value": "test", "name": "test: Adding missing or correcting existing tests" },
11+
{ "value": "chore", "name": "chore: Changes to the build process or auxiliary tools" },
12+
{ "value": "revert", "name": "revert: Revert to a commit" },
13+
{ "value": "ci", "name": "ci: Changes to CI configuration files and scripts" },
14+
{ "value": "vercel", "name": "vercel: Vercel deployment configuration" }
15+
]
16+
}

.github/UNIT-TEST-GUIDELINES.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## General:
2+
23
- Add tests any time a bug is discovered
34
- Test one thing at a time
45
- Jest snapshot
@@ -15,12 +16,13 @@
1516
- Emitted events and values
1617

1718
## "CORRECT" Boundary Conditions
19+
1820
- **C**onformance — Does the value conform to an expected format?
1921
- **O**rdering — Is the set of values ordered or unordered as appropriate?
2022
- **R**ange — Is the value within reasonable minimum and maximum values?
2123
- **R**eference — Does the code reference anything external that isn’t under direct control
22-
of the code itself?
24+
of the code itself?
2325
- **E**xistence — Does the value exist? (e.g., is non-null, non-zero, present in a set, etc.)
2426
- **C**ardinality — Are there exactly enough values?
2527
- **T**ime (absolute and relative) — Is everything happening in order? At the right time?
26-
In time?
28+
In time?

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
## Checklist:
66

77
### Design:
8+
89
- [ ] Reviewed with designer and meets expectations
910

1011
### Cross-browser testing:
12+
1113
- [ ] Chrome
1214
- [ ] Firefox
1315
- [ ] Edge
@@ -16,12 +18,15 @@
1618
- [ ] Android
1719

1820
### Unit testing:
21+
1922
- [ ] Sufficient unit test coverage (see unit test best practices for ideas)
2023
- [ ] Snapshot updates are explained with comment and reference the relevant source code change
2124

2225
### A11y:
26+
2327
- [ ] Meets WCAG AA standards
2428

2529
### Documentation:
30+
2631
- [ ] API docs created/updated
2732
- [ ] Examples created/updated

.github/workflows/deploy.js.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: Deploy
22

33
on:
44
push:
5-
branches: [ next, main ]
5+
branches: [next, main]
66

77
jobs:
88
build:
9-
109
runs-on: ubuntu-latest
1110

1211
strategy:

.github/workflows/node.js.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v4
15-
with:
16-
node-version: lts/*
17-
- name: Install dependencies
18-
run: npm ci
19-
- run: npm run build --if-present
20-
- run: npm run lint
21-
- run: npm run unit
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: lts/*
17+
- name: Install dependencies
18+
run: npm ci
19+
- run: npm run build --if-present
20+
- run: npm run lint
21+
- run: npm run unit

.github/workflows/playwright.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
name: Playwright Tests
22
on:
33
push:
4-
branches: [ main, master ]
4+
branches: [main, master]
55
pull_request:
6-
branches: [ main, master ]
6+
branches: [main, master]
77
jobs:
88
test:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: lts/*
16-
- name: Install dependencies
17-
run: npm ci
18-
- name: Install Playwright Browsers
19-
run: npx playwright install --with-deps
20-
- name: Run Playwright tests
21-
run: npx playwright test
22-
- uses: actions/upload-artifact@v4
23-
if: ${{ !cancelled() }}
24-
with:
25-
name: playwright-report
26-
path: playwright-report/
27-
retention-days: 30
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: lts/*
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Install Playwright Browsers
19+
run: npx playwright install --with-deps
20+
- name: Run Playwright tests
21+
run: npx playwright test
22+
- uses: actions/upload-artifact@v4
23+
if: ${{ !cancelled() }}
24+
with:
25+
name: playwright-report
26+
path: playwright-report/
27+
retention-days: 30

.husky/prepare-commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exec < /dev/tty && node_modules/.bin/cz --hook || true

.prettierrc.json renamed to .oxfmtrc.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
23
"printWidth": 100,
34
"tabWidth": 2,
45
"useTabs": false,
@@ -13,6 +14,7 @@
1314
"proseWrap": "preserve",
1415
"htmlWhitespaceSensitivity": "ignore",
1516
"vueIndentScriptAndStyle": false,
16-
"endOfLine": "auto",
17-
"singleAttributePerLine": true
17+
"singleAttributePerLine": true,
18+
"sortPackageJson": false,
19+
"ignorePatterns": ["dist/", "build/", "node_modules/", "templates/", "src/components/icon/comps/"]
1820
}

.oxlintrc.json

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["vue", "typescript"],
4+
"categories": {
5+
"correctness": "off"
6+
},
7+
"env": {
8+
"builtin": true
9+
},
10+
"ignorePatterns": [
11+
"build/*.js",
12+
"config/*.js",
13+
"dist-docs/",
14+
"dist/",
15+
"test/",
16+
"node_modules/",
17+
"backstop_data/html_report/",
18+
"src/**/__tests__/*.spec.js",
19+
"src/**/dist/*.js",
20+
"src/**/examples/",
21+
"src/components/icon/comps/*",
22+
"templates/"
23+
],
24+
"rules": {
25+
"constructor-super": "error",
26+
"for-direction": "error",
27+
"no-async-promise-executor": "error",
28+
"no-case-declarations": "error",
29+
"no-class-assign": "error",
30+
"no-compare-neg-zero": "error",
31+
"no-cond-assign": "error",
32+
"no-const-assign": "error",
33+
"no-constant-binary-expression": "error",
34+
"no-constant-condition": "error",
35+
"no-control-regex": "error",
36+
"no-debugger": "error",
37+
"no-delete-var": "error",
38+
"no-dupe-class-members": "error",
39+
"no-dupe-else-if": "error",
40+
"no-dupe-keys": "error",
41+
"no-duplicate-case": "error",
42+
"no-empty": "error",
43+
"no-empty-character-class": "error",
44+
"no-empty-pattern": "error",
45+
"no-empty-static-block": "error",
46+
"no-ex-assign": "error",
47+
"no-extra-boolean-cast": "error",
48+
"no-fallthrough": "error",
49+
"no-func-assign": "error",
50+
"no-global-assign": "error",
51+
"no-import-assign": "error",
52+
"no-invalid-regexp": "error",
53+
"no-irregular-whitespace": "error",
54+
"no-loss-of-precision": "error",
55+
"no-misleading-character-class": "error",
56+
"no-new-native-nonconstructor": "error",
57+
"no-nonoctal-decimal-escape": "error",
58+
"no-obj-calls": "error",
59+
"no-prototype-builtins": "error",
60+
"no-redeclare": "error",
61+
"no-regex-spaces": "error",
62+
"no-self-assign": "error",
63+
"no-setter-return": "error",
64+
"no-shadow-restricted-names": "error",
65+
"no-sparse-arrays": "error",
66+
"no-this-before-super": "error",
67+
"no-unexpected-multiline": "error",
68+
"no-unsafe-finally": "error",
69+
"no-unsafe-negation": "error",
70+
"no-unsafe-optional-chaining": "error",
71+
"no-unused-labels": "error",
72+
"no-unused-private-class-members": "error",
73+
"no-unused-vars": "error",
74+
"no-useless-backreference": "error",
75+
"no-useless-catch": "error",
76+
"no-useless-escape": "error",
77+
"no-with": "error",
78+
"require-yield": "error",
79+
"use-isnan": "error",
80+
"valid-typeof": "error",
81+
"vue/no-arrow-functions-in-watch": "error",
82+
"vue/no-deprecated-destroyed-lifecycle": "error",
83+
"vue/no-export-in-script-setup": "error",
84+
"vue/no-lifecycle-after-await": "error",
85+
"vue/prefer-import-from-vue": "error",
86+
"vue/valid-define-emits": "error",
87+
"vue/valid-define-props": "error",
88+
"@typescript-eslint/ban-ts-comment": "error",
89+
"no-array-constructor": "error",
90+
"@typescript-eslint/no-duplicate-enum-values": "error",
91+
"@typescript-eslint/no-empty-object-type": "error",
92+
"@typescript-eslint/no-explicit-any": "off",
93+
"@typescript-eslint/no-extra-non-null-assertion": "error",
94+
"@typescript-eslint/no-misused-new": "error",
95+
"@typescript-eslint/no-namespace": "error",
96+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
97+
"@typescript-eslint/no-require-imports": "error",
98+
"@typescript-eslint/no-this-alias": "error",
99+
"@typescript-eslint/no-unnecessary-type-constraint": "error",
100+
"@typescript-eslint/no-unsafe-declaration-merging": "error",
101+
"@typescript-eslint/no-unsafe-function-type": "error",
102+
"no-unused-expressions": "error",
103+
"@typescript-eslint/no-wrapper-object-types": "error",
104+
"@typescript-eslint/prefer-as-const": "error",
105+
"@typescript-eslint/prefer-namespace-keyword": "error",
106+
"@typescript-eslint/triple-slash-reference": "error"
107+
},
108+
"overrides": [
109+
{
110+
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
111+
"rules": {
112+
"constructor-super": "off",
113+
"no-class-assign": "off",
114+
"no-const-assign": "off",
115+
"no-dupe-class-members": "off",
116+
"no-dupe-keys": "off",
117+
"no-func-assign": "off",
118+
"no-import-assign": "off",
119+
"no-new-native-nonconstructor": "off",
120+
"no-obj-calls": "off",
121+
"no-redeclare": "off",
122+
"no-setter-return": "off",
123+
"no-this-before-super": "off",
124+
"no-unsafe-negation": "off",
125+
"no-var": "error",
126+
"no-with": "off",
127+
"prefer-const": "error",
128+
"prefer-rest-params": "error",
129+
"prefer-spread": "error"
130+
}
131+
},
132+
{
133+
"files": ["**/*.{js,mjs,ts,vue}"],
134+
"rules": {
135+
"no-use-before-define": "off",
136+
"@typescript-eslint/no-explicit-any": "off",
137+
"no-unused-vars": [
138+
"error",
139+
{
140+
"argsIgnorePattern": "^_",
141+
"varsIgnorePattern": "^_",
142+
"caughtErrorsIgnorePattern": "^_",
143+
"ignoreRestSiblings": true
144+
}
145+
]
146+
},
147+
"env": {
148+
"browser": true,
149+
"es2024": true,
150+
"node": true
151+
}
152+
}
153+
]
154+
}

0 commit comments

Comments
 (0)