简体   繁体   中英

ESLint: How Do I tell eslint to ignore a coldfusion comment

We are using ESLint and the ESlint HTML plugin. We are running into an issue where we are using a coldfusion comment <!--- and eslint is parsing everything inside the comment as if it is javascript. Is there a way to tell eslint to ignore everything between <!--- and --->

I'm not sure if there's a way to configure ESLint to do this automatically, but you should be able to wrap your CF comments with ESLint configuration comments to disable linting for that block.

/* eslint-disable */
<!---
...
--->
/* eslint-enable */

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM