jsxcs

2019-09-11 admin

jsxcs是什么

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

jsxcs使用教程帮助文档

<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"

Also include the following in your .jscsrc

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

Read this gist for more detailed instructions and information/background.

JSXCS

Wrapper around jscs to allow running jscs for JSX files.

How to install

npm install jsxcs -g

How to use

See jscs for 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.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-74847.html

文章标题:jsxcs

回到顶部