Add custom linting rules (#4132)
Co-authored-by: Francisco Giordano <fg@frang.io> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
20
solhint.config.js
Normal file
20
solhint.config.js
Normal file
@ -0,0 +1,20 @@
|
||||
const customRules = require('./scripts/solhint-custom');
|
||||
|
||||
const rules = [
|
||||
'no-unused-vars',
|
||||
'const-name-snakecase',
|
||||
'contract-name-camelcase',
|
||||
'event-name-camelcase',
|
||||
'func-name-mixedcase',
|
||||
'func-param-name-mixedcase',
|
||||
'modifier-name-mixedcase',
|
||||
'var-name-mixedcase',
|
||||
'imports-on-top',
|
||||
'no-global-import',
|
||||
...customRules.map(r => `openzeppelin/${r.ruleId}`),
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
plugins: ['openzeppelin'],
|
||||
rules: Object.fromEntries(rules.map(r => [r, 'error'])),
|
||||
};
|
||||
Reference in New Issue
Block a user