Add contract test linting
This commit is contained in:
parent
6f2097ed46
commit
c9fed46054
@ -18,7 +18,8 @@ install:
|
||||
|
||||
script:
|
||||
- yarn lint:wrapper
|
||||
- yarn lint:contracts
|
||||
- yarn lint:contract-tests
|
||||
# - yarn lint:contracts
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
12
apps/.eslintrc.js
Normal file
12
apps/.eslintrc.js
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
'globals': {
|
||||
contract: true,
|
||||
describe: true,
|
||||
it: true,
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': ['error', {
|
||||
'argsIgnorePattern': '^_',
|
||||
}],
|
||||
}
|
||||
}
|
@ -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');
|
||||
});
|
||||
|
@ -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');
|
||||
});
|
||||
|
@ -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');
|
||||
});
|
||||
|
@ -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');
|
||||
});
|
||||
|
@ -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"
|
||||
},
|
||||
|
12
yarn.lock
12
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user