97735c8958a448bee276eacf79ddd49fc03e7d17
[WebKit-https.git] / Source / WebInspectorUI / .eslintrc
1 /*
2  * Copyright (C) 2014 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 {
27     "env": {
28         "browser": true,
29         "es6": true,
30         "worker": true,
31     },
32     "globals": {
33         // Agents
34         "ApplicationCacheAgent": true,
35         "CSSAgent": true,
36         "ConsoleAgent": true,
37         "DOMAgent": true,
38         "DOMDebuggerAgent": true,
39         "DOMStorageAgent": true,
40         "DatabaseAgent": true,
41         "DebuggerAgent": true,
42         "HeapAgent",
43         "IndexedDBAgent": true,
44         "InspectorAgent": true,
45         "LayerTreeAgent": true,
46         "MemoryAgent": true,
47         "NetworkAgent": true,
48         "PageAgent": true,
49         "ReplayAgent": true,
50         "RuntimeAgent": true,
51         "ScriptProfilerAgent": true,
52         "TimelineAgent": true,
53         "WorkerAgent": true,
54
55         // WebInspector
56         "AsyncTestSuite": true,
57         "Formatter": true,
58         "FormatterContentBuilder": true,
59         "FrontendTestHarness": true,
60         "InspectorBackend": true,
61         "InspectorBackendClass": true,
62         "InspectorFrontendAPI": true,
63         "InspectorFrontendHost": true,
64         "InspectorProtocol": true,
65         "InspectorTest": true,
66         "LinkedList": true,
67         "ListMultimap": true,
68         "ProtocolTest": true,
69         "ProtocolTestHarness": true,
70         "SyncTestSuite": true,
71         "TestHarness": true,
72         "TestSuite": true,
73         "WebInspector": true,
74
75         // Externals
76         "CodeMirror": true,
77         "esprima": true,
78
79         // DOM
80         "CSSPrimitiveValue": true,
81         "Exception": true,
82         "SQLException": true,
83         "WebKitPoint": true,
84
85         // Utilities
86         "figureDash": true,
87         "ellipsis": true,
88         "emDash": true,
89         "enDash": true,
90         "clamp": true,
91         "isEnterKey": true,
92         "isEmptyObject": true,
93         "insertionIndexForObjectInListSortedByFunction": true,
94         "isFunctionStringNativeCode": true,
95         "parseMIMEType": true,
96         "doubleQuotedString": true,
97         "isWebKitInternalScript": true,
98         "isWebInspectorInternalScript": true,
99         "isWebInspectorConsoleEvaluationScript": true,
100         "appendWebInspectorSourceURL": true,
101         "appendWebInspectorConsoleEvaluationSourceURL": true,
102         "timestamp": true,
103         "handlePromiseException": true,
104         "insertObjectIntoSortedArray": true,
105
106         // Image Utilities
107         "platformImagePath": true,
108         "wrappedSVGDocument": true,
109         "createSVGElement": true,
110         "useSVGSymbol": true,
111
112         // URL Utilities
113         "absoluteURL": true,
114         "parseQueryString": true,
115         "parseURL": true,
116         "parseSecurityOrigin": true,
117         "removeURLFragment": true,
118         "decodeBase64ToBlob": true,
119         "relativePath": true,
120         "parseDataURL": true,
121         "parseLocationQueryParameters": true,
122     },
123     "rules": {
124         "comma-dangle": 0,
125         "consistent-return": 2,
126         "curly": 0,
127         "dot-notation": 0,
128         "eqeqeq": 2,
129         "keyword-spacing": 2,
130         "new-cap": 0,
131         "new-parens": 0,
132         "no-console": 0,
133         "no-constant-condition": 0,
134         "no-extra-bind": 2,
135         "no-extra-parens": [2, "all", {"nestedBinaryExpressions": false}],
136         "no-extra-semi": 2,
137         "no-inner-declarations": 0,
138         "no-new": 0,
139         "no-proto": 0,
140         "no-redeclare": 0,
141         "no-return-assign": 2,
142         "no-shadow": 0,
143         "no-trailing-spaces": 2,
144         "no-undef": 2,
145         "no-underscore-dangle": 0,
146         "no-unused-expressions": 2,
147         "no-unused-vars": [2, {"vars": "all", "args": "none"}],
148         "no-use-before-define": 0,
149         "quotes": [2, "double"],
150         "semi": 2,
151         "space-infix-ops": 2,
152         "strict": 0,
153         "valid-typeof": 2,
154     }
155 }