Skip to content

Commit

Permalink
Adding Prettier, Fixing eslint warnings (#17)
Browse files Browse the repository at this point in the history
* Prettier

* Adding eslint-plugin-prettier

* Enforcing always arrow Parens

* Prettier

* Update pre-commit

* Use husky v6 properly

* Remove node 10

* Shave off 100kb or more

* Shave off some more
  • Loading branch information
mirshko authored Jun 19, 2021
1 parent a964962 commit 2ad73bf
Show file tree
Hide file tree
Showing 8 changed files with 506 additions and 434 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['10.x', '12.x', '14.x']
node: ['12.x', '14.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn format && yarn lint
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"build": "tsdx build",
"tsdx-test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"prepare": "husky install && tsdx build",
"size": "size-limit",
"analyze": "size-limit --why"
"analyze": "size-limit --why",
"format": "prettier --write \"./src/*.{js,ts}\" \"tests/*.{js,ts}\""
},
"repository": {
"type": "git",
Expand All @@ -31,16 +32,12 @@
"url": "https://github.com/weiroll/weiroll.js/issues"
},
"peerDependencies": {},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"arrowParens": "always"
},
"size-limit": [
{
Expand All @@ -59,8 +56,10 @@
"@types/mocha": "^8.2.2",
"@types/node": "^15.12.2",
"chai": "^4.3.4",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^6.0.0",
"mocha": "^9.0.0",
"prettier": "^2.3.1",
"size-limit": "^4.12.0",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
Expand Down
18 changes: 8 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"use strict";

export {
Contract,
ContractFunction,
FunctionCall,
Value,
LiteralValue,
ReturnValue,
Planner
} from './planner';
Contract,
ContractFunction,
FunctionCall,
Value,
LiteralValue,
ReturnValue,
Planner,
} from './planner';
Loading

0 comments on commit 2ad73bf

Please sign in to comment.