github.com/chainopen/ethchaincode@v0.0.0-20190924072703-d975acdaa1c6/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 "env": { 20 "browser": true, 21 "node": true, 22 "es6": true 23 }, 24 "parser": "babel-eslint", 25 "parserOptions": { 26 "sourceType": "module", 27 "ecmaVersion": 6, 28 "ecmaFeatures": { 29 "jsx": true 30 } 31 }, 32 "extends": [ 33 "eslint:recommended", 34 "airbnb", 35 "plugin:flowtype/recommended", 36 "plugin:react/recommended" 37 ], 38 "plugins": [ 39 "flowtype", 40 "react" 41 ], 42 "rules": { 43 "no-tabs": "off", 44 "indent": ["error", "tab"], 45 "react/jsx-indent": ["error", "tab"], 46 "react/jsx-indent-props": ["error", "tab"], 47 "react/prefer-stateless-function": "off", 48 "react/destructuring-assignment": ["error", "always", {"ignoreClassFields": true}], 49 "jsx-quotes": ["error", "prefer-single"], 50 "no-plusplus": "off", 51 "no-console": ["error", { "allow": ["error"] }], 52 // Specifies the maximum length of a line. 53 "max-len": ["warn", 120, 2, { 54 "ignoreUrls": true, 55 "ignoreComments": false, 56 "ignoreRegExpLiterals": true, 57 "ignoreStrings": true, 58 "ignoreTemplateLiterals": true 59 }], 60 // Enforces consistent spacing between keys and values in object literal properties. 61 "key-spacing": ["error", {"align": { 62 "beforeColon": false, 63 "afterColon": true, 64 "on": "value" 65 }}], 66 // Prohibits padding inside curly braces. 67 "object-curly-spacing": ["error", "never"], 68 "no-use-before-define": "off", // message types 69 "default-case": "off" 70 }, 71 "settings": { 72 "import/resolver": { 73 "node": { 74 "paths": ["components"] // import './components/Component' -> import 'Component' 75 } 76 }, 77 "flowtype": { 78 "onlyFilesWithFlowAnnotation": true 79 } 80 } 81 }