/
githubmirror
/
ionic-framework
Обзор
Документация
Войти
/
githubmirror
/
ionic-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/custom-rules/no-component-on-ready-method.js
23 строки
811 B
Liam DeBeasi
chore(eslint): add async playwright assert rule (#26491)
15 дек 2022, 22:39
Не верифицирован
15 дек 2022, 22:39
c994a20
Код
Авторство
О чём код?
module.exports = { meta: { messages: { noComponentOnReadyMethod: 'Using the componentOnReady method is not allowed. Use the componentOnReady helper utility in src/utils/helpers.ts instead.', }, }, create(context) { return { CallExpression(node) { /** * We only want to exclude usages of componentOnReady(). * Checking for the existence of the componentOnReady method * is a way of determining if we are in a lazy loaded build * or custom elements build, so we want to allow that. */ const callee = node.callee; if (callee.type === 'MemberExpression' && callee.property.name === 'componentOnReady') { context.report({ node: node, messageId: 'noComponentOnReadyMethod' }); } } } } };