Skip to content

Commit

Permalink
Add gts for TypeScript style check (#10)
Browse files Browse the repository at this point in the history
- Install gts
- Add a GitHub action for TypeScript style check
- Fix existing codes to align with the style guide
  • Loading branch information
tushuhei authored Nov 24, 2021
1 parent dedaafc commit c8b1fbf
Show file tree
Hide file tree
Showing 14 changed files with 6,682 additions and 857 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ jobs:
python-version: '3.7'
- run: python -m pip install --upgrade yapf
- run: yapf --diff --recursive budoux tests
typescript-style-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm install
working-directory: ./javascript
- run: npm run lint
working-directory: ./javascript
3 changes: 3 additions & 0 deletions javascript/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
module
src/data
8 changes: 8 additions & 0 deletions javascript/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./node_modules/gts/",
"rules": {
"node/no-unpublished-import": ["error", {
"allowModules": ["jasmine"]
}]
}
}
3 changes: 3 additions & 0 deletions javascript/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json')
}
Loading

0 comments on commit c8b1fbf

Please sign in to comment.