jsxcs

2019-09-11

jsxcs是什么

什么是jsxcs,JavaScript Code Style checker with JSX (React) support

jsxcs使用教程帮助文档

⚠️</g-emoji> <g-emoji class="g-emoji" alias="bangbang" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/203c.png">‼️</g-emoji> deprecated/obsolete <g-emoji class="g-emoji" alias="bangbang" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/203c.png">‼️</g-emoji> <g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠️</g-emoji>"><g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠️</g-emoji> <g-emoji class="g-emoji" alias="bangbang" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/203c.png">‼️</g-emoji> Deprecated/Obsolete <g-emoji class="g-emoji" alias="bangbang" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/203c.png">‼️</g-emoji> <g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠️</g-emoji>

JSCS now (since v1.8.0) supports changing the esprima (ast parser) to esprima-fb (Facebooks version of esprima that can parse JSX). This makes JSXCS as a standalone tool obsolete. Same functionality (and more) can be achieved with jscs by using the following command.

npm install jscs esprima-fb
jscs --esprima=esprima-fb

or

jscs --esprima="./node_module/esprima-fb"

or in your .jscsrc

"esprima": "esprima-fb"

Alsoinclude the following in your .jscsrc

"fileExtensions": [".js", ".jsx"]

Read this gistfor more detailed instructions and information/background.

JSXCS

Wrapper around jscsto allow running jscs for JSX files.

How to install

npm install jsxcs -g

How to use

See jscsfor guides.

Caveats

As jsxcs works by ignoring errors on lines that are generated by the JSX transformer, some errors with actual user made styling issues might get omitted.


上一篇:jsxhint
下一篇:sear
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章
暂无相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部