Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandomg committed Dec 13, 2019
1 parent fd18479 commit f0e818d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
10 changes: 4 additions & 6 deletions lib/rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ function coreRules(meta) {
function loadPlugin(pluginName, { reporter, config, inputSrc, fileName }) {
const plugins = require(`solhint-plugin-${pluginName}`)

return plugins
.map(Plugin => new Plugin(reporter, config, inputSrc, fileName))
.map(plugin => {
plugin.ruleId = `${pluginName}/${plugin.ruleId}`
return plugin
})
return plugins.map(Plugin => new Plugin(reporter, config, inputSrc, fileName)).map(plugin => {
plugin.ruleId = `${pluginName}/${plugin.ruleId}`
return plugin
})
}

function pluginsRules(configPlugins, meta) {
Expand Down
4 changes: 0 additions & 4 deletions lib/rules/naming/func-name-mixedcase.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const BaseChecker = require('./../base-checker')
const naming = require('./../../common/identifier-naming')
const TreeTraversing = require('./../../common/tree-traversing')

const { typeOf } = TreeTraversing
const traversing = new TreeTraversing()

const ruleId = 'func-name-mixedcase'
const meta = {
Expand Down
5 changes: 1 addition & 4 deletions lib/rules/order/func-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ const STATES = {
AFTER_INTERNAL: new State({
name: 'AFTER_INTERNAL',
after: 'internal',
rules: [
{ on: 'internal', goTo: 'AFTER_INTERNAL' },
{ on: 'private', goTo: 'AFTER_PRIVATE' }
]
rules: [{ on: 'internal', goTo: 'AFTER_INTERNAL' }, { on: 'private', goTo: 'AFTER_PRIVATE' }]
}),

AFTER_PRIVATE: new State({
Expand Down
1 change: 0 additions & 1 deletion lib/rules/order/imports-on-top.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const BaseChecker = require('./../base-checker')
const { typeOf } = require('./../../common/tree-traversing')

const ruleId = 'imports-on-top'
const meta = {
Expand Down
1 change: 0 additions & 1 deletion test/rules/best-practises/no-unused-vars.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const assert = require('assert')
const { assertNoWarnings, assertErrorMessage, assertWarnsCount } = require('./../../common/asserts')
const linter = require('./../../../lib/index')
const { contractWith, funcWith, multiLine } = require('./../../common/contract-builder')
Expand Down

0 comments on commit f0e818d

Please sign in to comment.