Updating documentation
[aai/sparky-fe.git] / .eslintrc
1 {
2   "parser": "babel-eslint",
3   "env": {
4     "es6": true,
5     "jquery": true,
6     "node": true
7   },
8   "plugins": [
9     "react",
10     "import"
11   ],
12   "ecmaFeatures": {
13     "jsx": true,
14     "classes": true,
15     "modules": true
16   },
17   "globals": {
18     "window": true,
19     "navigator": true,
20     "System": true,
21     "document": true,
22     "localStorage": true,
23     "sessionStorage": true,
24     "Image": true,
25     "requestAnimationFrame": true,
26     "cancelAnimationFrame": true,
27     "DEBUG": true,
28     "SVGElement": true,
29     "FormData": true,
30     "DEV": true,
31     "Blob": true,
32     "XMLHttpRequest": true,
33     "URL": true,
34     "PunchOutRegistry": true,
35     "it": true,
36     "describe": true,
37     "fetch": false
38   },
39   "rules": {
40     "linebreak-style": 0,
41     "no-unused-vars": 2,
42     "no-bitwise": 0,
43     "no-eq-null": 2,
44     "eqeqeq": 2,
45     "wrap-iife": [
46       2,
47       "any"
48     ],
49     "no-unused-expressions": 2,
50     "indent": [
51       2,
52       2,
53       {
54         "SwitchCase": 1
55       }
56     ],
57     "no-use-before-define": 2,
58     "new-cap": [
59       2,
60       {
61         "capIsNewExceptions": [
62           "DataTable",
63           "V"
64         ]
65       }
66     ],
67     "no-caller": 2,
68     "no-empty": 2,
69     "no-undef": 2,
70     "quotes": [
71       2,
72       "single",
73       "avoid-escape"
74     ],
75     "jsx-quotes": [
76       2,
77       "prefer-single"
78     ],
79     "no-plusplus": 0,
80     "no-cond-assign": [
81       2,
82       "except-parens"
83     ],
84     "comma-style": [
85       2,
86       "last"
87     ],
88     "no-invalid-this": 0,
89     "dot-notation": 0,
90     "max-len": [
91       //Default is 80 words in a line
92       1,
93       120,
94       {
95         "ignoreStrings": true,
96         "ignoreUrls": true,
97         "ignoreRegExpLiterals": true,
98         //"ignorePattern": "^\\s*case\\s.+:"
99         "ignorePattern": "^\\s*var\\s.+:\\s*require\\s*\\(/|^\\s*type\\s*:\\s*|^\\s*case\\s.+:"
100       }
101     ],
102     "camelcase": [
103       2,
104       {
105         "properties": "never"
106       }
107     ],
108     "curly": 2,
109     "brace-style": 0,
110     "semi": [
111       2,
112       "always"
113     ],
114     "space-in-brackets": [
115       0,
116       "never"
117     ],
118     "space-infix-ops": 2,
119     //This rule is aimed at ensuring there are spaces around infix operators.
120     "import/default": 0,
121     "import/no-unresolved": 0,
122     "import/no-named-as-default": 2,
123     "import/no-duplicates": 0,
124     "import/imports-first": 2,
125     "import/export": 2,
126     "react/display-name": 0,
127     "react/forbid-prop-types": 0,
128     "react/jsx-boolean-value": 0,
129     "react/jsx-closing-bracket-location": [
130       1,
131       {
132         "nonEmpty": "after-props",
133         "selfClosing": "after-props"
134       }
135     ],
136     "react/jsx-curly-spacing": 0,
137     //disallow spaces inside of curly braces in JSX attributes
138     "react/jsx-max-props-per-line": 0,
139     "react/jsx-no-duplicate-props": 1,
140     "react/jsx-no-literals": 0,
141     "react/jsx-no-undef": 1,
142     "react/jsx-sort-prop-types": 0,
143     "react/jsx-sort-props": 0,
144     "react/jsx-uses-react": 1,
145     "react/jsx-uses-vars": 1,
146     "react/no-danger": 1,
147     "react/no-did-mount-set-state": 2,
148     "react/no-did-update-set-state": 2,
149     "react/no-direct-mutation-state": 1,
150     "react/no-multi-comp": 0,
151     "react/no-set-state": 0,
152     "react/no-unknown-property": 1,
153     "react/prop-types": 0,
154     "react/react-in-jsx-scope": 1,
155     "react/require-extension": 1,
156     "react/self-closing-comp": 1,
157     "react/sort-comp": 0,
158     "react/wrap-multilines": [
159       1,
160       {
161         "declaration": true,
162         "assignment": false,
163         "return": true
164       }
165     ],
166     "constructor-super": 2,
167     "valid-jsdoc": 0,             // Ensure JSDoc comments are valid (off by default): Uncomment this after the js docs are added
168     "default-case": 0,
169     // require default case in switch statements (off by default)
170     "no-array-constructor": 0,
171     // disallow use of the Array constructor
172     "no-comma-dangle": 0,
173     // disallow trailing commas in object literals
174     "no-var": 0
175     // require let or const instead of var (off by default)
176   }
177 }

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use