Skip to content

Instantly share code, notes, and snippets.

@vadirn
Created February 16, 2017 04:24
Show Gist options
  • Save vadirn/3bc3831ff71d468830b70d21d2fb102d to your computer and use it in GitHub Desktop.
Save vadirn/3bc3831ff71d468830b70d21d2fb102d to your computer and use it in GitHub Desktop.
{
"plugins": ["import", "jsx-a11y", "react"],
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"generators": true,
"experimentalObjectRestSpread": true
}
},
"settings": {
"import/ignore": [
"node_modules"
],
"import/extensions": [".js"],
"import/resolver": {
"node": {
"extensions": [".js", ".json"]
}
}
},
"rules": {
"array-callback-return": "warn",
"default-case": ["warn", { "commentPattern": "^no default$" }],
"dot-location": ["warn", "property"],
"eqeqeq": ["warn", "allow-null"],
"guard-for-in": "warn",
"no-caller": "warn",
"no-cond-assign": ["warn", "always"],
"no-const-assign": "warn",
"no-control-regex": "warn",
"no-delete-var": "warn",
"no-dupe-args": "warn",
"no-dupe-class-members": "warn",
"no-dupe-keys": "warn",
"no-duplicate-case": "warn",
"no-empty-character-class": "warn",
"no-empty-pattern": "warn",
"no-eval": "warn",
"no-ex-assign": "warn",
"no-extend-native": "warn",
"no-extra-bind": "warn",
"no-extra-label": "warn",
"no-fallthrough": "warn",
"no-func-assign": "warn",
"no-implied-eval": "warn",
"no-invalid-regexp": "warn",
"no-iterator": "warn",
"no-label-var": "warn",
"no-labels": ["warn", { "allowLoop": false, "allowSwitch": false }],
"no-lone-blocks": "warn",
"no-loop-func": "warn",
"no-multi-str": "warn",
"no-native-reassign": "warn",
"no-negated-in-lhs": "warn",
"no-new-func": "warn",
"no-new-symbol": "warn",
"no-new-wrappers": "warn",
"no-obj-calls": "warn",
"no-octal": "warn",
"no-octal-escape": "warn",
"no-redeclare": "warn",
"no-regex-spaces": "warn",
"no-script-url": "warn",
"no-self-assign": "warn",
"no-self-compare": "warn",
"no-sequences": "warn",
"no-shadow-restricted-names": "warn",
"no-sparse-arrays": "warn",
"no-template-curly-in-string": "warn",
"no-this-before-super": "warn",
"no-throw-literal": "warn",
"no-undef": "error",
"no-unexpected-multiline": "warn",
"no-unreachable": "warn",
"no-unused-expressions": ["warn", {
"allowShortCircuit": true,
"allowTernary": true
}],
"no-unused-labels": "warn",
"no-unused-vars": ["warn", {
"vars": "local",
"varsIgnorePattern": "^_",
"args": "none"
}],
"no-use-before-define": ["warn", "nofunc"],
"no-useless-computed-key": "warn",
"no-useless-concat": "warn",
"no-useless-constructor": "warn",
"no-useless-escape": "warn",
"no-useless-rename": ["warn", {
"ignoreDestructuring": false,
"ignoreImport": false,
"ignoreExport": false
}],
"no-with": "warn",
"radix": "warn",
"require-yield": "warn",
"rest-spread-spacing": ["warn", "never"],
"strict": ["warn", "never"],
"use-isnan": "warn",
"valid-typeof": "warn",
"import/no-webpack-loader-syntax": "error",
"react/jsx-equals-spacing": ["warn", "never"],
"react/jsx-no-duplicate-props": ["warn", { "ignoreCase": true }],
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": ["warn", {
"allowAllCaps": true,
"ignore": []
}],
"react/jsx-uses-react": "warn",
"react/jsx-uses-vars": "warn",
"react/no-danger-with-children": "warn",
"react/no-deprecated": "warn",
"react/no-direct-mutation-state": "warn",
"react/no-is-mounted": "warn",
"react/react-in-jsx-scope": "error",
"react/require-render-return": "warn",
"react/style-prop-object": "warn",
"jsx-a11y/aria-role": "warn",
"jsx-a11y/img-has-alt": "warn",
"jsx-a11y/img-redundant-alt": "warn",
"jsx-a11y/no-access-key": "warn",
"camelcase": "warn",
"jsx-quotes": ["error", "prefer-single"],
"no-console": "warn",
"quotes": ["error", "single"],
"array-bracket-spacing": ["error", "never"],
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"comma-dangle": ["warn", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
"functions": "always-multiline"
}],
"computed-property-spacing": ["error", "never"],
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"func-names": "warn",
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"indent": ["error", 2, {
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"FunctionDeclaration": {
"parameters": 1,
"body": 1
},
"FunctionExpression": {
"parameters": 1,
"body": 1
}
}],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"keyword-spacing": ["error", {
"before": true,
"after": true,
"overrides": {
"return": { "after": true },
"throw": { "after": true },
"case": { "after": true }
}
}],
"line-comment-position": ["error", {
"position": "above",
"ignorePattern": "",
"applyDefaultPatterns": true
}],
"linebreak-style": ["error", "unix"],
"lines-around-directive": ["error", {
"before": "always",
"after": "always"
}],
"max-len": ["warn", 100, 2, {
"ignoreComments": true,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreTrailingComments": true,
"ignoreUrls": true
}],
"new-cap": ["error", {
"newIsCap": true,
"newIsCapExceptions": [],
"capIsNew": false
}],
"newline-after-var": "off",
"newline-before-return": "off",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 4 }],
"no-array-constructor": "error",
"no-bitwise": "error",
"no-continue": "error",
"no-lonely-if": "error",
"no-mixed-operators": ["error", {
"groups": [
["+", "-", "*", "/", "%", "**"],
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": false
}],
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
"no-negated-condition": "off",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-plusplus": "error",
"no-restricted-syntax": [
"error",
"LabeledStatement",
"WithStatement"
],
"no-spaced-func": "error",
"no-tabs": "error",
"no-ternary": "off",
"no-trailing-spaces": "error",
"no-underscore-dangle": ["warn", { "allowAfterThis": true, "allowAfterSuper": true }],
"no-unneeded-ternary": ["error", { "defaultAssignment": false }],
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", {
"allowMultiplePropertiesPerLine": true
}],
"one-var": ["error", "never"],
"one-var-declaration-per-line": ["error", "always"],
"operator-assignment": ["error", "always"],
"operator-linebreak": "off",
"padded-blocks": ["error", "never"],
"quote-props": ["error", "as-needed", { "keywords": false, "unnecessary": true, "numbers": false }],
"require-jsdoc": "off",
"semi": ["error", "always"],
"semi-spacing": ["error", { "before": false, "after": true }],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": ["error", {
"words": true,
"nonwords": false,
"overrides": {
}
}],
"spaced-comment": ["error", "always"],
"unicode-bom": ["error", "never"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment