/** * @author Wayne Zhang * See LICENSE file in root directory for full license. */ 'use strict' const utils = require('../utils') const COMPILER_MACROS = new Set([ 'defineProps', 'defineEmits', 'defineExpose', 'withDefaults', 'defineModel', 'defineOptions', 'defineSlots' ]) const VUE_MODULES = new Set(['@vue/runtime-core', '@vue/runtime-dom', 'vue']) /** * @param {Token} node */ function isComma(node) { return node.type === 'Punctuator' && node.value === ',' } module.exports = { meta: { type: 'problem', docs: { description: 'disallow importing Vue compiler macros', categories: undefined, url: 'https://eslint.vuejs.org/rules/no-import-compiler-macros.html' }, fixable: 'code', schema: [], messages: { noImportCompilerMacros: "'{{name}}' is a compiler macro and doesn't need to be imported.", onlyValidInScriptSetup: "'{{name}}' is a compiler macro and can only be used inside