Skip to content

Commit

Permalink
docs: update README.md (#58)
Browse files Browse the repository at this point in the history
* docs: update README.md

* Update README.md

* Update README.md

* docs: update README.md
  • Loading branch information
lumirlumir authored Sep 7, 2024
1 parent c960edb commit bd6044c
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ You can use any ***link*** or ***image*** formats which are supported by Markdow

### Only URIs are inspected?

No! We check not only for URIs, but also for **local paths**! Below patterns are inspected too.
No! We check not only for URIs, but also for **local paths**. Below patterns are inspected too.

```text
README.md (Relative path)
/README.md (Absolute path)
../README.md (Relative path)
/learn/start-a-new-react-project#can-i-use-react-without-a-framework (With hash)
/images/languages/javascript/composition-of-javascript/2.png?raw=true (With query parameters)
And more!!!
And more...
```

### Patterns
Expand All @@ -52,15 +51,15 @@ Only **regular expressions** are used for URIs pattern matching. You can define
Allowed URIs act like an <u>**whitelist**</u>. Only those written on the whitelist **can** pass through.

For example, If you pass an empty array to the option, it allows nothing. i.e. Every ***links*** or ***images*** will be detected. (For a detailed explanation, see [Configs](#configs))
For example, If you pass an empty array to the option, it allows nothing. i.e. Every ***links*** or ***images*** will be detected. (For a detailed explanation, see [Configs](#configs).)

### Disallowed URIs

> Related: `disallowed.links`, `disallowed.images`
On the contrary, disallowed URIs act like an <u>**blacklist**</u>. Only those written on the blacklist **cannot** pass through.

For example, If you pass an empty array to the option, it allows everything. i.e. no ***links*** or ***images*** will be detected. (For a detailed explanation, see [Configs](#configs))
For example, If you pass an empty array to the option, it allows everything. i.e. no ***links*** or ***images*** will be detected. (For a detailed explanation, see [Configs](#configs).)

## Installation

Expand Down Expand Up @@ -153,7 +152,7 @@ Every options are optional. If you pass nothing, then nothing just happens!

1. `disallowed.links`: `RegExp[]`, Optional
- Disallowed `links` act like an <u>**blacklist**</u>. Only those written on the blacklist **cannot** pass through.
- If you want to turn off this option, then pass nothing. or here, you can pass an empty array. (because the default value passed is an empty array too😯)
- If you want to turn off this option, then pass nothing. or here, you can pass an empty array. (because the default value passed is an empty array too.)

```javascript
/* .textlintrc.js */
Expand All @@ -178,7 +177,7 @@ Every options are optional. If you pass nothing, then nothing just happens!

1. `disallowed.images`: `RegExp[]`, Optional
- Disallowed `images` act like an <u>**blacklist**</u>. Only those written on the blacklist **cannot** pass through.
- If you want to turn off this option, then pass nothing. or here, you can pass an empty array. (because the default value passed is an empty array too😯)
- If you want to turn off this option, then pass nothing. or here, you can pass an empty array. (because the default value passed is an empty array too.)

```javascript
/* .textlintrc.js */
Expand Down Expand Up @@ -402,18 +401,19 @@ Email links like `<[email protected]>` are interpreted as `mailto:example@gmail.

## Contributing

Thanks for having attention to this package.🙇‍♂️ Issues and PRs are always welcomed.🎉
Thanks for having attention to this package.🙇‍♂️ Issues and PRs are always welcome.🎉

I recommend you to read [textlint guides](https://textlint.github.io/) before contributing.

And check out the [Installation](#installation) and [Concepts of `textlint-rule-allowed-uris`](#concepts-of-textlint-rule-allowed-uris) guides below. It will help you to understand how this package works.

After that, refer to the comments in source codes. It contains a lot of useful information to help you.
After that, refer to the comments in source codes. It contains useful information to help you.

### Installation

1. Fork it.
1. Clone it to your local directory. ([Git](https://git-scm.com/downloads) is needed!)

1. Clone it to your local directory. ([Git](https://git-scm.com/downloads) is required.)

```bash
git clone https://github.com/lumirlumir/npm-textlint-rule-allowed-uris.git
Expand All @@ -425,32 +425,28 @@ After that, refer to the comments in source codes. It contains a lot of useful i
cd npm-textlint-rule-allowed-uris
```

1. Install npm packages. ([Node.js](https://nodejs.org/en) is needed!)
1. Install npm packages. ([Node.js](https://nodejs.org/en) is required.)

```bash
npm install
```

1. Edit codes.

1. Create `feature` branch.
1. Create `my-branch` branch.

```bash
git switch -c feature
git switch -c my-branch
```

1. Commit your changes. (`husky` and `lint-staged` will lint and test your changed files!)

```bash
git commit -am "feat: feature"
git commit -am "commit type: title"
```

1. Push them to your remote branch.

```bash
git push --set-upstream origin feature
```

1. Submit a pull request.👍

### Concepts of `textlint-rule-allowed-uris`
Expand Down Expand Up @@ -499,7 +495,7 @@ You can see detailed parsed AST Tree in [here](https://textlint.github.io/astexp

## Versioning

This project adheres to [Semantic Versioning](https://semver.org/). For details, please refer to the [`CHANGELOG.md`](/CHANGELOG.md) or [tags](https://github.com/lumirlumir/npm-textlint-rule-allowed-uris/tags).
This project adheres to [Semantic Versioning](https://semver.org/).

## Change Log

Expand Down

0 comments on commit bd6044c

Please sign in to comment.