github.com/alexdevranger/node-1.8.27@v0.0.0-20221128213301-aa5841e41d2d/dashboard/assets/.eslintrc (about) 1 // Copyright 2017 The go-ethereum Authors 2 // This file is part of the go-dubxcoin library. 3 // 4 // The go-dubxcoin 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-dubxcoin 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-dubxcoin 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": "airbnb", 33 "plugins": ["flowtype", "react"], 34 "rules": { 35 "no-tabs": "off", 36 "indent": ["error", "tab"], 37 "react/jsx-indent": ["error", "tab"], 38 "react/jsx-indent-props": ["error", "tab"], 39 "react/prefer-stateless-function": "off", 40 "jsx-quotes": ["error", "prefer-single"], 41 "no-plusplus": "off", 42 "no-console": ["error", { "allow": ["error"] }], 43 44 // Specifies the maximum length of a line. 45 "max-len": [ 46 "warn", 47 120, 48 2, 49 { 50 "ignoreUrls": true, 51 "ignoreComments": false, 52 "ignoreRegExpLiterals": true, 53 "ignoreStrings": true, 54 "ignoreTemplateLiterals": true 55 } 56 ], 57 // Enforces consistent spacing between keys and values in object literal properties. 58 "key-spacing": [ 59 "error", 60 { 61 "align": { 62 "beforeColon": false, 63 "afterColon": true, 64 "on": "value" 65 } 66 } 67 ], 68 // Prohibits padding inside curly braces. 69 "object-curly-spacing": ["error", "never"], 70 "no-use-before-define": "off", // messageAPI 71 "default-case": "off", 72 73 "flowtype/boolean-style": ["error", "boolean"], 74 "flowtype/define-flow-type": "warn", 75 "flowtype/generic-spacing": ["error", "never"], 76 "flowtype/no-primitive-constructor-types": "error", 77 "flowtype/no-weak-types": "error", 78 "flowtype/object-type-delimiter": ["error", "comma"], 79 "flowtype/require-valid-file-annotation": "error", 80 "flowtype/semi": ["error", "always"], 81 "flowtype/space-after-type-colon": ["error", "always"], 82 "flowtype/space-before-generic-bracket": ["error", "never"], 83 "flowtype/space-before-type-colon": ["error", "never"], 84 "flowtype/union-intersection-spacing": ["error", "always"], 85 "flowtype/use-flow-type": "warn", 86 "flowtype/valid-syntax": "warn" 87 }, 88 "settings": { 89 "flowtype": { 90 "onlyFilesWithFlowAnnotation": true 91 } 92 } 93 }