简体   繁体   English

ATOM-CSSLINT忽略ID

[英]ATOM - CSSLINT ignore ids

Is there a way to make csslint in Atom ignore "ids", so I don't get the warning "Don't use IDs in selectors"? 有没有一种方法可以使Atom中的csslint忽略“ ids”,所以我不会收到“不要在选择器中使用ID”的警告?

Edit: My question was identified as a possible duplicate of " Disable warnings (ids selector) in linter-csslint on Atom? ", but I mentioned in my own answer that I could not understand how to make the process to solve my problem. 编辑:我的问题被确定为“ 在Atom上的linter-csslint中禁用警告(ids选择器)? ”的可能重复项,但是我在自己的回答中提到我不明白如何进行解决问题的过程。 I ended up finding out. 我最终发现了。

Well, guys, I ended up discovering how to do that. 好吧,伙计们,我最终发现了如何做到这一点。 The other questions similar to mine did solve the problem, but they were not so clear TO ME on how to make the solution work. 其他与我类似的问题确实解决了问题,但是对我来说,如何使解决方案有效尚不明确。 If you guys go to github " https://github.com/ebednarz/csslintrc/blob/master/.csslintrc ", there are some lines to ignore the elements. 如果你们去github“ https://github.com/ebednarz/csslintrc/blob/master/.csslintrc ”,有一些行可以忽略这些元素。 What wasn't that clear to me was "ok, what should I do with it?". 我不清楚的是“好吧,我该怎么办?”。

So you have two options (I use Windows). 因此,您有两个选择(我使用Windows)。 You either create a file in Atom or command line called ".csslintrc" and place it INSIDE THE FOLDER OF THE PROJECT you are working on OR you can place this file in your USER FOLDER IN WINDOWS. 您可以在Atom或命令行中创建一个名为“ .csslintrc”的文件,然后将其放在您正在处理的项目的文件夹中,也可以将该文件放在WINDOWS中的用户文件夹中。 Like, "C:\\Users\\yourUserName". 就像“ C:\\ Users \\ yourUserName”。 If you put it there, all the projects will use this file. 如果将其放在此处,则所有项目都将使用此文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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