Skip to content

Commit

Permalink
refactor: typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Ephigenia committed Jan 19, 2022
1 parent 5d4ee65 commit a42bdaf
Show file tree
Hide file tree
Showing 26 changed files with 3,731 additions and 605 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[{.,}*.{js{,*},y{a,}ml}]
[{.,}*.{js,ts{,*},y{a,}ml}]
indent_style = space
indent_size = 2

Expand Down
18 changes: 16 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint/eslint-plugin"
],
"extends": [
"plugin:unicorn/all"
]
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"root": true,
"env": {
"node": true,
"mocha": true
}
}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci --no-production
- run: npm ci --no-optional
- run: npm test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
node_modules
npm-debug.log

# output
dist

coverage/
.nyc_output/

local.*
*.tmp*
5 changes: 4 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ fi
. "$(dirname "$0")/_/husky.sh"

printf "%b>>>%b lint...\n" "$GREEN" "$NO_COLOR"
npm run lint -s
npm run lint:fix -s

printf "%b>>>%b prettier...\n" "$GREEN" "$NO_COLOR"
npm run format
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"quoteProps": "preserve"
}
Loading

0 comments on commit a42bdaf

Please sign in to comment.