smeuli
11/7/2017 - 11:42 AM

ESLint configuration for React projects

ESLint configuration for React projects

{
	"env": {
		"browser": true,
		"node": true
	},
	"extends": "airbnb",
	"rules": {
		"brace-style": [2, "stroustrup"],
		"class-methods-use-this": 0,
		"comma-dangle": [2, "never"],
		"eol-last": [2, "never"],
		"indent": [2, "tab", { "SwitchCase": 1 }],
		"no-else-return": 0,
		"no-tabs": 0,
		"object-curly-newline": 0,
		"object-curly-spacing": [2, "always", { "objectsInObjects": false }],
		"padded-blocks": 0,
		"react/button-has-type": 2,
		"react/jsx-filename-extension": 0,
		"react/jsx-indent": [2, "tab"],
		"react/jsx-indent-props": [2, "tab"]
	}
}