made with esnextbin
made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
excludesfile = ~/.gitignore | |
autocrlf = false | |
pager = diff-so-fancy | less --tabs=4 -RFX | |
[alias] | |
st = status -sb | |
ci = commit | |
co = checkout | |
br = branch | |
df = diff --word-diff |
made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"devDependencies": { | |
"ghooks": "^1.3.2" | |
}, | |
"config": { | |
"ghooks": { | |
"post-checkout": "./script/yarn-update.hook.sh $2 $3" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ScrollPane extends React.Component { | |
componentDidUpdate() { | |
// Each time we get new props we set the | |
// new scrollTop position on the DOM element | |
this.el.scrollTop = this.props.scrollTop | |
} | |
render() { | |
<div ref={(el) => {this.el = el}}> | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleScroll = (evt) => { | |
// Calculate new scrollTop positions | |
// for left and right panes based on | |
// DOM nodes and evt.target.scrollTop | |
this.leftPaneScrollTop = … | |
this.rightPaneScrollTop = … | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class ScrollPane extends Component { | |
static contextTypes = { | |
registerPane: PropTypes.func.isRequired, | |
unregisterPane: PropTypes.func.isRequired | |
}; | |
componentDidMount() { | |
this.context.registerPane(this.el) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env node */ | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const MemoryFileSystem = require('memory-fs'); | |
const EnhancedResolve = require('enhanced-resolve'); | |
const transform = require('transform-jest-deps'); | |
const babel = require('babel-jest'); | |
const createConfig = require('../build/utils/createWebpackConfig'); |
Please 🌟 this gist to vote for this proposal!
No other topic in software development probably has so much controversy as linting.
With a wrong workflow linting can be really a pain and will slow you and your team down. With a proper setup, though, it can save you hours of manual work reformatting the code and reducing the code-review overhead.