Skip to content

Instantly share code, notes, and snippets.

@cchamberlain
Last active June 14, 2016 00:03
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 cchamberlain/42047cc87565764fcfeda77e01af4523 to your computer and use it in GitHub Desktop.
Save cchamberlain/42047cc87565764fcfeda77e01af4523 to your computer and use it in GitHub Desktop.
The best eslint configuration
{
"env": {
"shared-node-browser": true,
"es6": true,
"mocha": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"blockBindings": true,
"defaultParams": true,
"forOf": true,
"generators": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": false,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"templateStrings": true,
"experimentalObjectRestSpead": true
}
},
"rules": {
"quotes": [2, "single"],
"strict": [2, "never"],
"semi": [2, "never"],
"brace-style": [2, "1tbs", {
"allowSingleLine": true
}],
"comma-style": ["error", "first"],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-dangle": [2, "never"],
"object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }],
"object-curly-spacing": ["error", "always"],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "strict" }],
"rest-spread-spacing": ["error", "never"],
"array-bracket-spacing": ["error", "always"],
"no-dupe-keys": 2,
"no-ex-assign": 2,
"no-extra-semi": 2,
"valid-typeof": 2,
"generator-star-spacing": [2, {"before": false, "after": true}],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2
},
"plugins": ["react"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment