mirror of https://github.com/sveltejs/svelte
10 lines
352 B
10 lines
352 B
import usesThisOrArguments from '../utils/usesThisOrArguments.js';
|
|
|
|
export default function onrender ( validator, prop ) {
|
|
if ( prop.value.type === 'ArrowFunctionExpression' ) {
|
|
if ( usesThisOrArguments( prop.value.body ) ) {
|
|
validator.error( `'onrender' should be a function expression, not an arrow function expression`, prop.start );
|
|
}
|
|
}
|
|
}
|