Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Change: Rewrite repo in typescript, change tests to vitest, fix small bugs #300

Merged
merged 2 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .c8rc.json

This file was deleted.

27 changes: 0 additions & 27 deletions .editorconfig

This file was deleted.

46 changes: 46 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true,
"node": true,
"amd": true
},
"settings": {
"react": { "version": "detect" }
},
"extends": ["prettier", "eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["prettier", "unused-imports", "@typescript-eslint"],
"rules": {
"prefer-rest-params": "off",
"prefer-const": "error",
"prefer-spread": "off",
"no-case-declarations": "off",
"curly": ["error", "all"],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": ["off"],
"object-shorthand": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
],
"unused-imports/no-unused-imports-ts": "error"
}
}
13 changes: 0 additions & 13 deletions .eslintrc.yml

This file was deleted.

28 changes: 8 additions & 20 deletions .github/workflows/CI-CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- macos-latest
- windows-latest
node:
- 17
- 16
- lts/*
- current

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

- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile

- name: Run linter
run: npm run lint

- name: Run TypeScript tests
run: npm run test:typescript
run: yarn lint

- name: Run Node tests
run: npm run coverage:node
run: yarn test:node

- name: Send code coverage results to Coveralls
uses: coverallsapp/github-action@v1.1.0
Expand Down Expand Up @@ -77,19 +74,10 @@ jobs:
node-version: lts/*

- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile

- name: Run tests
run: npm run coverage:browser
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}

- name: Combine code coverage data into a single file
shell: bash
run: |
ls -Rlh coverage/*/lcov.info
cat coverage/*/lcov.info > ./coverage/lcov.info
run: yarn test:browser

- name: Send code coverage results to Coveralls
uses: coverallsapp/github-action@v1.1.0
Expand Down Expand Up @@ -126,10 +114,10 @@ jobs:
node-version: lts/*

- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile

- name: Prepare Unscoped Package
run: npm run build --if-present
run: yarn build

- name: Publish to NPM
run: npx semantic-release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ node_modules
# Test output
/.nyc_output
/coverage
dist
11 changes: 0 additions & 11 deletions .mocharc.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage
dist
node_modules
test/__snapshots__
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 120,
"arrowParens": "always",
"semi": true,
"tabWidth": 2,
"trailingComma": "all"
}
78 changes: 0 additions & 78 deletions karma.conf.cjs

This file was deleted.

Loading