Skip to content

Commit f2130ef

Browse files
committed
feat: Rewrite repo in typescript, change testing schema to vitest, fix package versions
1 parent 12cb26a commit f2130ef

File tree

215 files changed

+12204
-36319
lines changed

Some content is hidden

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

215 files changed

+12204
-36319
lines changed

.c8rc.json

-4
This file was deleted.

.editorconfig

-27
This file was deleted.

.eslintrc.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es2021": true,
6+
"node": true,
7+
"amd": true
8+
},
9+
"settings": {
10+
"react": { "version": "detect" }
11+
},
12+
"extends": ["prettier", "eslint:recommended", "plugin:@typescript-eslint/recommended"],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaFeatures": {
16+
"jsx": true
17+
},
18+
"ecmaVersion": 12,
19+
"sourceType": "module"
20+
},
21+
"plugins": ["prettier", "unused-imports", "@typescript-eslint"],
22+
"rules": {
23+
"prefer-rest-params": "off",
24+
"prefer-const": "error",
25+
"prefer-spread": "off",
26+
"no-case-declarations": "off",
27+
"curly": ["error", "all"],
28+
"@typescript-eslint/no-non-null-assertion": "off",
29+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
30+
"@typescript-eslint/consistent-type-imports": [
31+
"error",
32+
{
33+
"prefer": "type-imports"
34+
}
35+
],
36+
"@typescript-eslint/ban-ts-comment": "off",
37+
"@typescript-eslint/no-explicit-any": "off",
38+
"@typescript-eslint/no-use-before-define": ["off"],
39+
"object-shorthand": "error",
40+
"@typescript-eslint/no-unused-vars": [
41+
"warn",
42+
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
43+
],
44+
"unused-imports/no-unused-imports-ts": "error"
45+
}
46+
}

.eslintrc.yml

-13
This file was deleted.

.github/workflows/CI-CD.yaml

+8-20
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- macos-latest
2626
- windows-latest
2727
node:
28-
- 17
28+
- 16
2929
- lts/*
3030
- current
3131

@@ -39,16 +39,13 @@ jobs:
3939
node-version: ${{ matrix.node }}
4040

4141
- name: Install dependencies
42-
run: npm ci
42+
run: yarn install --frozen-lockfile
4343

4444
- name: Run linter
45-
run: npm run lint
46-
47-
- name: Run TypeScript tests
48-
run: npm run test:typescript
45+
run: yarn lint
4946

5047
- name: Run Node tests
51-
run: npm run coverage:node
48+
run: yarn test:node
5249

5350
- name: Send code coverage results to Coveralls
5451
uses: coverallsapp/[email protected]
@@ -77,19 +74,10 @@ jobs:
7774
node-version: lts/*
7875

7976
- name: Install dependencies
80-
run: npm ci
77+
run: yarn install --frozen-lockfile
8178

8279
- name: Run tests
83-
run: npm run coverage:browser
84-
env:
85-
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
86-
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
87-
88-
- name: Combine code coverage data into a single file
89-
shell: bash
90-
run: |
91-
ls -Rlh coverage/*/lcov.info
92-
cat coverage/*/lcov.info > ./coverage/lcov.info
80+
run: yarn test:browser
9381

9482
- name: Send code coverage results to Coveralls
9583
uses: coverallsapp/[email protected]
@@ -126,10 +114,10 @@ jobs:
126114
node-version: lts/*
127115

128116
- name: Install dependencies
129-
run: npm ci
117+
run: yarn install --frozen-lockfile
130118

131119
- name: Prepare Unscoped Package
132-
run: npm run build --if-present
120+
run: yarn build
133121

134122
- name: Publish to NPM
135123
run: npx semantic-release

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ node_modules
3838
# Test output
3939
/.nyc_output
4040
/coverage
41+
dist

.mocharc.yml

-11
This file was deleted.

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage
2+
dist
3+
node_modules
4+
test/__snapshots__

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 120,
3+
"arrowParens": "always",
4+
"semi": true,
5+
"tabWidth": 2,
6+
"trailingComma": "all"
7+
}

karma.conf.cjs

-78
This file was deleted.

0 commit comments

Comments
 (0)