Permalink
Browse files

linting

  • Loading branch information...
1 parent 37d8950 commit ad4ca750a59be6a710d322b9a7372dc631907c6a @Rich-Harris Rich-Harris committed Sep 6, 2016
View
@@ -35,5 +35,10 @@
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
+ },
+ "settings": {
+ "import/ignore": [ 0, [
+ "\\.path.js$"
+ ] ]
}
}
@@ -1,7 +1,7 @@
import Node from '../Node.js';
import disallowIllegalReassignment from './shared/disallowIllegalReassignment.js';
import isUsedByBundle from './shared/isUsedByBundle.js';
-import { NUMBER, STRING, UNKNOWN } from '../values.js';
+import { NUMBER, STRING } from '../values.js';
export default class AssignmentExpression extends Node {
bind ( scope ) {
@@ -9,7 +9,7 @@ export default class ClassDeclaration extends Node {
this.body.run();
}
- addReference ( reference ) {
+ addReference () {
/* noop? */
}
@@ -1,11 +1,11 @@
import Node from '../Node.js';
export default class ExportAllDeclaration extends Node {
- initialise ( scope ) {
+ initialise () {
this.isExportDeclaration = true;
}
- render ( code, es ) {
+ render ( code ) {
code.remove( this.leadingCommentStart || this.start, this.next || this.end );
}
}
@@ -2,34 +2,6 @@ import Node from '../Node.js';
const functionOrClassDeclaration = /^(?:Function|Class)Declaration/;
-class SyntheticDefaultDeclaration {
- constructor ( node, name ) {
- this.node = node;
- this.name = name;
- this.isDefault = true;
- }
-
- activate () {
- if ( this.activated ) return;
- this.activated = true;
-
- this.node.run();
- }
-
- addReference ( reference ) {
- this.name = reference.name;
- if ( this.original ) this.original.addReference( reference );
- }
-
- render ( es ) {
- if ( this.original && !this.original.isReassigned ) {
- return this.original.getName( es );
- }
-
- return this.name;
- }
-}
-
export default class ExportDefaultDeclaration extends Node {
initialise ( scope ) {
this.isExportDeclaration = true;
@@ -10,7 +10,7 @@ export default class FunctionDeclaration extends Node {
this.body.run();
}
- addReference ( reference ) {
+ addReference () {
/* noop? */
}
@@ -1,17 +1,9 @@
-import {
- ARRAY,
- BOOLEAN,
- FUNCTION,
- NUMBER,
- OBJECT,
- STRING,
- UNKNOWN
-} from '../../values.js';
+import { UNKNOWN } from '../../values.js';
export default function isUsedByBundle ( scope, node ) {
while ( node.type === 'ParenthesizedExpression' ) node = node.expression;
- const expression = node;
+ // const expression = node;
while ( node.type === 'MemberExpression' ) node = node.object;
const declaration = scope.findDeclaration( node.name );
View
@@ -13,4 +13,4 @@ export function normalize ( path ) {
return path.replace( /\\/g, '/' );
}
-export * from 'path';
+export { basename, dirname, extname, relative, resolve } from 'path';

0 comments on commit ad4ca75

Please sign in to comment.