Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contract): linting #33

Merged
merged 5 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint and Test

on:
pull_request:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏


jobs:
all:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Use Node.js 18.8.x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's hoping we can do both major LTS versions
(maybe add a comment about why not yet? Agoric/agoric-sdk#8636 )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 fccae72

uses: actions/setup-node@v3
with:
# use node 18.8.x until Agoric/agoric-sdk#8636
node-version: '18.8.x'
- name: yarn install
run: yarn
- name: yarn lint
run: yarn lint
- name: yarn test
run: yarn test
12 changes: 8 additions & 4 deletions contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"start": "yarn docker:make clean start-contract print-key",
"build": "exit 0",
"test": "ava --verbose",
"lint": "eslint '**/*.{js,jsx}'",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
"lint-fix-jessie": "eslint -c '.eslintrc-jessie.js' --fix '**/*.{js,jsx}'",
"lint-jessie": "eslint -c '.eslintrc-jessie.js' '**/*.{js,jsx}'"
"lint": "eslint '**/*.js'",
"lint:fix": "eslint --fix '**/*.js'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

},
"devDependencies": {
"agoric": "^0.21.2-u12.0",
"@agoric/deploy-script-support": "^0.10.4-u12.0",
"@endo/bundle-source": "^2.8.0",
"@agoric/eslint-config": "dev",
"@endo/eslint-plugin": "^0.5.2",
"@endo/init": "^0.5.60",
"@endo/promise-kit": "0.2.56",
"@endo/ses-ava": "^0.2.44",
"@jessie.js/eslint-plugin": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
Expand Down Expand Up @@ -73,6 +73,10 @@
},
"homepage": "https://github.com/agoric-labs/dapp-join-game#readme",
"eslintConfig": {
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2021
},
"extends": [
"@agoric"
]
Expand Down
2 changes: 1 addition & 1 deletion contract/test/mintStable.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const centralSupplyPath = myRequire.resolve(
* just for this purpose. Each time we want to mint a fee/stable token payment,
* we make an instance of of the `centralSupply` contract.
*
* @param {Object} powers
* @param {object} powers
* @param {ERef<FeeMintAccess>} powers.feeMintAccess for minting IST
* @param {ERef<ZoeService>} powers.zoe for starting the `centralSupply` contract
* @param {BundleCache} powers.bundleCache for bundling the `centralSupply` contract
Expand Down
1 change: 1 addition & 0 deletions contract/test/test-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test('Start the contract', async t => {
* @param {ZoeService} zoe
* @param {ERef<import('@agoric/zoe/src/zoeService/utils').Instance<GameContractFn>} instance
* @param {Purse} purse
* @param {string[]} choices
*/
const alice = async (
t,
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@
"@endo/nat" "4.1.27"
"@endo/promise-kit" "0.2.56"

"@agoric/eslint-config@dev":
version "0.4.1-dev-92855b2.0"
resolved "https://registry.yarnpkg.com/@agoric/eslint-config/-/eslint-config-0.4.1-dev-92855b2.0.tgz#785047361da1af5956c0555d94867dc2caf837b8"
integrity sha512-tBJnlh4Td/VtMlSzMCRRimwFY7OIIWKmBorjuhDlVbApnoLZGGqQVe6FkbjE+b8S3kJnfoGShAO/jzUxXekjJw==

"@agoric/eventual-send@^0.14.1":
version "0.14.1"
resolved "https://registry.yarnpkg.com/@agoric/eventual-send/-/eventual-send-0.14.1.tgz#b414888bed67cf003a61bd22da30a70f79b8f9dc"
Expand Down