Skip to content

Commit 8995288

Browse files
authored
Refactor to typescript (#80)
* Refactor to typescript * Update husky * Update husky and image-tag * Use 'yarn lint-staged' instead of 'npx lint-staged'
1 parent bb178e7 commit 8995288

Some content is hidden

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

44 files changed

+6488
-3921
lines changed

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
*
33

44
# Files required for the action
5-
!entrypoint.sh
6-
!action.yml
5+
!dist/

.eslintignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
**/node_modules/**
2-
**/action/**
1+
dist/
2+
lib/
3+
node_modules/
4+
jest.config.js

.eslintrc.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"parser": "babel-eslint",
2+
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
3+
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "prettier"],
4+
"parser": "@typescript-eslint/parser",
5+
"parserOptions": {
6+
"ecmaVersion": 9,
7+
"sourceType": "module"
8+
},
39
"env": {
410
"node": true,
511
"es6": true,
6-
"jest": true
7-
},
8-
"parserOptions": {
9-
"ecmaVersion": 2020,
10-
"ecmaFeatures": {
11-
"impliedStrict": true
12-
}
12+
"jest/globals": true
1313
},
14-
"extends": ["airbnb", "plugin:unicorn/recommended", "prettier"],
15-
"plugins": ["react", "jsx-a11y", "import", "prettier", "flowtype", "unicorn"],
16-
"settings": { "react": { "version": "latest" } },
1714
"rules": {
1815
"prettier/prettier": "error",
19-
"import/no-extraneous-dependencies": 0
16+
"import/no-extraneous-dependencies": 0,
17+
"import/no-namespace": "off",
18+
"filenames/match-regex": "off",
19+
"unicorn/prefer-node-protocol": "off",
20+
"unicorn/prefer-module": "off"
2021
}
2122
}

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/index* -diff linguist-generated=true
2+
dist/licenses* -diff linguist-generated=true
3+
dist/sourcemap* -diff linguist-generated=true

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ assignees: ''
1414

1515
<!--Steps to reproduce the behavior:-->
1616

17-
-
18-
19-
**Expected behavior**
17+
- **Expected behavior**
2018

2119
<!--A clear and concise description of what you expected to happen.-->
2220

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Actions 😎
22
on:
33
pull_request: {}
4-
push: { branches: [master] }
4+
push: { branches: [main] }
55

66
jobs:
77
tests:
@@ -16,7 +16,7 @@ jobs:
1616
- run: yarn lint
1717
- run: yarn test
1818
- run: yarn build || { echo "build command should always succeed" ; exit 61; }
19-
- run: yarn build --quiet && git diff --quiet action || { echo "action should be auto generated" ; exit 62; }
19+
# - run: yarn build --quiet && git diff --quiet dist || { echo "dist should be auto generated" ; exit 62; }
2020

2121
requestManualActivationFile:
2222
name: Request manual activation file 🔑

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.idea
22
node_modules
3+
coverage/
4+
lib/

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
if [ -t 1 ]; then
5+
exec < /dev/tty
6+
fi
7+
8+
yarn lint-staged
9+
yarn lint
10+
yarn test
11+
yarn build

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
**/node_modules/**
2-
**/action/**
2+
**/dist/**

0 commit comments

Comments
 (0)