Coder Social home page Coder Social logo

.vue文件中<script>里不能加注释,加了就报错,不知道怎么回事 about vue-demo-cnodejs HOT 4 CLOSED

sensen1991 avatar sensen1991 commented on September 11, 2024
.vue文件中

Comments (4)

fengcms avatar fengcms commented on September 11, 2024

/*后面有空格,删了就好。

from vue-demo-cnodejs.

sensen1991 avatar sensen1991 commented on September 11, 2024

不,把空格删了也不行。我初步查了下好像是.eslinttrc.js 里面改一下配置,我添加了
'semi': [
'error',
'always',
{
omitLastInOneLineBlock: false
}
],
现在js是可以加分号了,但是还是不能加注释,我还在查原因

from vue-demo-cnodejs.

fengcms avatar fengcms commented on September 11, 2024

你这么纠结,那就把eslint关掉就好了么。开启它的作用是团队协作的时候有一个标准的代码规范,便于代码审查以及工作交接。而不是为了把它配得适合你自己的书写习惯。
所以如果你不喜欢,就关掉就好了,不用去配置这个买卖儿。

from vue-demo-cnodejs.

fengcms avatar fengcms commented on September 11, 2024

一直没用过 /* */ 的注释,刚刚测试了一下,没有任何问题,不会报错。

from vue-demo-cnodejs.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.