ESLint plugin for Truffle development.
Provides a custom environment containing Truffle global variables.
yarn add --dev eslint eslint-plugin-truffle
In your ESLint config file (ex.: .eslintrc
), add:
{
// ...
"env": {
// ...
"mocha": true, // for test files
"truffle/globals": true // same as "truffle/truffle": true
},
"plugins": [
// ...
"truffle"
// ...
]
// ...
}