some more progress toward ubiquitous eslint-plugin-testing-library
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
+184
-172
@@ -50,179 +50,191 @@ module.exports = {
|
||||
'testing-library/no-await-sync-query': 'error',
|
||||
'testing-library/prefer-wait-for': 'error',
|
||||
'testing-library/no-dom-import': 'error',
|
||||
'testing-library/no-wait-for-side-effects': 'error',
|
||||
'testing-library/no-wait-for-empty-callback': 'error',
|
||||
'no-restricted-globals': [
|
||||
'error',
|
||||
'postMessage',
|
||||
'blur',
|
||||
'focus',
|
||||
'close',
|
||||
'frames',
|
||||
'self',
|
||||
'parent',
|
||||
'opener',
|
||||
'top',
|
||||
'length',
|
||||
'closed',
|
||||
'location',
|
||||
'origin',
|
||||
'name',
|
||||
'locationbar',
|
||||
'menubar',
|
||||
'personalbar',
|
||||
'scrollbars',
|
||||
'statusbar',
|
||||
'toolbar',
|
||||
'status',
|
||||
'frameElement',
|
||||
'navigator',
|
||||
'customElements',
|
||||
'external',
|
||||
'screen',
|
||||
'innerWidth',
|
||||
'innerHeight',
|
||||
'scrollX',
|
||||
'pageXOffset',
|
||||
'scrollY',
|
||||
'pageYOffset',
|
||||
'screenX',
|
||||
'screenY',
|
||||
'outerWidth',
|
||||
'outerHeight',
|
||||
'devicePixelRatio',
|
||||
'clientInformation',
|
||||
'screenLeft',
|
||||
'screenTop',
|
||||
'defaultStatus',
|
||||
'defaultstatus',
|
||||
'styleMedia',
|
||||
'onanimationend',
|
||||
'onanimationiteration',
|
||||
'onanimationstart',
|
||||
'onsearch',
|
||||
'ontransitionend',
|
||||
'onwebkitanimationend',
|
||||
'onwebkitanimationiteration',
|
||||
'onwebkitanimationstart',
|
||||
'onwebkittransitionend',
|
||||
'isSecureContext',
|
||||
'onabort',
|
||||
'onblur',
|
||||
'oncancel',
|
||||
'oncanplay',
|
||||
'oncanplaythrough',
|
||||
'onchange',
|
||||
'onclick',
|
||||
'onclose',
|
||||
'oncontextmenu',
|
||||
'oncuechange',
|
||||
'ondblclick',
|
||||
'ondrag',
|
||||
'ondragend',
|
||||
'ondragenter',
|
||||
'ondragleave',
|
||||
'ondragover',
|
||||
'ondragstart',
|
||||
'ondrop',
|
||||
'ondurationchange',
|
||||
'onemptied',
|
||||
'onended',
|
||||
'onerror',
|
||||
'onfocus',
|
||||
'oninput',
|
||||
'oninvalid',
|
||||
'onkeydown',
|
||||
'onkeypress',
|
||||
'onkeyup',
|
||||
'onload',
|
||||
'onloadeddata',
|
||||
'onloadedmetadata',
|
||||
'onloadstart',
|
||||
'onmousedown',
|
||||
'onmouseenter',
|
||||
'onmouseleave',
|
||||
'onmousemove',
|
||||
'onmouseout',
|
||||
'onmouseover',
|
||||
'onmouseup',
|
||||
'onmousewheel',
|
||||
'onpause',
|
||||
'onplay',
|
||||
'onplaying',
|
||||
'onprogress',
|
||||
'onratechange',
|
||||
'onreset',
|
||||
'onresize',
|
||||
'onscroll',
|
||||
'onseeked',
|
||||
'onseeking',
|
||||
'onselect',
|
||||
'onstalled',
|
||||
'onsubmit',
|
||||
'onsuspend',
|
||||
'ontimeupdate',
|
||||
'ontoggle',
|
||||
'onvolumechange',
|
||||
'onwaiting',
|
||||
'onwheel',
|
||||
'onauxclick',
|
||||
'ongotpointercapture',
|
||||
'onlostpointercapture',
|
||||
'onpointerdown',
|
||||
'onpointermove',
|
||||
'onpointerup',
|
||||
'onpointercancel',
|
||||
'onpointerover',
|
||||
'onpointerout',
|
||||
'onpointerenter',
|
||||
'onpointerleave',
|
||||
'onafterprint',
|
||||
'onbeforeprint',
|
||||
'onbeforeunload',
|
||||
'onhashchange',
|
||||
'onlanguagechange',
|
||||
'onmessage',
|
||||
'onmessageerror',
|
||||
'onoffline',
|
||||
'ononline',
|
||||
'onpagehide',
|
||||
'onpageshow',
|
||||
'onpopstate',
|
||||
'onrejectionhandled',
|
||||
'onstorage',
|
||||
'onunhandledrejection',
|
||||
'onunload',
|
||||
'performance',
|
||||
'stop',
|
||||
'open',
|
||||
'print',
|
||||
'captureEvents',
|
||||
'releaseEvents',
|
||||
'getComputedStyle',
|
||||
'matchMedia',
|
||||
'moveTo',
|
||||
'moveBy',
|
||||
'resizeTo',
|
||||
'resizeBy',
|
||||
'getSelection',
|
||||
'find',
|
||||
'createImageBitmap',
|
||||
'scroll',
|
||||
'scrollTo',
|
||||
'scrollBy',
|
||||
'onappinstalled',
|
||||
'onbeforeinstallprompt',
|
||||
'crypto',
|
||||
'ondevicemotion',
|
||||
'ondeviceorientation',
|
||||
'ondeviceorientationabsolute',
|
||||
'indexedDB',
|
||||
'webkitStorageInfo',
|
||||
'chrome',
|
||||
'visualViewport',
|
||||
'speechSynthesis',
|
||||
'webkitRequestFileSystem',
|
||||
'webkitResolveLocalFileSystemURL',
|
||||
'openDatabase',
|
||||
],
|
||||
[
|
||||
'blur',
|
||||
'captureEvents',
|
||||
'chrome',
|
||||
'clientInformation',
|
||||
'close',
|
||||
'closed',
|
||||
'createImageBitmap',
|
||||
'crypto',
|
||||
'customElements',
|
||||
'defaultstatus',
|
||||
'defaultStatus',
|
||||
'devicePixelRatio',
|
||||
'external',
|
||||
'find',
|
||||
'focus',
|
||||
'frameElement',
|
||||
'frames',
|
||||
'getComputedStyle',
|
||||
'getSelection',
|
||||
'indexedDB',
|
||||
'innerHeight',
|
||||
'innerWidth',
|
||||
'isSecureContext',
|
||||
'length',
|
||||
'location',
|
||||
'locationbar',
|
||||
'matchMedia',
|
||||
'menubar',
|
||||
'moveBy',
|
||||
'moveTo',
|
||||
'name',
|
||||
'navigator',
|
||||
'onabort',
|
||||
'onafterprint',
|
||||
'onanimationend',
|
||||
'onanimationiteration',
|
||||
'onanimationstart',
|
||||
'onappinstalled',
|
||||
'onauxclick',
|
||||
'onbeforeinstallprompt',
|
||||
'onbeforeprint',
|
||||
'onbeforeunload',
|
||||
'onblur',
|
||||
'oncancel',
|
||||
'oncanplay',
|
||||
'oncanplaythrough',
|
||||
'onchange',
|
||||
'onclick',
|
||||
'onclose',
|
||||
'oncontextmenu',
|
||||
'oncuechange',
|
||||
'ondblclick',
|
||||
'ondevicemotion',
|
||||
'ondeviceorientation',
|
||||
'ondeviceorientationabsolute',
|
||||
'ondrag',
|
||||
'ondragend',
|
||||
'ondragenter',
|
||||
'ondragleave',
|
||||
'ondragover',
|
||||
'ondragstart',
|
||||
'ondrop',
|
||||
'ondurationchange',
|
||||
'onemptied',
|
||||
'onended',
|
||||
'onerror',
|
||||
'onfocus',
|
||||
'ongotpointercapture',
|
||||
'onhashchange',
|
||||
'oninput',
|
||||
'oninvalid',
|
||||
'onkeydown',
|
||||
'onkeypress',
|
||||
'onkeyup',
|
||||
'onlanguagechange',
|
||||
'onload',
|
||||
'onloadeddata',
|
||||
'onloadedmetadata',
|
||||
'onloadstart',
|
||||
'onlostpointercapture',
|
||||
'onmessage',
|
||||
'onmessageerror',
|
||||
'onmousedown',
|
||||
'onmouseenter',
|
||||
'onmouseleave',
|
||||
'onmousemove',
|
||||
'onmouseout',
|
||||
'onmouseover',
|
||||
'onmouseup',
|
||||
'onmousewheel',
|
||||
'onoffline',
|
||||
'ononline',
|
||||
'onpagehide',
|
||||
'onpageshow',
|
||||
'onpause',
|
||||
'onplay',
|
||||
'onplaying',
|
||||
'onpointercancel',
|
||||
'onpointerdown',
|
||||
'onpointerenter',
|
||||
'onpointerleave',
|
||||
'onpointermove',
|
||||
'onpointerout',
|
||||
'onpointerover',
|
||||
'onpointerup',
|
||||
'onpopstate',
|
||||
'onprogress',
|
||||
'onratechange',
|
||||
'onrejectionhandled',
|
||||
'onreset',
|
||||
'onresize',
|
||||
'onscroll',
|
||||
'onsearch',
|
||||
'onseeked',
|
||||
'onseeking',
|
||||
'onselect',
|
||||
'onstalled',
|
||||
'onstorage',
|
||||
'onsubmit',
|
||||
'onsuspend',
|
||||
'ontimeupdate',
|
||||
'ontoggle',
|
||||
'ontransitionend',
|
||||
'onunhandledrejection',
|
||||
'onunload',
|
||||
'onvolumechange',
|
||||
'onwaiting',
|
||||
'onwebkitanimationend',
|
||||
'onwebkitanimationiteration',
|
||||
'onwebkitanimationstart',
|
||||
'onwebkittransitionend',
|
||||
'onwheel',
|
||||
'open',
|
||||
'openDatabase',
|
||||
'opener',
|
||||
'origin',
|
||||
'outerHeight',
|
||||
'outerWidth',
|
||||
'pageXOffset',
|
||||
'pageYOffset',
|
||||
'parent',
|
||||
'performance',
|
||||
'personalbar',
|
||||
'postMessage',
|
||||
'print',
|
||||
'releaseEvents',
|
||||
'resizeBy',
|
||||
'resizeTo',
|
||||
'screen',
|
||||
'screenLeft',
|
||||
'screenTop',
|
||||
'screenX',
|
||||
'screenY',
|
||||
'scroll',
|
||||
'scrollbars',
|
||||
'scrollBy',
|
||||
'scrollTo',
|
||||
'scrollX',
|
||||
'scrollY',
|
||||
'self',
|
||||
'speechSynthesis',
|
||||
'status',
|
||||
'statusbar',
|
||||
'stop',
|
||||
'styleMedia',
|
||||
'toolbar',
|
||||
'top',
|
||||
'visualViewport',
|
||||
'webkitRequestFileSystem',
|
||||
'webkitResolveLocalFileSystemURL',
|
||||
'webkitStorageInfo',
|
||||
].map(function f(name) {
|
||||
return {
|
||||
name: name,
|
||||
message:
|
||||
'Avoid using implicitly global variables. Use e.g. window.' +
|
||||
name +
|
||||
' instead if this was your intent.',
|
||||
};
|
||||
}),
|
||||
].flat(),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user