Browse Source

linting, consistency

gh-669
Rich-Harris 9 years ago
parent
commit
fe21dc85c8
  1. 3
      src/ast/isReference.js
  2. 8
      test/form/computed-properties/_expected/amd.js
  3. 8
      test/form/computed-properties/_expected/cjs.js
  4. 8
      test/form/computed-properties/_expected/es6.js
  5. 8
      test/form/computed-properties/_expected/iife.js
  6. 8
      test/form/computed-properties/_expected/umd.js
  7. 8
      test/form/computed-properties/main.js

3
src/ast/isReference.js

@ -10,8 +10,7 @@ export default function isReference ( node, parent ) {
if ( !parent ) return true; if ( !parent ) return true;
// TODO is this right? // TODO is this right?
if ( parent.type === 'MemberExpression' || if ( parent.type === 'MemberExpression' || parent.type === 'MethodDefinition' ) {
parent.type === 'MethodDefinition' ) {
return parent.computed || node === parent.object; return parent.computed || node === parent.object;
} }

8
test/form/computed-properties/_expected/amd.js

@ -5,12 +5,12 @@ define(['exports'], function (exports) { 'use strict';
var baz = 'baz'; var baz = 'baz';
var bam = 'bam'; var bam = 'bam';
var x = {[foo]: 'bar'}; var x = { [foo]: 'bar' };
class X { class X {
[bar]() {} [bar] () {}
get [baz]() {} get [baz] () {}
set [bam](value) {} set [bam] ( value ) {}
} }
exports.x = x; exports.x = x;

8
test/form/computed-properties/_expected/cjs.js

@ -5,12 +5,12 @@ var bar = 'bar';
var baz = 'baz'; var baz = 'baz';
var bam = 'bam'; var bam = 'bam';
var x = {[foo]: 'bar'}; var x = { [foo]: 'bar' };
class X { class X {
[bar]() {} [bar] () {}
get [baz]() {} get [baz] () {}
set [bam](value) {} set [bam] ( value ) {}
} }
exports.x = x; exports.x = x;

8
test/form/computed-properties/_expected/es6.js

@ -3,12 +3,12 @@ var bar = 'bar';
var baz = 'baz'; var baz = 'baz';
var bam = 'bam'; var bam = 'bam';
var x = {[foo]: 'bar'}; var x = { [foo]: 'bar' };
class X { class X {
[bar]() {} [bar] () {}
get [baz]() {} get [baz] () {}
set [bam](value) {} set [bam] ( value ) {}
} }
export { x, X }; export { x, X };

8
test/form/computed-properties/_expected/iife.js

@ -6,12 +6,12 @@
var baz = 'baz'; var baz = 'baz';
var bam = 'bam'; var bam = 'bam';
var x = {[foo]: 'bar'}; var x = { [foo]: 'bar' };
class X { class X {
[bar]() {} [bar] () {}
get [baz]() {} get [baz] () {}
set [bam](value) {} set [bam] ( value ) {}
} }
exports.x = x; exports.x = x;

8
test/form/computed-properties/_expected/umd.js

@ -9,12 +9,12 @@
var baz = 'baz'; var baz = 'baz';
var bam = 'bam'; var bam = 'bam';
var x = {[foo]: 'bar'}; var x = { [foo]: 'bar' };
class X { class X {
[bar]() {} [bar] () {}
get [baz]() {} get [baz] () {}
set [bam](value) {} set [bam] ( value ) {}
} }
exports.x = x; exports.x = x;

8
test/form/computed-properties/main.js

@ -3,10 +3,10 @@ var bar = 'bar';
var baz = 'baz'; var baz = 'baz';
var bam = 'bam'; var bam = 'bam';
export var x = {[foo]: 'bar'}; export var x = { [foo]: 'bar' };
export class X { export class X {
[bar]() {} [bar] () {}
get [baz]() {} get [baz] () {}
set [bam](value) {} set [bam] ( value ) {}
} }

Loading…
Cancel
Save