Skip to content

Commit 51cb1fc

Browse files
committedJan 8, 2018
⬆️
1 parent 60e5d0c commit 51cb1fc

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
 

‎index.js

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const walk = async (requiredDefinitions, walkFile, root, result) => {
7070

7171
// We can use constants for path names
7272
if (existingDefinitions[pathString]) {
73+
// eslint-disable-next-line prefer-destructuring
7374
pathString = existingDefinitions[pathString];
7475
}
7576

‎package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"postcss": "^6.0.1"
2929
},
3030
"devDependencies": {
31-
"ava": "^0.21.0",
31+
"ava": "^0.24.0",
3232
"babel-cli": "^6.18.0",
3333
"babel-core": "^6.18.2",
3434
"babel-polyfill": "^6.16.0",
3535
"babel-register": "^6.22.0",
36-
"eslint": "^3.9.0",
37-
"eslint-config-airbnb-base": "^11.2.0",
36+
"eslint": "^4.15.0",
37+
"eslint-config-airbnb-base": "^12.1.0",
3838
"eslint-plugin-import": "^2.5.0"
3939
},
4040
"scripts": {

‎test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ test('should replace an import from several files', async (t) => {
9090
.a { margin: base; }
9191
.b { margin: level2base; }
9292
.foo { color: red; }`,
93-
`@value red from "./colors.css";
93+
`@value red from "./colors.css";
9494
@value base from "./level1.css";
9595
@value level2base from "./level2.css";
9696
.a { margin: 10px; }
@@ -111,7 +111,8 @@ test('should import and alias a constant and replace usages', async (t) => {
111111
await run(
112112
t,
113113
'@value blue as green from "./colors.css";\n.foo { color: green; }',
114-
'@value blue as green from "./colors.css";\n.foo { color: #0000FF; }');
114+
'@value blue as green from "./colors.css";\n.foo { color: #0000FF; }',
115+
);
115116
});
116117

117118
test('should import and alias a constant (using a name from imported file) and replace usages', async (t) => {
@@ -304,8 +305,7 @@ test('variables are also present in messages', async (t) => {
304305
const input = '@value myColor: blue; @value myColor2: myColor';
305306
const processor = postcss([plugin]);
306307
const result = await processor.process(input);
307-
const values = result.messages[0].values;
308-
const type = result.messages[0].type;
308+
const { values, type } = result.messages[0];
309309

310310
t.is(type, 'values');
311311
t.is(values.myColor2, 'blue');

0 commit comments

Comments
 (0)
Please sign in to comment.