Adding Prettier and fixing up eslint version
[sdc.git] / openecomp-ui / .eslintrc
1 {
2   "parser": "babel-eslint",
3   "parserOptions": {
4     "ecmaVersion": 6,
5     "sourceType": "module",
6     "ecmaFeatures": {
7       "jsx": true,
8       "classes": true,
9       "modules": true,
10       "experimentalDecorators": true
11     }
12   },
13   "env": {
14     "es6": true,
15     "jquery": true,
16     "node": true,
17     "jest": true
18   },
19   "plugins": [
20     "react",
21     "import",
22     "prettier"
23   ],
24   "extends": [
25     "prettier"
26   ],
27   "globals": {
28     "Event": true,
29     "window": true,
30     "navigator": true,
31     "System": true,
32     "document": true,
33     "localStorage": true,
34     "sessionStorage": true,
35     "Image": true,
36     "requestAnimationFrame": true,
37     "cancelAnimationFrame": true,
38     "DEBUG": true,
39     "SVGElement": true,
40     "FormData": true,
41     "DEV": true,
42     "Blob": true,
43     "XMLHttpRequest": true,
44     "WebSocket": true,
45     "URL": true,
46     "PunchOutRegistry": true,
47     "it": true,
48     "describe": true
49   },
50   "rules": {
51     "prettier/prettier": ["error", {
52       "singleQuote": true,
53       "jsxBracketSameLine": true,
54       "tabWidth": 4
55     }],
56     "linebreak-style": 0,
57     "no-unused-vars": 2,
58     "no-bitwise": 0,
59     "no-eq-null": 2,
60     "eqeqeq": 2,
61     "no-unused-expressions": 2,
62     "no-use-before-define": 2,
63     "new-cap": [
64       2,
65       {
66         "capIsNewExceptions": [
67           "DataTable",
68           "V"
69         ]
70       }
71     ],
72     "no-caller": 2,
73     "no-empty": 2,
74     "no-undef": 2,
75     "quotes": [
76       2,
77       "single",
78       "avoid-escape"
79     ],
80     "no-plusplus": 0,
81     "no-cond-assign": [
82       2,
83       "except-parens"
84     ],
85     "no-invalid-this": 0,
86     "dot-notation": 0,
87     "camelcase": [
88       2,
89       {
90         "properties": "never"
91       }
92     ],
93     "curly": 2,
94     "semi": [
95       2,
96       "always"
97     ],
98     "import/default": 0,
99     "import/no-unresolved": 0,
100     "import/no-named-as-default": 2,
101     "import/no-duplicates": 0,
102     "import/imports-first": 2,
103     "import/export": 2,
104     "react/display-name": 0,
105     "react/forbid-prop-types": 0,
106     "react/jsx-boolean-value": 0,
107     "react/jsx-no-duplicate-props": 1,
108     "react/jsx-no-literals": 0,
109     "react/jsx-no-undef": 1,
110     "react/jsx-sort-prop-types": 0,
111     "react/jsx-sort-props": 0,
112     "react/jsx-uses-react": 1,
113     "react/jsx-uses-vars": 1,
114     "react/no-danger": 1,
115     "react/no-did-mount-set-state": 2,
116     "react/no-did-update-set-state": 2,
117     "react/no-direct-mutation-state": 1,
118     "react/no-multi-comp": 0,
119     "react/no-set-state": 0,
120     "react/no-unknown-property": 1,
121     "react/prop-types": 0,
122     "react/react-in-jsx-scope": 1,
123     "react/self-closing-comp": 1,
124     "react/sort-comp": 0,
125   }
126 }