222 lines
4.4 KiB
Plaintext
222 lines
4.4 KiB
Plaintext
|
|
{
|
|
"ecmaFeatures": {
|
|
"arrowFunctions": true,
|
|
"blockBindings": true,
|
|
"classes": true,
|
|
"defaultParams": true,
|
|
"destructuring": true,
|
|
"jsx": true,
|
|
"modules": true,
|
|
"objectLiteralComputedProperties": true,
|
|
"objectLiteralShorthandMethods": true,
|
|
"objectLiteralShorthandProperties": true,
|
|
"spread": true,
|
|
"templateStrings": true
|
|
},
|
|
"env": {
|
|
"amd": true,
|
|
"browser": true,
|
|
"jquery": true,
|
|
"mocha": true,
|
|
"node": true
|
|
},
|
|
"globals": {
|
|
"$": true,
|
|
"d3": true,
|
|
"Modernizr": false,
|
|
"module": false
|
|
},
|
|
"plugins": [
|
|
"react"
|
|
],
|
|
"rules": {
|
|
"strict": 0,
|
|
|
|
// Possible Errors
|
|
"comma-dangle": 2,
|
|
"no-cond-assign": 0,
|
|
"no-console": 0,
|
|
"no-debugger": 2,
|
|
"no-dupe-args": 2,
|
|
"no-dupe-keys": 2,
|
|
"no-duplicate-case": 2,
|
|
"no-empty": 2,
|
|
"no-empty-class": 2,
|
|
"no-ex-assign": 2,
|
|
"no-extra-boolean-cast": 1,
|
|
"no-extra-parens": 0,
|
|
"no-extra-semi": 1,
|
|
"no-inner-declarations": 1,
|
|
"no-invalid-regexp": 1,
|
|
"no-irregular-whitespace": 1,
|
|
"no-obj-calls": 2,
|
|
"no-regex-spaces": 2,
|
|
"no-reserved-keys": 1,
|
|
"no-sparse-arrays": 2,
|
|
"no-unreachable": 2,
|
|
"valid-jsdoc": [
|
|
2,
|
|
{
|
|
"prefer": {
|
|
"return": "returns"
|
|
}
|
|
}
|
|
],
|
|
"valid-typeof": 2,
|
|
|
|
// Best Practices
|
|
"block-scoped-var": 1,
|
|
"curly": 1,
|
|
"default-case": 1,
|
|
"dot-location": [1, "property"],
|
|
"dot-notation": 1,
|
|
"eqeqeq": 1,
|
|
"guard-for-in": 1,
|
|
"no-alert": 2,
|
|
"no-caller": 1,
|
|
"no-else-return": 1,
|
|
"no-eval": 2,
|
|
"no-extend-native": 2,
|
|
"no-extra-bind": 1,
|
|
"no-floating-decimal": 2,
|
|
"no-implied-eval": 2,
|
|
"no-loop-func": 0,
|
|
"no-multi-spaces": [
|
|
1,
|
|
{
|
|
"exceptions": {
|
|
"VariableDeclarator": true
|
|
}
|
|
}
|
|
],
|
|
"no-multi-str": 1,
|
|
"no-native-reassign": 2,
|
|
"no-new": 2,
|
|
"no-new-func": 2,
|
|
"no-new-wrappers": 2,
|
|
"no-param-reassign": 0,
|
|
"no-redeclare": 1,
|
|
"no-self-compare": 2,
|
|
"no-sequences": 2,
|
|
"no-throw-literal": 2,
|
|
"no-unused-expressions": 1,
|
|
"no-void": 2,
|
|
"no-warning-comments": 0,
|
|
"no-with": 1,
|
|
"radix": 2,
|
|
"vars-on-top": 0,
|
|
"wrap-iife": 2,
|
|
"yoda": [2, "never", { "exceptRange": true }],
|
|
|
|
// Variables
|
|
"no-shadow": 1,
|
|
"no-undef": 1,
|
|
"no-undefined": 0,
|
|
"no-unused-vars": [
|
|
0,
|
|
{
|
|
"vars": "all",
|
|
"args": "after-used"
|
|
}
|
|
],
|
|
"no-use-before-define": 2,
|
|
|
|
// Stylistic Issues
|
|
"brace-style": [
|
|
1,
|
|
"stroustrup",
|
|
{
|
|
"allowSingleLine": true
|
|
}
|
|
],
|
|
"camelcase": 0,
|
|
"comma-spacing": 1,
|
|
"comma-style": [
|
|
1,
|
|
"last"
|
|
],
|
|
"consistent-this": [1, "self"],
|
|
"eol-last": 1,
|
|
"key-spacing": 1,
|
|
"linebreak-style": [1, "unix"],
|
|
"max-nested-callbacks": [2, 4],
|
|
"new-cap": 2,
|
|
"new-parens": 2,
|
|
"newline-after-var": 0,
|
|
"no-array-constructor": 2,
|
|
"no-continue": 2,
|
|
"no-lonely-if": 1,
|
|
"no-mixed-spaces-and-tabs": [
|
|
1,
|
|
"smart-tabs"
|
|
],
|
|
"no-multiple-empty-lines": [
|
|
1,
|
|
{
|
|
"max": 1
|
|
}
|
|
],
|
|
"no-nested-ternary": 0,
|
|
"no-spaced-func": 1,
|
|
"no-trailing-spaces": 1,
|
|
"no-underscore-dangle": 0,
|
|
"no-unneeded-ternary": 0,
|
|
"one-var": 0,
|
|
"padded-blocks": 0,
|
|
"quote-props": [
|
|
1,
|
|
"as-needed"
|
|
],
|
|
"quotes": [
|
|
1,
|
|
"single"
|
|
],
|
|
"semi": 1,
|
|
"semi-spacing": [
|
|
1,
|
|
{
|
|
"before": false,
|
|
"after": true
|
|
}
|
|
],
|
|
"space-after-keywords": 1,
|
|
"space-before-blocks": 1,
|
|
"space-before-function-paren": 1,
|
|
"space-in-brackets": [
|
|
0,
|
|
"always",
|
|
{
|
|
"singleValue": false,
|
|
"arraysInArrays": false,
|
|
"propertyName": false
|
|
}
|
|
],
|
|
"space-infix-ops": 1,
|
|
"space-return-throw-case": 1,
|
|
"space-unary-ops": 1,
|
|
|
|
// Node
|
|
"no-mixed-requires": 0,
|
|
|
|
// React
|
|
"react/jsx-quotes": [
|
|
1,
|
|
"double"
|
|
],
|
|
"react/jsx-no-undef": 1,
|
|
"react/jsx-sort-props": 0,
|
|
"react/jsx-sort-prop-types": 1,
|
|
"react/jsx-uses-react": 1,
|
|
"react/jsx-uses-vars": 1,
|
|
"react/no-did-mount-set-state": 0,
|
|
"react/no-did-update-set-state": 1,
|
|
"react/no-multi-comp": 1,
|
|
"react/no-unknown-property": 1,
|
|
"react/prop-types": 1,
|
|
"react/react-in-jsx-scope": 1,
|
|
"react/self-closing-comp": 1,
|
|
"react/wrap-multilines": 1
|
|
}
|
|
}
|