Skip to content

Instantly share code, notes, and snippets.

@chase
Created September 5, 2015 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chase/a2da4eee17a14278ec33 to your computer and use it in GitHub Desktop.
Save chase/a2da4eee17a14278ec33 to your computer and use it in GitHub Desktop.
Import Plugin Breaking on Spread
{
"parser": "babel-eslint",
"plugins": [
"react",
"import"
],
"env": {
"browser": true,
"node": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": false,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": false,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"jsx": true
}
}
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "test1.js",
"dependencies": {
"babel": "^5.8.23",
"babel-eslint": "^4.1.1",
"babel-core": "^5.8.23",
"eslint": "^1.3.1",
"eslint-plugin-import": "^0.7.8",
"eslint-plugin-react": "^3.3.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "MIT"
}
export const test = {
hello: '1'
};
export const betterTest = {
world: '1'
};
export const test = {
hello: '1'
};
export const betterTest = {
...test,
world: '1'
};
import * as mock from './test1-nospread';
import {test} from './test1-nospread';
console.log(mock.betterTest);
console.log(test);
import * as mock from './test1';
import {test} from './test1';
console.log(mock.betterTest);
console.log(test);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment