TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

ESLint: A Next-Generation JavaScript Linter

81 点作者 muriithi超过 9 年前

9 条评论

SerpentJoe超过 9 年前
ESLint combined with Babel for syntax highlighting has made my life so much nicer.<p><a href="https:&#x2F;&#x2F;medium.com&#x2F;@dan_abramov&#x2F;lint-like-it-s-2015-6987d44c5b48" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@dan_abramov&#x2F;lint-like-it-s-2015-6987d44c...</a>
exratione超过 9 年前
Once you are over the initial hurdle of creating a config file, which is sort of like picking words you like while browsing a dictionary, ESLint is a great replacement for the JSHint and JSCS combination - much more compact and less finicky.<p>Here&#x27;s a simple .eslintrc that hits pretty much all the high points and syntax conventions that people fight over, while leaving the things that most people agree on as the standard defaults:<p><a href="https:&#x2F;&#x2F;www.exratione.com&#x2F;2015&#x2F;07&#x2F;eslint-as-a-replacement-for-jshint-and-jscs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.exratione.com&#x2F;2015&#x2F;07&#x2F;eslint-as-a-replacement-fo...</a>
eltaco超过 9 年前
ESLint is pretty awesome - the project has a great team and always adding new functionality (cache and then parallel linting sound great)!<p>Although it isn&#x27;t unique for all the features listed, as JSCS has the same things: an autoconfigure feature, built-in (as well as user created) presets&#x2F;configs, multiple formatters, custom plugins&#x2F;rules, custom parsers (esprima&#x2F;espree&#x2F;babel), autofixing of almost all rules. Hopefully both projects can benefit or integrate better together more in the future? (I contribute to both!)<p>I think autofixing for all rules (maybe with <a href="https:&#x2F;&#x2F;github.com&#x2F;cst&#x2F;cst" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cst&#x2F;cst</a>) would be a nice goal for the future when thinking about the next-generation of linters. Making it easier to update configs when new rules&#x2F;options are added would be nice as well.
Lazare超过 9 年前
ESLint is a very solid tool. As others have noted, you do need to find a good config, but the airbnb JS style guide comes with a very, very good one: <a href="https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;javascript" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;javascript</a>
Tankenstein超过 9 年前
Been using eslint for a while now, it truly is great. Using it with the airbnb javascript conf for react development often catches stupid style mistakes and helps my team keep in the same style.
lhnz超过 9 年前
ESLint is nice but it&#x27;s a pain to setup. A lot of people are beginning to use standard linters built on top of it like `semistandard` [0] .<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;Flet&#x2F;semistandard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Flet&#x2F;semistandard</a>
draw_down超过 9 年前
Recommended! My team uses eslint with the &quot;Standard&quot; style, no more arguments about how a for-loop should be written. <a href="http:&#x2F;&#x2F;standardjs.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;standardjs.com&#x2F;</a>
评论 #10315132 未加载
deadprogram超过 9 年前
We switched Cylon.js (<a href="https:&#x2F;&#x2F;github.com&#x2F;hybridgroup&#x2F;cylon&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hybridgroup&#x2F;cylon&#x2F;</a>) to use ESLint a few months back. Great tool!
hippich超过 9 年前
speaking of config, keep in mind that eslint comes with easy configurator to get going: `eslint --init`