github.com/tuotoo/go-ethereum@v1.7.4-0.20171121184211-049797d40a24/dashboard/assets/.eslintrc (about)

     1  // Copyright 2017 The go-ethereum Authors
     2  // This file is part of the go-ethereum library.
     3  //
     4  // The go-ethereum library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The go-ethereum library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  // React syntax style mostly according to https://github.com/airbnb/javascript/tree/master/react
    18  {
    19    "plugins": [
    20      "react"
    21    ],
    22    "parser": "babel-eslint",
    23    "parserOptions": {
    24      "ecmaFeatures": {
    25        "jsx": true,
    26        "modules": true
    27      }
    28    },
    29    "rules": {
    30      "react/prefer-es6-class": 2,
    31      "react/prefer-stateless-function": 2,
    32      "react/jsx-pascal-case": 2,
    33      "react/jsx-closing-bracket-location": [1, {"selfClosing": "tag-aligned", "nonEmpty": "tag-aligned"}],
    34      "react/jsx-closing-tag-location": 1,
    35      "jsx-quotes": ["error", "prefer-double"],
    36      "no-multi-spaces": "error",
    37      "react/jsx-tag-spacing": 2,
    38      "react/jsx-curly-spacing": [2, {"when": "never", "children": true}],
    39      "react/jsx-boolean-value": 2,
    40      "react/no-string-refs": 2,
    41      "react/jsx-wrap-multilines": 2,
    42      "react/self-closing-comp": 2,
    43      "react/jsx-no-bind": 2,
    44      "react/require-render-return": 2,
    45      "react/no-is-mounted": 2,
    46      "key-spacing": ["error", {"align": {
    47        "beforeColon": false,
    48        "afterColon": true,
    49        "on": "value"
    50      }}]
    51    }
    52  }