Skip to content

Commit

Permalink
dev-env: fix eslint script
Browse files Browse the repository at this point in the history
fix some eslint errors
  • Loading branch information
Gvozd committed Jan 31, 2016
1 parent 23524bb commit 96fc00b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .eslintignore
@@ -1,2 +1,3 @@
**/*.js
!src/*.js
node_modules/**/*.js
lib/**/*.js
test/**/*.js
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
"pretest": "npm run build && npm run lint",
"test": "mocha",
"watch": "mocha --watch",
"lint": "eslint ./src/index.js"
"lint": "eslint **/*.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/Macro.js
Expand Up @@ -41,13 +41,13 @@ export default class Macro {
traverse(cloned, {
Identifier(subPath) {
const {node: child, parent} = subPath;
if (parent.type !== "MemberExpression" || parent.object === child || (parent.computed && parent.property === child)) {
if (parent.type !== "MemberExpression" || parent.object === child || parent.computed && parent.property === child) {
if (params[child.name]) {
const param = params[child.name];
if (
param.replacement.type === 'Identifier' ||
param.replacement.type === 'Literal' ||
(paramReferenceCounts[child.name] === 1 && param.replacement.type === 'MemberExpression')
paramReferenceCounts[child.name] === 1 && param.replacement.type === 'MemberExpression'
) {
subPath.replaceWith(param.replacement);
seen[child.name] = param.replacement;
Expand Down
1 change: 0 additions & 1 deletion src/visitors.js
@@ -1,6 +1,5 @@
import {$processedByMacro} from './symbols';
import * as t from 'babel-types';
import traverse from 'babel-traverse';
import Macro from './Macro';

export const collectMacros = {
Expand Down

0 comments on commit 96fc00b

Please sign in to comment.