jsx-eslint/eslint-plugin-react

function-component-definition should ignore function with `this`

Open

#2781 aperta il 1 set 2020

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (2797 fork)batch import
bughelp wanted

Metriche repository

Star
 (8630 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

This is a polyfill for IE:

		Element.prototype.closest = function (s) {
			let el = this
			if (!document.documentElement.contains(el)) return null
			do {
				if (el.matches(s)) return el
				el = el.parentElement || el.parentNode
			} while (el !== null && el.nodeType === 1)
			return null
		}

it needs access to this and function-component-definition complains about it.

Guida contributor