diff --git a/.travis.yml b/.travis.yml index f2fc2e5..b0ef9db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,8 @@ install: script: - yarn lint:wrapper - - yarn lint:contracts + - yarn lint:contract-tests + # - yarn lint:contracts branches: only: diff --git a/apps/.eslintrc.js b/apps/.eslintrc.js new file mode 100644 index 0000000..e14aac6 --- /dev/null +++ b/apps/.eslintrc.js @@ -0,0 +1,12 @@ +module.exports = { + 'globals': { + contract: true, + describe: true, + it: true, + }, + rules: { + 'no-unused-vars': ['error', { + 'argsIgnorePattern': '^_', + }], + } +} diff --git a/apps/contribution/test/app.js b/apps/contribution/test/app.js index 24e551b..bb9f094 100644 --- a/apps/contribution/test/app.js +++ b/apps/contribution/test/app.js @@ -1,5 +1,5 @@ -const Contribution = artifacts.require('Contribution.sol') +// const Contribution = artifacts.require('Contribution.sol'); -contract('Contribution', (accounts) => { - it('should be tested') -}) +contract('Contribution', (_accounts) => { + it('should be tested'); +}); diff --git a/apps/contributor/test/app.js b/apps/contributor/test/app.js index 9b95efa..9985ba6 100644 --- a/apps/contributor/test/app.js +++ b/apps/contributor/test/app.js @@ -1,5 +1,5 @@ -const Contributor = artifacts.require('Contributor.sol') +// const Contributor = artifacts.require('Contributor.sol'); -contract('Contributor', (accounts) => { - it('should be tested') -}) +contract('Contributor', (_accounts) => { + it('should be tested'); +}); diff --git a/apps/proposal/test/app.js b/apps/proposal/test/app.js index b35a6df..aedea16 100644 --- a/apps/proposal/test/app.js +++ b/apps/proposal/test/app.js @@ -1,5 +1,5 @@ -const Proposal = artifacts.require('Proposal.sol') +// const Proposal = artifacts.require('Proposal.sol'); -contract('Proposal', (accounts) => { - it('should be tested') -}) +contract('Proposal', (_accounts) => { + it('should be tested'); +}); diff --git a/apps/token/test/app.js b/apps/token/test/app.js index 3e01ace..2f583dd 100644 --- a/apps/token/test/app.js +++ b/apps/token/test/app.js @@ -1,5 +1,5 @@ -const Token = artifacts.require('Token.sol') +// const Token = artifacts.require('Token.sol'); -contract('Token', (accounts) => { - it('should be tested') -}) +contract('Token', (_accounts) => { + it('should be tested'); +}); diff --git a/package.json b/package.json index e74fe8d..ca6e9d6 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "devchain": "aragon devchain --port 7545", "dao:address": "truffle exec scripts/current-address.js", "lint:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"", + "lint:contract-tests": "eslint apps/*/test", "lint:wrapper": "eslint lib/", "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/yarn.lock b/yarn.lock index cdb31c5..ad0c6dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4602,9 +4602,10 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -"kosmos-schemas@github:67P/kosmos-schemas#feature/contribution_date_time": - version "1.1.2" - resolved "https://codeload.github.com/67P/kosmos-schemas/tar.gz/28a5e9f1fc2e083165e4e02ce3361c3f4fafa592" +kosmos-schemas@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kosmos-schemas/-/kosmos-schemas-2.0.0.tgz#89f71e7bcf6d582605d569007fa605f2b8886177" + integrity sha512-zIjWcDxaN94m1vPgUaI5LRX6y07Ihw9ScPoGKf1NkZ0sLgD/CRV8YIKRyDafH5mThe3uBN2+F6H6Gp5qhNhALg== dependencies: brfs-babel "^1.0.0" @@ -6582,11 +6583,6 @@ rsa-unpack@0.0.6: dependencies: optimist "~0.3.5" -rsvp@^4.8.2: - version "4.8.4" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911" - integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA== - run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"