Skip to content
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
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["github>area44/renovate-config"]
}
34 changes: 34 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: autofix.ci

on:
pull_request:
push:
branches: ["main"]

permissions:
contents: write

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Format and lint with Biome
run: pnpm exec biome check --write .

- name: Run autofix.ci
uses: autofix-ci/action@v1.3
35 changes: 12 additions & 23 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,27 @@ permissions:
contents: read

jobs:
setup:
name: Setup environment
runs-on: ubuntu-latest
steps:
- name: Installing node.js
uses: actions/setup-node@v1 # Used to install node environment
with:
node-version: "10.x"

unit-test:
code-coverage:
name: Code coverage
runs-on: ubuntu-latest
needs: setup # Need to wait for setup
steps:
- uses: actions/checkout@v1 # Get last commit pushed
- uses: actions/checkout@v4

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install pnpm
uses: pnpm/action-setup@v2

- uses: actions/cache@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: yarn install
run: pnpm install --no-frozen-lockfile

- name: Run code coverage
run: yarn test:ci
- name: Run test
run: pnpm run test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
26 changes: 11 additions & 15 deletions .github/workflows/format-check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,20 @@ jobs:
runs-on: ubuntu-latest
needs: setup # Need to wait for setup
steps:
- uses: actions/checkout@v1 # Get last commit pushed
- uses: actions/checkout@v4

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install pnpm
uses: pnpm/action-setup@v2

- uses: actions/cache@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: yarn install
run: pnpm install --no-frozen-lockfile

- name: Run linter
run: yarn format:check

- name: Build the app
run: yarn build
- name: Format and lint with Biome
run: pnpm exec biome check .
4 changes: 2 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: npm publish
env:
Expand Down
31 changes: 10 additions & 21 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,24 @@ permissions:
contents: read

jobs:
setup:
name: Setup environment
runs-on: ubuntu-latest
steps:
- name: Installing node.js
uses: actions/setup-node@v1 # Used to install node environment
with:
node-version: "10.x"

run-tests:
name: Run code tests
runs-on: ubuntu-latest
needs: setup # Need to wait for setup
steps:
- uses: actions/checkout@v1 # Get last commit pushed
- uses: actions/checkout@v4

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install pnpm
uses: pnpm/action-setup@v2

- uses: actions/cache@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: yarn install
run: pnpm install --no-frozen-lockfile

- name: Run tests
run: yarn test:ci
run: pnpm run test:ci
6 changes: 1 addition & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# tsc --noEmit && lint-staged
./node_modules/.bin/tsc --noEmit && ./node_modules/.bin/lint-staged
pnpm check --write --staged --no-errors-on-unmatched
Empty file removed .prettierignore
Empty file.
7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
// "**/dist": false
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"js/ts.tsdk.path": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
"source.organizeImports.biome": "explicit",
"source.sortMembers": "explicit",
"source.biome": "explicit",
"source.fixAll.biome": "explicit"
}
}
136 changes: 136 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": [
"**",
"!!**/dist",
"!lint-staged.config.js",
"!jest.config.js",
"!babel.config.js"
]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true,
"expand": "auto",
"useEditorconfig": true,
"includes": ["**"]
},
"linter": {
"enabled": true,
"rules": {
"preset": "none",
"complexity": {
"noArguments": "error",
"noUselessTypeConstraint": "error"
},
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidBuiltinInstantiation": "off",
"noInvalidConstructorSuper": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off",
"noUnusedVariables": "error"
},
"style": {
"noCommonJs": "error",
"noNamespace": "error",
"useArrayLiterals": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "off",
"useConsistentArrowReturn": "off",
"useConst": "error",
"useSpreadOverApply": "error"
},
"suspicious": {
"noClassAssign": "off",
"noDuplicateClassMembers": "off",
"noDuplicateEnumValues": "error",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noMisleadingInstantiator": "error",
"noNonNullAssertedOptionalChain": "error",
"noRedeclare": "off",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "off",
"noUnusedExpressions": "off",
"noVar": "error",
"noWith": "off",
"useGetterReturn": "off",
"useNamespaceKeyword": "error"
}
},
"includes": [
"**",
"!**/lint-staged.config.js",
"!lib/*",
"!docs/*",
"!coverage/*",
"!**/docusaurus.config.ts",
"**",
"!lib/*",
"!docs/*",
"!coverage/*",
"!**/docusaurus.config.ts"
]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "es5",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
},
"globals": ["window"]
},
"html": {
"formatter": {
"indentScriptAndStyle": false,
"selfCloseVoidElements": "always"
}
},
"overrides": [
{
"includes": ["scripts/*.js"],
"linter": {
"rules": {
"style": {
"noCommonJs": "off"
}
}
}
}
],
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
Loading
Loading