-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
3,390 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["plugin:prettier/recommended"], | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
"prettier/prettier": "warn", | ||
"linebreak-style": ["error", "unix"], | ||
"no-console": "error", | ||
eqeqeq: ["error", "smart"], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.ts", "*.tsx"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
extends: ["plugin:@typescript-eslint/recommended"], | ||
rules: { | ||
"@typescript-eslint/no-for-in-array": ["error"], | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"error", | ||
{ accessibility: "no-public" }, | ||
], | ||
"@typescript-eslint/explicit-function-return-type": [ | ||
"error", | ||
{ allowExpressions: true, allowTypedFunctionExpressions: true }, | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
varsIgnorePattern: "^_", | ||
argsIgnorePattern: "^_", | ||
caughtErrorsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/no-namespace": "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14" | ||
cache: npm | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run typecheck | ||
- run: npm test | ||
- run: npm publish --access=public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
registry-url: https://npm.pkg.github.com/ | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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,17 @@ | ||
name: tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14" | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run typecheck | ||
- run: npm test |
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 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} |
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 @@ | ||
{ | ||
"files.exclude": { | ||
"**/node_modules": true, | ||
"dist": true | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.format.enable": true, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[javascriptreact]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-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 |
---|---|---|
@@ -1 +1,24 @@ | ||
# libapp | ||
# libapp | ||
|
||
TypeScript helpers for creating Badrap apps. | ||
|
||
## Installation | ||
|
||
``` | ||
npm i @badrap/libapp | ||
``` | ||
|
||
## Enabling JSX/TSX support | ||
|
||
Modify your tsconfig.json file by adding in the following lines: | ||
|
||
``` | ||
{ | ||
"compilerOptions": { | ||
... | ||
"jsx": "react-jsx", | ||
"jsxImportSource": "@badrap/app/ui" | ||
}, | ||
... | ||
} | ||
``` |
Oops, something went wrong.