aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/.eslintrc
blob: 6b892cf526f394ab0aa9fe01c4b96b7b6d000929 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
  "extends": [
    "eslint:recommended"
  ],

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

  "globals": {
    "baseUrl": true,
    "SyntheticInputEvent": true
  },

  "parser": "babel-eslint",

  "plugins": [
    "import",
    "jsx-a11y",
    "flowtype",
    "react"
  ],

  "rules": {
    "array-bracket-spacing": 2,
    "array-callback-return": 2,
    "arrow-parens": [2, "as-needed"],
    "arrow-spacing": 2,
    "block-scoped-var": 2,
    "block-spacing": 2,
    "brace-style": 2,
    "comma-dangle": [2, "never"],
    "comma-spacing": 2,
    "comma-style": 2,
    "computed-property-spacing": 2,
    "consistent-this": [2, "that"],
    "curly": 2,
    "dot-location": [2, "property"],
    "eol-last": 2,
    "eqeqeq": [2, "smart"],
    "func-call-spacing": 2,
    "func-name-matching": 2,
    "func-names": [2, "never"],
    "generator-star-spacing": 2,
    "jsx-quotes": 2,
    "key-spacing": 2,
    "keyword-spacing": 2,
    "max-len": [2, 100],
    "new-parens": 2,
    "no-lonely-if": 2,
    "no-multi-spaces": 2,
    "no-multiple-empty-lines": [2, { "max": 2 }],
    "no-self-compare": 2,
    "no-template-curly-in-string": 2,
    "no-trailing-spaces": 2,
    "no-unneeded-ternary": 2,
    "no-unsafe-negation": 2,
    "no-useless-computed-key": 2,
    "no-useless-rename": 2,
    "no-var": 2,
    "no-whitespace-before-property": 2,
    "object-curly-spacing": [2, "always"],
    "object-shorthand": 2,
    "one-var": [2, "never"],
    "operator-assignment": 2,
    "padded-blocks": [2, "never"],
    "prefer-arrow-callback": 2,
    "prefer-const": 2,
    "prefer-spread": 2,
    "quote-props": [2, "as-needed"],
    "quotes": [2, "single"],
    "rest-spread-spacing": 2,
    "semi": [2, "always"],
    "semi-spacing": 2,
    "space-before-blocks": 2,
    "space-before-function-paren": [2, "never"],
    "space-in-parens": 2,
    "space-unary-ops": 2,
    "template-curly-spacing": 2,
    "yield-star-spacing": 2,

    "flowtype/boolean-style": 2,
    "flowtype/generic-spacing": 2,
    "flowtype/no-dupe-keys": 2,
    "flowtype/no-primitive-constructor-types": 2,
    "flowtype/no-weak-types": [2, {
      "any": true,
      "Object": false,
      "Function": false
    }],
    "flowtype/object-type-delimiter": 2,
    "flowtype/semi": 2,
    "flowtype/space-after-type-colon": 2,
    "flowtype/space-before-generic-bracket": 2,
    "flowtype/space-before-type-colon": 2,
    "flowtype/union-intersection-spacing": 2,

    "import/no-unresolved": 2,
    "import/named": 2,
    "import/default": 2,
    "import/namespace": 2,
    "import/no-named-as-default": 2,
    "import/no-named-as-default-member": 2,
    "import/no-amd": 2,
    "import/first": 2,
    "import/no-duplicates": 2,
    "import/extensions": 2,
    "import/order": [2, {
      "groups": ["builtin", "external"],
      "newlines-between": "never"
    }],
    "import/newline-after-import": 2,
    "import/no-named-default": 2,

    "jsx-a11y/aria-props": 2,
    "jsx-a11y/aria-proptypes": 2,
    "jsx-a11y/aria-role": 2,
    "jsx-a11y/aria-unsupported-elements": 2,
    "jsx-a11y/heading-has-content": 2,
    "jsx-a11y/html-has-lang": 2,
    "jsx-a11y/img-has-alt": 2,
    "jsx-a11y/img-redundant-alt": 2,
    "jsx-a11y/lang": 2,
    "jsx-a11y/mouse-events-have-key-events": 2,
    "jsx-a11y/no-access-key": 2,
    "jsx-a11y/no-marquee": 2,
    "jsx-a11y/onclick-has-focus": 2,
    "jsx-a11y/onclick-has-role": 2,
    "jsx-a11y/role-has-required-aria-props": 2,
    "jsx-a11y/role-supports-aria-props": 2,
    "jsx-a11y/tabindex-no-positive": 2,

    "react/jsx-boolean-value": [2, "always"],
    "react/jsx-closing-bracket-location": [2, {
      "nonEmpty": "after-props",
      "selfClosing": "tag-aligned"
    }],
    "react/jsx-curly-spacing": [2, "never"],
    "react/jsx-equals-spacing": [2, "never"],
    "react/jsx-key": 2,
    "react/jsx-no-duplicate-props": 2,
    "react/jsx-no-undef": 2,
    "react/jsx-pascal-case": 2,
    "react/jsx-space-before-closing": 2,
    "react/jsx-tag-spacing": [2, {
      "closingSlash": "never",
      "beforeSelfClosing": "always",
      "afterOpening": "never"
    }],
    "react/jsx-uses-react": 2,
    "react/jsx-uses-vars": 2,
    "react/no-children-prop": 2,
    "react/no-danger-with-children": 2,
    "react/no-deprecated": 2,
    "react/no-direct-mutation-state": 2,
    "react/no-is-mounted": 2,
    "react/no-render-return-value": 2,
    "react/no-unescaped-entities": 2,
    "react/no-unknown-property": 2,
    "react/react-in-jsx-scope": 2,
    "react/require-render-return": 2,
    "react/self-closing-comp": 2,
    "react/sort-comp": [2, {
      "order": [
        "type-annotations",
        "static-methods",
        "lifecycle",
        "everything-else",
        "rendering"
      ],
      "groups": {
        "rendering": [
          "/^render.+$/",
          "render"
        ]
      }
    }]
  },

  "settings": {
    "import/ignore": [
      "node_modules",
      "hbs$"
    ]
  }
}