Web Inspector: testCellRoleForRequiredChidren accessibility audit checks for rows...
[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     "extends": "eslint:recommended",
28     "env": {
29         "browser": true,
30         "worker": true,
31         "es6": true,
32     },
33     "parserOptions": {
34         "ecmaVersion": 2018,
35     },
36     "globals": {
37         // Agents
38         "AuditAgent": true,
39         "ApplicationCacheAgent": true,
40         "CSSAgent": true,
41         "CanvasAgent": true,
42         "ConsoleAgent": true,
43         "DOMAgent": true,
44         "DOMDebuggerAgent": true,
45         "DOMStorageAgent": true,
46         "DatabaseAgent": true,
47         "DebuggerAgent": true,
48         "HeapAgent": true,
49         "IndexedDBAgent": true,
50         "InspectorAgent": true,
51         "LayerTreeAgent": true,
52         "MemoryAgent": true,
53         "NetworkAgent": true,
54         "PageAgent": true,
55         "RecordingAgent": true,
56         "RuntimeAgent": true,
57         "ScriptProfilerAgent": true,
58         "ServiceWorkerAgent": true,
59         "TimelineAgent": true,
60         "WorkerAgent": true,
61
62         // Namespace
63         "WI": true,
64
65         // WebInspector
66         "AsyncTestSuite": true,
67         "Debouncer": true,
68         "Formatter": true,
69         "FormatterContentBuilder": true,
70         "FrontendTestHarness": true,
71         "InspectorBackend": true,
72         "InspectorBackendClass": true,
73         "InspectorFrontendAPI": true,
74         "InspectorFrontendHost": true,
75         "InspectorProtocol": true,
76         "InspectorTest": true,
77         "LinkedList": true,
78         "ListMultimap": true,
79         "Multimap": true,
80         "ProtocolTest": true,
81         "ProtocolTestHarness": true,
82         "SyncTestSuite": true,
83         "TestHarness": true,
84         "TestSuite": true,
85         "Throttler": true,
86
87         // Externals
88         "CodeMirror": true,
89         "THREE": true,
90         "esprima": true,
91
92         // Formatters
93         "ESTreeWalker": true,
94         "EsprimaFormatter": true,
95         "FormatterWorker": true,
96
97         // Heap Snapshot
98         "HeapSnapshot": true,
99         "HeapSnapshotDiff": true,
100         "HeapSnapshotWorker": true,
101
102         // DOM
103         "CSSPrimitiveValue": true,
104         "Exception": true,
105         "WebKitPoint": true,
106         "SQLError": true,
107
108         // Utilities
109         "appendWebInspectorConsoleEvaluationSourceURL": true,
110         "appendWebInspectorSourceURL": true,
111         "clamp": true,
112         "doubleQuotedString": true,
113         "ellipsis": true,
114         "emDash": true,
115         "enDash": true,
116         "figureDash": true,
117         "handlePromiseException": true,
118         "insertionIndexForObjectInListSortedByFunction": true,
119         "insertObjectIntoSortedArray": true,
120         "isEmptyObject": true,
121         "isEnterKey": true,
122         "isFunctionStringNativeCode": true,
123         "isTextLikelyMinified": true,
124         "isWebInspectorConsoleEvaluationScript": true,
125         "isWebInspectorInternalScript": true,
126         "isWebKitInternalScript": true,
127         "multiplicationSign": true,
128         "parseMIMEType": true,
129         "resolveDotsInPath": true,
130         "simpleGlobStringToRegExp": true,
131         "textToBlob": true,
132         "timestamp": true,
133         "zeroWidthSpace": true,
134
135         // DOM Utilities
136         "createSVGElement": true,
137
138         // URL Utilities
139         "absoluteURL": true,
140         "decodeBase64ToBlob": true,
141         "parseDataURL": true,
142         "parseLocationQueryParameters": true,
143         "parseQueryString": true,
144         "parseSecurityOrigin": true,
145         "parseURL": true,
146         "relativePath": true,
147         "removeURLFragment": true,
148
149         // Formatter Utilities
150         "isECMAScriptLineTerminator": true,
151         "isECMAScriptWhitespace": true,
152
153         // Debug
154         "handleInternalException": true,
155
156         // CodeMirror
157         "createCodeMirrorColorTextMarkers": true,
158         "createCodeMirrorCubicBezierTextMarkers": true,
159         "createCodeMirrorGradientTextMarkers": true,
160         "createCodeMirrorSpringTextMarkers": true,
161     },
162     "rules": {
163         "array-bracket-spacing": [2, "never"],
164         "block-spacing": [2, "always"],
165         "comma-dangle": [2, "only-multiline"],
166         "comma-spacing": [2, {"before": false, "after": true}],
167         "comma-style": [2, "last"],
168         "consistent-return": 2,
169         "curly": 0,
170         "dot-notation": 0,
171         "eol-last": 2,
172         "eqeqeq": 2,
173         "func-call-spacing": [2, "never"],
174         "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
175         "keyword-spacing": [2, {"before": true, "after": true}],
176         "new-cap": 0,
177         "new-parens": 0,
178         "no-console": 0,
179         "no-constant-condition": 0,
180         "no-extra-bind": 2,
181         "no-extra-parens": [2, "all", {"nestedBinaryExpressions": false}],
182         "no-extra-semi": 2,
183         "no-global-assign": 2,
184         "no-inner-declarations": 0,
185         "no-multi-spaces": 2,
186         "no-new": 0,
187         "no-proto": 0,
188         "no-redeclare": 0,
189         "no-return-assign": 2,
190         "no-self-compare": 2,
191         "no-shadow": 0,
192         "no-trailing-spaces": 2,
193         "no-undef": 2,
194         "no-underscore-dangle": 0,
195         "no-unused-expressions": 2,
196         "no-unused-vars": [2, {"vars": "all", "args": "none"}],
197         "no-use-before-define": 0,
198         "object-curly-spacing": [2, "never"],
199         "quotes": [2, "double"],
200         "semi": 2,
201         "semi-spacing": [2, {"before": false, "after": true}],
202         "space-infix-ops": 2,
203         "spaced-comment": [2, "always"],
204         "strict": 0,
205         "valid-typeof": 2,
206     }
207 }