linkerd2/web/app/.eslintrc

67 lines
1.8 KiB
Plaintext

{
"plugins": [
"react",
"promise"
],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,
"mocha": true
},
"extends" : [
"airbnb",
"eslint:recommended",
"plugin:promise/recommended",
"plugin:react/recommended"
],
"rules": {
"arrow-parens": [2, "as-needed"],
"curly": [2, "all"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"eqeqeq": [2, "smart"],
"import/extensions": [2, "ignorePackages"],
"import/prefer-default-export": 0,
"import/first": [2, ""],
"indent": 2,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-quotes": 2,
"keyword-spacing": 2,
"no-console": [1, { "allow": ["warn", "error"] }], // minor offense
"no-trailing-spaces": 2,
"no-var": 2,
"promise/always-return": 0,
"promise/avoid-new": 0,
"react/display-name": 0,
"react/jsx-boolean-value": 0,
"react/jsx-closing-bracket-location": [2, { "nonEmpty": "after-props", "selfClosing": "after-props" }],
"react/jsx-curly-spacing": [2, "never", {"allowMultiline": false}],
"react/jsx-filename-extension": 0,
"react/jsx-first-prop-new-line": [2, "multiline"],
"react/jsx-wrap-multilines": [
2,
{
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line"
}
],
"react/no-did-update-set-state": [0],
"react/prefer-stateless-function": 0, // TODO: convert to stateless functions and enable
"react/sort-prop-types": 2,
"semi": [2, "always"],
"sort-imports": [2],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "never"],
"strict": [2, "safe"]
}
}