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