-
Notifications
You must be signed in to change notification settings - Fork 14
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 #94 from heybokeh/cleanup
Cleanup
- Loading branch information
Showing
29 changed files
with
5,165 additions
and
10,697 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,24 +1,62 @@ | ||
name: tests | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install Dependencies | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: latest | ||
run_install: true | ||
- name: Lint | ||
run: | | ||
export NODE_OPTIONS=--max_old_space_size=4096 | ||
pnpm lint | ||
test-unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install Dependencies | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: latest | ||
run_install: true | ||
- name: Unit Tests | ||
run: pnpm test | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install Dependencies | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: latest | ||
run_install: true | ||
- name: Build | ||
run: pnpm build | ||
|
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 |
---|---|---|
|
@@ -2,10 +2,7 @@ | |
node_modules | ||
|
||
# Dist | ||
/pollen.css | ||
/index.js | ||
/index.d.ts | ||
/utils | ||
/dist | ||
|
||
# Runtime | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm test | ||
npx 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,3 @@ | ||
{ | ||
"*.{ts}": ["prettier --write", "eslint --quiet"] | ||
} |
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,5 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"overrides": [ | ||
{ | ||
|
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 +1 @@ | ||
declare module 'map-obj'; | ||
declare module "map-obj"; |
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 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,58 @@ | ||
import prettier from "eslint-config-prettier"; | ||
import ts from "typescript-eslint"; | ||
import globals from "globals"; | ||
|
||
export default [ | ||
...ts.configs.recommended, | ||
prettier, | ||
{ | ||
ignores: ["**/node_modules/**", "**/*.js"] | ||
}, | ||
{ | ||
files: ["**/*.ts"], | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.nodeBuiltin | ||
} | ||
}, | ||
rules: { | ||
curly: "warn", | ||
"default-case-last": "warn", | ||
eqeqeq: "error", | ||
"no-array-constructor": "error", | ||
"no-console": "warn", | ||
"no-else-return": "warn", | ||
"no-multi-assign": "error", | ||
"no-nested-ternary": "error", | ||
"no-param-reassign": "error", | ||
"no-return-assign": "warn", | ||
"no-sequences": "error", | ||
"no-template-curly-in-string": "warn", | ||
"no-throw-literal": "error", | ||
"no-undef-init": "warn", | ||
"no-unneeded-ternary": "warn", | ||
"no-unused-private-class-members": "warn", | ||
"no-useless-rename": "warn", | ||
"no-var": "error", | ||
"prefer-const": "off", // Messes with $props runes | ||
"prefer-promise-reject-errors": "warn", | ||
"prefer-template": "warn", | ||
radix: "warn", | ||
"require-yield": "warn", | ||
"spaced-comment": "warn", | ||
yoda: ["error", "never", { exceptRange: true }], | ||
"one-var": ["error", "never"], | ||
"@typescript-eslint/no-empty-object-type": "warn", | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
caughtErrorsIgnorePattern: "^_" | ||
} | ||
] | ||
} | ||
} | ||
]; |
Oops, something went wrong.