Skip to content

Commit

Permalink
Docs: Remove references to global install
Browse files Browse the repository at this point in the history
Fix #2974
Close #3008
  • Loading branch information
molant authored and antross committed Sep 24, 2019
1 parent e03a664 commit 9f13687
Show file tree
Hide file tree
Showing 77 changed files with 509 additions and 652 deletions.
63 changes: 21 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
## Quick start user guide

This comment has been minimized.

Copy link
@smilers

smilers Sep 2, 2021

webhint


Once you have [`Node.js`][node] (v8.x or later) on your machine, you can use
[`npx`][npx] or install `hint` globally to use it.
[`npx`][npx] to test it.

### Using `npx`
### Testing with `npx`

Run the following command:

Expand All @@ -19,62 +19,41 @@ npx hint https://example.com

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

### Installing `webhint` globally
### Installing `webhint` locally

```bash
npm install -g --engine-strict hint
```

Create a `.hintrc` file by running this command and following the
instructions:

```bash
npm create hintrc
```

Choose configurations:

```bash
❯ predefined
custom
```

Choose the configuration you want to extend from:

```bash
❯ development
web-recommended
progressive-web-apps
```

Scan a website:
Install webhint as a `devDependency` of your project:

```bash
hint https://example.com
npm install hint --save-dev
```

To use a different formatter than the one specified in your `.hintrc`
file you can do the following:
And then add a script task to your `package.json`:

```bash
hint https://example.com --formatters excel
```json
{
...
"scripts": {
"webhint": "hint"
}
}
```

To use a different hint than the one specified in your `.hintrc` file:
And run it via:

```bash
hint https://example.com --hints html-checker
npm run webhint -- http://localhost:8080
```

Multiple hints can be specified as a comma separated string:
Or if you are using `yarn` you can skip the step to create a task and
run directly:

```bash
hint https://example.com --hints axe,html-checker
yarn hint http://localhost:8080
```

For more in depth information on how to get started, configurations,
and more, see the online [user guide][user guide], or the [local
version][local user guide] for the most recent (and unstable) content.
To know more about webhint, how to configure it, etc. see the online
[user guide][user guide], or the [local version][local user guide]
for the most recent content.

## Contributing to webhint

Expand Down
15 changes: 5 additions & 10 deletions packages/configuration-accessibility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

This is a `webhint` configuration package to use for enabling
accessibility hints based on [`axe-core`][axe core] provided
via [hint-axe][hint axe].

This package will automatically install all the missing dependencies.

To use it you will have to install it via `npm`:
via [hint-axe][hint axe] and it is installed automatically
with webhint:

```bash
npm install @hint/configuration-accessibility
npm install hint --save-dev
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

The minimum required [`.hintrc`][hintrc] file to use it is
the following:
Expand Down
8 changes: 3 additions & 5 deletions packages/configuration-all/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ This package will automatically install all the missing dependencies.
To use it you will have to install it via `npm`:

```bash
npm install @hint/configuration-all
npm install @hint/configuration-all --save-dev
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

The minimum required [`.hintrc`][hintrc] file to use it is
the following:
Expand Down
16 changes: 6 additions & 10 deletions packages/configuration-development/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# webhint's development configuration (`@hint/configuration-development`)

This packages is a `webhint` configuration package to use during
development.

This package will automatically install all the missing dependencies.

To use it you will have to install it via `npm`:
development and it is installed automatically by webhint:

```bash
npm install @hint/configuration-development
npm install hint --save-dev
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

