Package Exports
- solium
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (solium) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Solium
Solium is a linter for Solidity which uses Abstract Syntax Trees and allows the user to enable/disable existing rules and add their own ones!
#Install
npm install -g solium#Usage In the root directory of your DApp, run the following once:
solium --initThis create .soliumrc inside your root directory, which has the configuration for the enabled rules.
You can disable a particular rule by setting its value to false
In order to lint a specific file, use:
solium --file foobar.solTo run the linter over your entire project, use the following command in your root directory:
solium#Integrate Solium in your app To access Solium's API, first install it:
npm install --save solium##Usage
let Solium = require ('solium'),
sourceCode = 'contract fOO_bar { function HELLO_WORLD () {} }';
let errorObjects = Solium.lint (sourceCode, {
rules: {
camelcase: true,
mixedcase: true
}
});
errorObjects.forEach ( (err) => {
console.log (err);
});For a list of all available rules, see solium.json.