-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from uber/modern
Modernize the tooling
- Loading branch information
Showing
79 changed files
with
9,229 additions
and
14,445 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"react/prop-types": "off", | ||
"react/react-in-jsx-scope": "off" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
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,3 @@ | ||
# Learn how to add code owners here: | ||
# https://help.github.com/en/articles/about-code-owners | ||
* @chasestarr @tajo @sandgraham | ||
* @chasestarr @tajo |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
env: | ||
CI: true | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.7.1 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Install playwright | ||
run: pnpm exec playwright install --with-deps | ||
|
||
- name: Eslint | ||
run: pnpm lint | ||
|
||
- name: Typescript | ||
run: pnpm typecheck | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Unit tests | ||
run: pnpm test | ||
|
||
- name: E2e tests | ||
run: pnpm test:e2e | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
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 |
---|---|---|
|
@@ -4,8 +4,6 @@ node_modules | |
.vscode | ||
.idea | ||
dist | ||
build | ||
compiled | ||
.awcache | ||
.rpt2_cache | ||
docs | ||
storybook-static |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm exec lint-staged |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('@ladle/react').UserConfig} */ | ||
export default { | ||
stories: "examples/**/*.stories.{js,jsx,ts,tsx,mdx}", | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script> | ||
window.global = window; | ||
window.process = { cwd: () => '', browser: true }; | ||
window.assert = () => {}; | ||
window.assert.ok = () => {}; | ||
window.Buffer = { isBuffer: () => {}, [Symbol.hasInstance]: () => {} }; | ||
</script> |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-env node */ | ||
|
||
import { builtinModules } from "node:module"; | ||
import nodeLibsBrowser from "node-libs-browser"; | ||
|
||
function NodeBuiltinsPolyfillPlugin() { | ||
return { | ||
name: "vite:node-builtins-polyfill", | ||
config() { | ||
const aliasEntries = []; | ||
for (let moduleName of builtinModules) { | ||
const polyfillPath = nodeLibsBrowser[moduleName]; | ||
if (polyfillPath) { | ||
aliasEntries.push({ | ||
// eslint-disable-next-line | ||
find: new RegExp(`^${moduleName}\/?$`), // handle "string_decoder/" import | ||
replacement: polyfillPath, | ||
}); | ||
} | ||
} | ||
|
||
return { | ||
resolve: { | ||
alias: aliasEntries, | ||
}, | ||
}; | ||
}, | ||
}; | ||
} | ||
|
||
export default NodeBuiltinsPolyfillPlugin; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"*.{js,ts,tsx,css,scss,postcss,md,json}": [ | ||
"prettier --write --plugin-search-dir=.", | ||
"prettier --check --plugin-search-dir=." | ||
], | ||
"*.{js,ts,tsx}": "eslint" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": false, | ||
"trailingComma": "all" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.