aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/.eslintrc
blob: 19e2098c50fec6394abb50484303317e4385ac7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
  "extends": "eslint:recommended",

  "ecmaFeatures": {
    "jsx": true,
    "modules": true
  },

  "env": {
    "browser": true,
    "es6": true,
    "mocha": true,
    "node": true
  },

  "globals": {
    "define": true,
    "require": true,
    "numeral": true,
    "key": true,
    "d3": true,
    "baseUrl": true,
    "t": true,
    "tp": true
  },

  "parser": "babel-eslint",

  "plugins": [
    "react",
    "mocha"
  ],

  "rules": {
    "arrow-spacing": 1,
    "comma-spacing": [1, { "before": false, "after": true }],
    "curly": 2,
    "eol-last": 1,
    "eqeqeq": [2, "smart"],
    "indent": [1, 2, { "SwitchCase": 1, "VariableDeclarator": 2 }],
    "jsx-quotes": 1,
    "key-spacing": [1, { "beforeColon": false, "afterColon": true }],
    "no-multi-spaces": 1,
    "no-self-compare": 2,
    "no-unexpected-multiline": 2,
    "max-len": [1, 120, 2],
    "no-const-assign": 2,
    "no-multiple-empty-lines": [1, { "max": 3 }],
    "no-spaced-func": 1,
    "no-this-before-super": 2,
    "no-trailing-spaces": 1,
    "no-unneeded-ternary": 1,
    "object-curly-spacing": [1, "always"],
    "one-var": [1, { "let": "never", "const": "never" }],
    "quotes": [1, "single", "avoid-escape"],
    "prefer-const": 0,
    "semi": [1, "always"],
    "space-after-keywords": [1, "always"],

    "react/jsx-closing-bracket-location": [1, "after-props"],
    "react/jsx-handler-names": 0,
    "react/jsx-key": 2,
    "react/jsx-max-props-per-line": [1, { "maximum": 3 }],
    "react/jsx-no-duplicate-props": 2,
    "react/jsx-no-undef": 2,
    "react/jsx-pascal-case": 1,
    "react/jsx-uses-react": 1,
    "react/jsx-uses-vars": 2,
    "react/no-did-mount-set-state": [2, "allow-in-func"],
    "react/no-did-update-set-state": [2, "allow-in-func"],
    "react/no-direct-mutation-state": 2,
    "react/no-multi-comp": 0,
    "react/no-unknown-property": 2,
    "react/prop-types": 0,
    "react/react-in-jsx-scope": 2,
    "react/self-closing-comp": 2,
    "react/sort-comp": 1
  }
}