Skip to content

Commit

Permalink
Update code to reflect new lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Mar 13, 2018
1 parent 8281a34 commit aea583c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/rules/func-call-arg-spacing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const assertSpacing = require('./helpers/assertSpacing')
const maybeReportMissingSpace = require('./helpers/maybeReportToken').maybeReportMissingSpace
const { maybeReportMissingSpace } = require('./helpers/maybeReportToken')

module.exports = {
meta: {
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/func-params-spacing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const assertSpacing = require('./helpers/assertSpacing')
const maybeReportMissingSpace = require('./helpers/maybeReportToken').maybeReportMissingSpace
const { maybeReportMissingSpace } = require('./helpers/maybeReportToken')

/**
* ( a, b ) => {} --> space
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/helpers/assertSpacing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const maybeReportMissingSpace = require('./maybeReportToken').maybeReportMissingSpace
const maybeReportRequiredSpace = require('./maybeReportToken').maybeReportRequiredSpace
const { maybeReportMissingSpace } = require('./maybeReportToken')
const { maybeReportRequiredSpace } = require('./maybeReportToken')

/**
* Performs logic on the node to determine if it is valid.
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/helpers/maybeReportToken.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const reportMissing = require('./reportToken').reportMissing
const reportRequired = require('./reportToken').reportRequired
const { reportMissing } = require('./reportToken')
const { reportRequired } = require('./reportToken')

/**
* Maybe report about a missing space.
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/sort-destructuring-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = {

return {
ObjectPattern( node ) {
const properties = node.properties
const { properties } = node
const keys = properties
.filter(prop => !prop.computed && prop.type !== 'ExperimentalRestProperty')
.map(prop => getKeyName(prop))
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/sort-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const lower = s => s && s.toLowerCase()
* @returns {string} used member parameter style
*/
const usedMemberSyntax = node => {
const specifiers = node.specifiers
const { specifiers } = node

if ( !specifiers.length ) {
return 'none'
Expand Down Expand Up @@ -55,7 +55,7 @@ const getContentBetweenSpecifiers = ( context, parent, nodeOrTokenA, nodeOrToken


const getContentBetweenDeclarations = ( context, nodeOrTokenA, nodeOrTokenB ) => {
const text = context.getSourceCode().text
const { text } = context.getSourceCode()

const start = nodeOrTokenA.end
const length = nodeOrTokenB.start - nodeOrTokenA.end
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/space-around-conditional.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const assertSpacing = require('./helpers/assertSpacing')
const maybeReportRequiredSpace = require('./helpers/maybeReportToken').maybeReportRequiredSpace
const { maybeReportRequiredSpace } = require('./helpers/maybeReportToken')

module.exports = {
meta: {
Expand Down

0 comments on commit aea583c

Please sign in to comment.