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