Skip to content

Commit 6af5f8a

Browse files
committed
Better tooling
1 parent 365f2a8 commit 6af5f8a

File tree

143 files changed

+3731
-64
lines changed

Some content is hidden

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

143 files changed

+3731
-64
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "tajo/react-range" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"plugin:react/recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:prettier/recommended"
7+
],
8+
"rules": {
9+
"@typescript-eslint/no-explicit-any": "off",
10+
"@typescript-eslint/ban-types": "off",
11+
"@typescript-eslint/ban-ts-comment": "off",
12+
"@typescript-eslint/explicit-module-boundary-types": "off",
13+
"react/prop-types": "off",
14+
"react/react-in-jsx-scope": "off"
15+
},
16+
"settings": {
17+
"react": {
18+
"version": "detect"
19+
}
20+
}
21+
}

.github/workflows/checks.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ on:
77
jobs:
88
test:
99
timeout-minutes: 15
10-
runs-on: macos-latest
10+
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4
1414
with:
1515
node-version: lts/*
16+
- uses: pnpm/action-setup@v4
1617
- name: Install dependencies
17-
run: npm install -g pnpm && pnpm install
18+
run: pnpm install
1819
- name: Run Unit tests
1920
run: pnpm test:unit
2021
- name: Run Typecheck
2122
run: pnpm typecheck
23+
- name: Run Lint
24+
run: pnpm lint
2225
- name: Run Build
2326
run: pnpm build

.github/workflows/playwright.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ on:
66
branches: [main]
77
jobs:
88
test:
9-
timeout-minutes: 60
10-
runs-on: macos-latest
9+
timeout-minutes: 15
10+
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4
1414
with:
1515
node-version: lts/*
1616
- uses: pnpm/action-setup@v4
17-
with:
18-
version: 9.1.4
1917
- name: Install dependencies
2018
run: pnpm install
2119
- name: Install Playwright Browsers

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
id-token: write
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v4
21+
with:
22+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
23+
fetch-depth: 0
24+
25+
- uses: pnpm/action-setup@v4
26+
with:
27+
version: 9.1.4
28+
29+
- name: Setup Node.js environment
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20.14
33+
cache: "pnpm"
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Creating .npmrc
39+
run: |
40+
cat << EOF > "$HOME/.npmrc"
41+
email=vojtech@miksu.cz
42+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
43+
EOF
44+
env:
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
47+
- name: Create Release Pull Request or Publish to npm
48+
id: changesets
49+
uses: changesets/action@v1
50+
with:
51+
publish: pnpm release
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GIT_DEPLOY_KEY }}
54+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec lint-staged

.lintstagedrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"*.{js,ts,tsx,css,scss,postcss,md,json}": [
3+
"prettier --write --plugin-search-dir=.",
4+
"prettier --check --plugin-search-dir=."
5+
],
6+
"*.{js,ts,tsx}": "eslint"
7+
}

README.md

Lines changed: 2 additions & 3 deletions

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

0 commit comments

Comments
 (0)