The minimum required [`.hintrc`][hintrc] file to use it is
the following:
Expand All @@ -31,9 +25,11 @@ and it will be as if you had this:
{
"connector": "local",
"extends": [
"accessibility",
"progressive-web-apps"
],
"formatters": [
"html",
"summary"
],
"hints": {
Expand Down
23 changes: 6 additions & 17 deletions packages/configuration-progressive-web-apps/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# webhint's recommended progressive web apps configuration (`@hint/configuration-progressive-web-apps`)

This packages is a `webhint`'s configuration package to use for
checking progressive web apps (PWAs).
checking progressive web apps (PWAs) and it is installed automatically
by webhint:

This package will automatically install all the missing dependencies.

To use it you will have to install it via `npm`:

```bash
npm install @hint/configuration-progressive-web-apps
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

The minimum required [`.hintrc`][hintrc] file to use it is
the following:
Expand All @@ -30,12 +21,10 @@ and it will be as if you had this:
```json
{
"connector": {
"name": "jsdom",
"options": {
"waitFor": 5000
}
"name": "puppeteer"
},
"formatters": [
"html",
"summary"
],
"hints": {
Expand Down
23 changes: 9 additions & 14 deletions packages/configuration-web-recommended/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# webhint's recommended web configuration (`@hint/configuration-web-recommended`)

This packages is a `webhint`'s configuration package to use in
production websites.

This package will automatically install all the missing dependencies.

To use it you will have to install it via `npm`:
production websites and it is installed automatically by webhint:

```bash
npm install @hint/configuration-web-recommended
npm install hint --save-dev
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

The minimum required [`.hintrc`][hintrc] file to use it is
the following:
Expand All @@ -30,12 +24,13 @@ and it will be as if you had this:
```json
{
"connector": {
"name": "jsdom",
"options": {
"waitFor": 5000
}
"name": "puppeteer"
},
"extends": [
"accessibility"
],
"formatters": [
"html",
"summary"
],
"hints": {
Expand Down
23 changes: 4 additions & 19 deletions packages/connector-jsdom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,14 @@ A connector to use [jsdom][jsdom] in `webhint`.

## Installation

First, you need to install [`webhint`](https://webhint.io/):
This package is installed automatically when adding webhint to your project
so running the following is enough:

```bash
npm install hint
npm install hint --save-dev
```

Then, install the new connector:

```bash
npm install @hint/connector-jsdom
```

## Known issues

* It will not send the events for:

* `element::#document`
* `element::#comment`

## Usage

Configure the connector name in your [`.hintrc`][hintrc]
configuration file:
To use it, activate it via the [`.hintrc`][hintrc] configuration file:

```json
{
Expand Down
16 changes: 4 additions & 12 deletions packages/connector-local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@ with `webhint`.

## Installation

First, you need to install [`webhint`](https://webhint.io/):
This package is installed automatically when adding webhint to your project
so running the following is enough:

```bash
npm install hint
npm install hint --save-dev
```

Then, install the new connector:

```bash
npm install @hint/connector-local
```

## Usage

Configure the connector name in your [`.hintrc`][hintrc]
configuration file:
To use it, activate it via the [`.hintrc`][hintrc] configuration file:

```json
{
Expand Down
16 changes: 4 additions & 12 deletions packages/connector-puppeteer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@ to communicate with the browsers in `webhint`.

## Installation

First, you need to install [`webhint`](https://webhint.io/):
This package is installed automatically when adding webhint to your project
so running the following is enough:

```bash
npm install hint
npm install hint --save-dev
```

Then, install the new connector:

```bash
npm install @hint/connector-puppeteer
```

## Usage

Configure the connector name in your [`.hintrc`][hintrc]
configuration file:
To use it, activate it via the [`.hintrc`][hintrc] configuration file:

```json
{
Expand Down
10 changes: 4 additions & 6 deletions packages/formatter-codeframe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ error was found (if applicable):
To use it you will have to install it via `npm`:

```bash
npm install @hint/formatter-codeframe
npm install @hint/formatter-codeframe --save-dev
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

And then activate it via the [`.hintrc`][hintrc] configuration file:

```json
{
"connector": {...},
"formatters": "codeframe",
"formatters": ["codeframe"],
"hints": {
...
},
Expand Down
10 changes: 4 additions & 6 deletions packages/formatter-excel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ The file will be created in the folder where `webhint` is called from
To use it you will have to install it via `npm`:

```bash
npm install @hint/formatter-excel
npm install @hint/formatter-excel --save-dev
```

Note: You can make `npm` install it as a `devDependency` using the
`--save-dev` parameter, or to install it globally, you can use the
`-g` parameter. For other options see [`npm`'s
documentation](https://docs.npmjs.com/cli/install).
**Note:** The recommended way of running webhint is as a `devDependency` of
your project.

And then activate it via the [`.hintrc`][hintrc] configuration file:

```json
{
"connector": {...},
"formatters": "excel",
"formatters": ["excel"],
"hints": {
...
},
Expand Down
Loading

0 comments on commit 9f13687

Please sign in to comment.