xo

编程之家收集整理的这个编程导航主要介绍了xo编程之家,现在分享给大家,也给大家做个参考。

xo 介绍

rOpinionated but configurable ESLint wrapper with lots of goodies included. Enforces strict and readable code. Never discuss code style on a pull request again! No decision-making. No .eslintrc or .jshintrc to manage. It just works! 

Uses ESLint underneath,so issues regarding rules should be opened over there. 

jsX is supported by default,but you'll need eslint-config-xo-react for react specific linting.

安装

npm install --global xo

Usage

$ xo --help

Usage

$ xo [<file|glob> ...]

Options

--init Add XO to your project

--fix Automagically fix issues

--reporter Reporter to use

--env Environment preset [Can be set multiple times]

--global Global variable [Can be set multiple times]

--ignore Additional paths to ignore [Can be set multiple times]

--space Use space indent instead of tabs [Default: 2]

--no-semicolon Prevent use of semicolons

--prettier Conform to Prettier code style

--node-version Range of Node.js version to support

--plugin Include third-party plugins [Can be set multiple times]

--extend Extend defaults with a custom config [Can be set multiple times]

--open Open files with issues in your editor

--quiet Show only errors and no warnings

--extension Additional extension to lint [Can be set multiple times]

--no-esnext Don't enforce ES2015+ rules

--cwd=<dir> Working directory for files

--stdin Validate/fix code from stdin

--stdin-filename Specify a filename for the --stdin option

Examples

$ xo

$ xo index.js

$ xo *.js !foo.js

$ xo --space

$ xo --env=node --env=mocha

$ xo --init --space

$ xo --plugin=react

$ xo --plugin=html --extension=html

$ echo 'const x=true' | xo --stdin --fix

Tips

Put options in package.json instead of using flags so other tools can read it.

GitHub:https://github.com/xojs/xo

网站描述:JavaScript happiness style linte

xo

官方网站:

小编说

以上是编程之家为你收集整理的xo全部内容。

如果觉得编程之家网站内容还不错,欢迎将编程之家推荐给好友。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


scalable.js,一款可以使任何HTML元素动态缩放适合父元素的js插件
Pica,使用JS进行快速高品质图像缩放
react-dates,React 日期组件
date-fns,轻量级的JavaScript 日期工具库
WOW.js,一款效果炫酷的元素在页面滚动时展示CSS3动画的JS插件
Pikaday,一个 轻量级、无依耐Js日期选择器
ngDialog,一个基于AngularJS的扩展对话框模块
react-swipeable-views,一个 React 轮播组件
lazysizes.js,响应式图像延迟加载JS插件【懒加载】
Flickity,一款自适应手机触屏滑动插件
screenfull.js,浏览器全屏插件
ueditor,由百度web前端研发部开发所见即所得富文本web编辑器
Darkmode.js,一键为网站添加黑暗模式
PhotoClip.js,一款手势驱动的裁图插件
react-native-masonry,用于渲染一个图像masonry~ish布局react-native组件
PixelMatch,一个最小、最简单、最快的js像素级图像比较库
number-flip,一款 js 数字翻转切换插件
vue-core-image-upload,图片剪切和上传的 vue 插件
vue-awesome-swiper,基于swiper、Vue.js 的 Swiper 组件
hashids.js,数字生成类似YouTube的ID的js库