]> git.openstreetmap.org Git - rails.git/blob - config/eslint.json
Merge remote-tracking branch 'upstream/pull/2267'
[rails.git] / config / eslint.json
1 {
2   "env": {
3     "browser": true,
4     "jquery": true
5   },
6   "extends": [
7     "eslint:recommended"
8   ],
9   "globals": {
10     "bowser": "readonly",
11     "I18n": "readonly",
12     "L": "readonly",
13     "OSM": "writable",
14     "Piwik": "readonly",
15     "querystring": "readonly",
16     "require": "readonly",
17     "updateLinks": "readonly"
18   },
19   "rules": {
20     "accessor-pairs": "error",
21     "array-bracket-newline": ["error", "consistent"],
22     "array-bracket-spacing": "error",
23     "array-callback-return": "error",
24     "block-scoped-var": "error",
25     "block-spacing": "error",
26     "brace-style": ["error", "1tbs", { "allowSingleLine": true }],
27     "comma-dangle": "error",
28     "comma-spacing": "error",
29     "comma-style": "error",
30     "computed-property-spacing": "error",
31     "curly": ["error", "multi-line", "consistent"],
32     "dot-notation": "error",
33     "eol-last": "error",
34     "eqeqeq": ["error", "smart"],
35     "func-call-spacing": "error",
36     "key-spacing": "error",
37     "keyword-spacing": "error",
38     "no-alert": "warn",
39     "no-array-constructor": "error",
40     "no-caller": "error",
41     "no-div-regex": "error",
42     "no-eval": "error",
43     "no-extend-native": "error",
44     "no-extra-bind": "error",
45     "no-extra-label": "error",
46     "no-floating-decimal": "error",
47     "no-implicit-coercion": "warn",
48     "no-implicit-globals": "warn",
49     "no-implied-eval": "error",
50     "no-iterator": "error",
51     "no-labels": "error",
52     "no-label-var": "error",
53     "no-lone-blocks": "error",
54     "no-lonely-if": "error",
55     "no-loop-func": "error",
56     "no-mixed-operators": "error",
57     "no-multiple-empty-lines": "error",
58     "no-multi-str": "error",
59     "no-negated-condition": "error",
60     "no-nested-ternary": "error",
61     "no-new": "error",
62     "no-new-func": "error",
63     "no-new-object": "error",
64     "no-new-wrappers": "error",
65     "no-octal-escape": "error",
66     "no-process-env": "error",
67     "no-proto": "error",
68     "no-script-url": "error",
69     "no-self-compare": "error",
70     "no-sequences": "error",
71     "no-shadow-restricted-names": "error",
72     "no-throw-literal": "error",
73     "no-trailing-spaces": "error",
74     "no-unmodified-loop-condition": "error",
75     "no-unneeded-ternary": "error",
76     "no-unused-expressions": "off",
77     "no-unused-vars": "error",
78     "no-useless-call": "error",
79     "no-useless-concat": "error",
80     "no-useless-return": "error",
81     "no-use-before-define": ["error", { "functions": false }],
82     "no-void": "error",
83     "no-warning-comments": "warn",
84     "no-whitespace-before-property": "error",
85     "no-with": "error",
86     "object-curly-newline": ["error", { "consistent": true }],
87     "object-curly-spacing": ["error", "always"],
88     "object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
89     "operator-linebreak": ["error", "after"],
90     "padded-blocks": ["error", "never"],
91     "quote-props": ["error", "consistent-as-needed", { "keywords": true, "numbers": true }],
92     "quotes": ["error", "double"],
93     "radix": ["error", "always"],
94     "semi": ["error", "always"],
95     "semi-spacing": "error",
96     "semi-style": "error",
97     "space-before-blocks": "error",
98     "space-before-function-paren": ["error", { "named": "never" }],
99     "space-in-parens": "error",
100     "space-infix-ops": "error",
101     "space-unary-ops": "error",
102     "switch-colon-spacing": "error",
103     "wrap-iife": "error",
104     "wrap-regex": "error",
105     "yoda": "error"
106   }
107 }