5 Star 7 Fork 2

Gitee 极速下载 / Project-Sonar

加入 Gitee
与超过 1000 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/sonarwhal/sonar
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md

webhint

Build Status Gitter FOSSA Status

Quick start user guide

webhint is a customizable linting tool that helps you improve your site's accessibility, speed, cross-browser compatibility, and more by checking your code for best practices and common errors.

It can be run from the command line (CLI), via a browser extension, as a VS Code extension, and from the online service.

To use it from the from the CLI you will need to install Node.js (v10.x or later) on your machine, and you can use npx to test it.

Testing with npx

Run the following command:

npx hint https://example.com

This will analyze https://example.com using the default configuration.

Installing webhint locally

Install webhint as a devDependency of your project:

npm install hint --save-dev

And then add a script task to your package.json:

{
    ...
    "scripts": {
        "webhint": "hint"
    }
}

And run it via:

npm run webhint -- http://localhost:8080

Or if you are using yarn you can skip the step to create a task and run directly:

yarn hint http://localhost:8080

To know more about webhint, how to configure it, etc. see the online user guide, or the local version for the most recent content.

Contributing to webhint

This project follows a monorepo pattern. That means that the code for all the webhint flavors (CLI, browser and VS Code extension, hints, formatters, etc.) are in here and are published as separate npm packages.

To build the project from the source you will need to install a recent version of node and yarn. Once you've done this run the following from the root of your cloned version:

yarn
yarn build

This can take a bit so please be patient.

To learn more about the internals of webhint, the structure of the project, how to create new hints, parsers, formatters, etc, take a look at the online contributor guide (or the local version).

Contributing to the browser and VS Code extensions

To learn about how to build one of the extensions please check the CONTRIBUTING.md files for each of these packages:

Code of Conduct

All projects in the webhintio organization follow this CoC which adheres to the OpenJS Foundation Code of Conduct.

Other important links

License

The code is available under the Apache 2.0 license.

FOSSA Status

简介

Sonar 是由微软 Edge 浏览器团队开源的 linting 工具和网站扫描工具,能够帮助站长检查网站潜藏的性能和安全问题,帮助开发者创建更快、更好和更安全的网站 展开 收起
JavaScript
Apache-2.0
取消

发行版

暂无发行版

Project-Sonar

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/mirrors/Project-Sonar.git
git@gitee.com:mirrors/Project-Sonar.git
mirrors
Project-Sonar
Project-Sonar
master

搜索帮助

E71a60c3 8189591 Df7b7c6b 8189591