add property name shorthand support
This commit is contained in:
parent
d11944f7c1
commit
d87c7942a3
@ -0,0 +1,3 @@
|
||||
exports.Property = function (node) {
|
||||
if (node.shorthand) node.shorthand = false;
|
||||
};
|
||||
1
test/fixtures/property-name-shorthand/mixed/actual.js
vendored
Normal file
1
test/fixtures/property-name-shorthand/mixed/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
var coords = { x, y, foo: "bar" };
|
||||
5
test/fixtures/property-name-shorthand/mixed/expected.js
vendored
Normal file
5
test/fixtures/property-name-shorthand/mixed/expected.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
var coords = {
|
||||
x: x,
|
||||
y: y,
|
||||
foo: "bar"
|
||||
};
|
||||
1
test/fixtures/property-name-shorthand/multiple/actual.js
vendored
Normal file
1
test/fixtures/property-name-shorthand/multiple/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
var coords = { x, y };
|
||||
4
test/fixtures/property-name-shorthand/multiple/expected.js
vendored
Normal file
4
test/fixtures/property-name-shorthand/multiple/expected.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
var coords = {
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
1
test/fixtures/property-name-shorthand/single/actual.js
vendored
Normal file
1
test/fixtures/property-name-shorthand/single/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
var coords = { x };
|
||||
3
test/fixtures/property-name-shorthand/single/expected.js
vendored
Normal file
3
test/fixtures/property-name-shorthand/single/expected.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
var coords = {
|
||||
x: x
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user