-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(lib): fix exports, add types, and support svelte 4
- Loading branch information
Showing
37 changed files
with
4,965 additions
and
8,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
{ | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2019, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true, | ||
"es2017": true, | ||
"commonjs": true, | ||
"browser": true, | ||
"node": true, | ||
"jest/globals": true | ||
"node": true | ||
}, | ||
"plugins": [ | ||
"jest", | ||
"svelte3" | ||
], | ||
"extends": [ | ||
"eslint:recommended" | ||
], | ||
"ignorePatterns": [ | ||
"dist", | ||
"lib" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["vitest"], | ||
"extends": ["eslint:recommended", "plugin:vitest/recommended"], | ||
"ignorePatterns": ["**/*.snap.js"], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"src/**/*.svelte" | ||
], | ||
"processor": "svelte3/svelte3" | ||
"files": ["*.ts"], | ||
"parser": "@typescript-eslint/parser" | ||
}, | ||
{ | ||
"files": ["*.svelte"], | ||
"parser": "svelte-eslint-parser" | ||
} | ||
] | ||
], | ||
"rules": { | ||
"eqeqeq": "error", | ||
"no-useless-escape": "off", | ||
"no-unused-expressions": "off", | ||
"no-inner-declarations": "off", | ||
"no-unused-vars": "off", | ||
"no-self-assign": "off", | ||
"no-undef": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,26 +3,44 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/** | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
tests: | ||
runs-on: ubuntu-latest | ||
name: Tests | ||
if: | | ||
( | ||
!contains(github.event.head_commit.message, '[skip ci]') && | ||
!contains(github.event.head_commit.message, 'version bump') | ||
) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: yarn | ||
- run: yarn test | ||
- uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: unit-tests | ||
path: ${{ github.workspace }}/coverage/ | ||
retention-days: 5 | ||
- uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: ${{ github.workspace }}/coverage/ | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.11 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Run tests | ||
run: pnpm test | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: unit-tests | ||
path: ${{ github.workspace }}/coverage/ | ||
retention-days: 5 | ||
- uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: ${{ github.workspace }}/coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"./src/**/*.{js,svelte,md,mdx,json}": ["eslint --fix", "prettier --write"] | ||
"./src/**/*.{test.js,js,ts,json,svelte}": [ | ||
"svelte-check --tsconfig ./tsconfig.json", | ||
"eslint -c ./.eslintrc.json --fix", | ||
"prettier --write" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.