Skip to content

Instantly share code, notes, and snippets.

View yannickcr's full-sized avatar

Yannick Croissant yannickcr

View GitHub Profile
@yannickcr
yannickcr / 1.Readme.md
Last active October 28, 2019 13:14
Testing ES6 React components with Gulp + Mocha + Istanbul

Testing ES6 React components with Gulp + Mocha + Istanbul

Recipe to test your ES6 React components.

$ npm install gulp gulp-util gulp-mocha gulp-istanbul isparta run-sequence babel jsdom

Note: You must name all your files .js, even if they contains JSX, or istanbul will not instrument them.

@yannickcr
yannickcr / .eslintrc
Created June 12, 2017 11:45
Disallow typeof v === 'undefined'
"rules": {
"no-restricted-syntax": [
"error", {
"selector": "BinaryExpression[left.operator='typeof'][right.value='undefined']",
"message": "There's no reason to do that in our codebase ;)"
}
]
}