vue hello world项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
640 B

/**
* @author Yosuke Ota
* See LICENSE file in root directory for full license.
*/
'use strict'
const utils = require('../../utils')
module.exports = {
supported: '>=3.0.0',
/** @param {RuleContext} context @returns {TemplateListener} */
createScriptVisitor(context) {
const scriptSetup = utils.getScriptSetupElement(context)
if (!scriptSetup) {
return {}
}
const reportNode =
utils.getAttribute(scriptSetup, 'setup') || scriptSetup.startTag
return {
Program() {
context.report({
node: reportNode,
messageId: 'forbiddenScriptSetup'
})
}
}
}
}