Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Mar 16, 2020
1 parent 14de276 commit f5b9b45
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
5 changes: 1 addition & 4 deletions rules/prevent-abbreviations.js
Expand Up @@ -6,12 +6,9 @@ const {defaultsDeep, upperFirst, lowerFirst} = require('lodash');
const getDocumentationUrl = require('./utils/get-documentation-url');
const avoidCapture = require('./utils/avoid-capture');
const cartesianProductSamples = require('./utils/cartesian-product-samples');
const isSameNode = require('./utils/is-same-node');
const isShorthandPropertyIdentifier = require('./utils/is-shorthand-property-identifier');
const isAssignmentPatternShorthandPropertyIdentifier = require('./utils/is-assignment-pattern-shorthand-property-identifier');
const isShorthandImportIdentifier = require('./utils/is-shorthand-import-identifier');
const isShorthandExportIdentifier = require('./utils/is-shorthand-export-identifier');
const renameIdentifier = require('./utils/rename-identifier')
const renameIdentifier = require('./utils/rename-identifier');

const isUpperCase = string => string === string.toUpperCase();
const isUpperFirst = string => isUpperCase(string[0]);
Expand Down
Expand Up @@ -8,4 +8,4 @@ module.exports = identifier =>
identifier.parent.parent.type === 'Property' &&
isSameNode(identifier, identifier.parent.parent.key) &&
identifier.parent.parent.value === identifier.parent &&
identifier.parent.parent.shorthand
identifier.parent.parent.shorthand;
4 changes: 2 additions & 2 deletions rules/utils/is-shorthand-export-identifier.js
@@ -1,6 +1,6 @@
'use strict';

module.exports = identifier =>
identifier.parent.type === 'ExportSpecifier' &&
identifier.parent.type === 'ExportSpecifier' &&
identifier.parent.exported.name === identifier.name &&
identifier.parent.local.name === identifier.name
identifier.parent.local.name === identifier.name;
4 changes: 1 addition & 3 deletions rules/utils/is-shorthand-import-identifier.js
@@ -1,8 +1,6 @@
'use strict';

const isSameNode = require('./is-same-node');

module.exports = identifier =>
identifier.parent.type === 'ImportSpecifier' &&
identifier.parent.imported.name === identifier.name &&
identifier.parent.local.name === identifier.name
identifier.parent.local.name === identifier.name;
2 changes: 1 addition & 1 deletion rules/utils/rename-identifier.js
Expand Up @@ -34,4 +34,4 @@ function renameIdentifier(identifier, name, fixer, sourceCode) {
return fixer.replaceText(identifier, name);
}

module.exports = renameIdentifier
module.exports = renameIdentifier;

0 comments on commit f5b9b45

Please sign in to comment.