From 6616d4c2ec1b0202cc176c5fbfc605b7048472b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 17 Aug 2024 19:56:48 +0900 Subject: [PATCH] docs: update README.md (#24) * docs: update README.md * docs: update README.md * docs: update README.md * chore: update lint-editorconfig in package.json --- README.md | 433 ++++++++++++++++++++++++++++++++++++++++++--------- package.json | 4 +- 2 files changed, 363 insertions(+), 74 deletions(-) diff --git a/README.md b/README.md index 02ca6c0..b4e0086 100644 --- a/README.md +++ b/README.md @@ -1,120 +1,407 @@ # textlint-rule-allowed-uris -A textlint rule for checking **allowed URIs** in ***links*** and ***images*** of Markdown.🔥 +![lint](https://github.com/lumirlumir/npm-textlint-rule-allowed-uris/actions/workflows/lint.yml/badge.svg) +![test](https://github.com/lumirlumir/npm-textlint-rule-allowed-uris/actions/workflows/test.yml/badge.svg) +[![codecov](https://codecov.io/gh/lumirlumir/npm-textlint-rule-allowed-uris/graph/badge.svg?token=69BF05THA2)](https://codecov.io/gh/lumirlumir/npm-textlint-rule-allowed-uris) + +A textlint rule for checking **allowed or disallowed URIs** in ***links*** and ***images*** of Markdown.🔥 > [!IMPORTANT] > -> This rule only supports **Markdown(`.md`)** files. Note that it does not recognize URIs in Text(`.txt`) files. +> 1. This rule only supports **Markdown(`.md`)** files. Note that it does not recognize URIs in **~~Text~~(`.txt`)** files. +> 1. The linting process includes HTTP requests, so an **internet connection is required**. Otherwise, an error will occur. +> 1. Note that every URIs should be recognized by Markdown. URIs which are not recognized by Markdown cannot be inspected. For example, URIs without `https://...` or `http://...`. +> +> ```markdown +> www.google.com +> +> ``` -## Allowed formats +## Features -You can use any ***links*** and ***images*** formats which are supported by Markdown! See examples below. these all types are considered. +### Supported -
- Click to see examples +You can use any ***link*** or ***image*** formats which are supported by Markdown. (Even **HTML tags** are available!) -```markdown -## Links +- [Click to see detailed Markdown examples](/tests/textlint-rule-allowed-uris.data.md). Look at **raw** codes. these all types are considered. - +- You can also check out the [AST Tree of the above examples](https://textlint.github.io/astexplorer/#/snippet/woXCqHBhcnNlcklEwrh0ZXh0bGludDptxINrZG93bi10by1hc3TCqMSFdHTEkGdzwoHEisSMxI7EkMSSxJRyxJbEmMSaxJzEnsSgw4DCqHbEhnNpb27EqMSqxI3Ej8SRxJPElcSXxJnEm8SdxJ90wqYxNC4wLjXCqGZpbGVuYW1lwrBzb3VyY2UudW5kZcWUbmVkwqRjb8Wmw5oJezwhLS0gxK_EscSZxYJ0LWRpc2FixZYgxbU-CgojIyBMxJBrc8aHxbPFtcW3xYXEssSedcScxYJrLXJhd8aELcaGCmjEpHBzOi8vd8aqLmdvb2fFli7FrW3Gh8SMxZlwxZZAZ8SUxZXGsm_GtArGkcW2xbjFhsSaYcaXb8aZLWLGnGNrZXTGn8ahPMajdMalxqfGqcarxq3Gr8axxrPHk8a2bca4Zca6xrxsxr5tx5PFtMeDxpTFh8SQxYJlx5LGh1vHm8awZV0ox5XHl8aoxqp3xqzGrse1x6cgIkhlbGxvIEfHv8WWIinHsse0xZbHtykgx4IgZcehdHkgxpnHsQpbxKXEjse2KCNoZWHFvm5nyJPIlWjEn2goZsacxrvFl3TIk8aFx7JSRUFETUUubWTHty4uL8i5yLvIvci_ZMirx6ogcsiFYcSlxLkgxIJ0aMidyJXHhMaVyY5mxIbFl8WhLWZ1yIbIncezyIvHtlvGmTFdx7LJqV06IMe5xqbHu8eayabIgciDyIXIh8iJyaYixpDJjMmZxYfJm8mdbsmfxa3IhmHGpcWqyaTGmTJdW8mryJ7Ki8muybDGpMmyx5nHvciQxaLGs8iCyITIhsiIyIrHnGXJvMeByb7HrMSayoHJjsqDZS1zaG9ydGPGl8qKxo0zyo_JqMq0ypLJsceYx7zHvsqgybbKnMm5yp_HtcqiyKx0bWzJl2HJsMmbPSLKusmzypfJtcazIj7KmDwvYcahxokgScSUZ2XGj8qjxpLJv8Sax67EkMewyLcKIVvHoMeix7fLjy91xrhvyKcud2lracWaxb5hLsquZ8apy7hp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n0bTRpNKq0bjSodKM0ZBPyZXEusmsxo1Mb2NhbMyuypDSvtOA04LMsiDJhci6yLzIvsmAypvJuMiIyYbTjcqiW8WpxLlyVc2cypIvTElDRU5TRciC05fEhtOaxarLhM-40I7PvM-j0K_Nq9GDz5XQtNGEzr7OpM-wzbzQjDzHjNCNyJTLimjLjNCSx7rKlsq9yIDLk8uVyabLl8uZ07py07zQj8-M067Ppc-S07HQl86f0LXPmdC30InQudO507vHgc-1ac-ICg}). -https://www.google.com +### Only URIs are inspected? -example@gmail.com +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!!! +``` - +### Patterns - +Only **regular expressions** are used for URIs pattern matching. You can define the pattern you want to inspect by yourself. -[google](https://www.google.com "Hello Google") +### Allowed URIs -[google]() +> Related: `allowed.links`, `allowed.images` -[title](#heading) +Allowed URIs act like an **whitelist**. Only those written on the whitelist **can** pass through. -[README.md](README.md) +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 -[google][link1] +> Related: `disallowed.links`, `disallowed.images` -[link1]: https://www.google.com "Hello Google" +On the contrary, disallowed URIs act like an **blacklist**. 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)) -[link2][] +## Installation -[link2]: https://www.google.com "Hello Google" +### `npm` - +```bash +npm install --save-dev textlint-rule-allowed-uris +``` -[link3] +### `yarn` -[link3]: https://www.google.com "Hello Google" +```bash +yarn add --dev textlint-rule-allowed-uris +``` - +## Configs + +### Interface + +Every options are optional. If you pass nothing, then nothing just happens! + +```typescript +{ + rules: { + "allowed-uris": { + allowed?: { // Optional + links?: RegExp[], // Optional + images?: RegExp[], // Optional + }, + disallowed?: { // Optional + links?: RegExp[], // Optional + images?: RegExp[], // Optional + }, + } + } +} +``` -google +### Options + +1. `allowed.links`: `RegExp[]`, Optional + - Allowed `links` act like an **whitelist**. Only those written on the whitelist can pass through. + - If you want to turn off this option, then pass nothing. **NOTE: DO NOT PASS AN EMPTY ARRAY TO TURN OFF THIS OPTION.** + + ```javascript + /* .textlintrc.js */ + // Correct way of turning off this option. + module.exports = { + rules: { + "allowed-uris": { + allowed: { + // links: [], => turned off + images: [/example/], + }, + disallowed: { + links: [/example/], + images: [/example/], + }, + } + } + } + ``` -## Images + - Default value passed: `[/.*/]` + +1. `allowed.images`: `RegExp[]`, Optional + - Allowed `images` act like an **whitelist**. Only those written on the whitelist can pass through. + - If you want to turn off this option, then pass nothing. **NOTE: DO NOT PASS AN EMPTY ARRAY TO TURN OFF THIS OPTION.** + + ```javascript + /* .textlintrc.js */ + // Correct way of turning off this option. + module.exports = { + rules: { + "allowed-uris": { + allowed: { + links: [/example/], + // images: [], => turned off + }, + disallowed: { + links: [/example/], + images: [/example/], + }, + } + } + } + ``` - + - Default value passed: `[/.*/]` + +1. `disallowed.links`: `RegExp[]`, Optional + - Disallowed `links` act like an **blacklist**. 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😯) + + ```javascript + /* .textlintrc.js */ + // Correct way of turning off this option. + module.exports = { + rules: { + "allowed-uris": { + allowed: { + links: [/example/], + images: [/example/], + }, + disallowed: { + // links: [], => turned off + images: [/example/], + }, + } + } + } + ``` -![example](https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg "Example Image") + - Default value passed: `[]` + +1. `disallowed.images`: `RegExp[]`, Optional + - Disallowed `images` act like an **blacklist**. 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😯) + + ```javascript + /* .textlintrc.js */ + // Correct way of turning off this option. + module.exports = { + rules: { + "allowed-uris": { + allowed: { + links: [/example/], + images: [/example/], + }, + disallowed: { + links: [/example/], + // images: [], => turned off + }, + } + } + } + ``` - + - Default value passed: `[]` + +### Example (`textlintrc.js`) + +```javascript +module.exports = { + rules: { + "allowed-uris": { + allowed: { + links: [ + // regular expressions + ], + images: [ + // regular expressions + ], + }, + disallowed: { + links: [ + // regular expressions + ], + images: [ + // regular expressions + ], + }, + } + } +} +``` -![example][image1] +## Usages -[image1]: https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg "Example Image" +```bash +textlint [options] file.md [file|dir|glob*] +``` - +### Without a config file -![image2][] +```bash +npx textlint --rule allowed-uris -f pretty-error file.md +``` -[image2]: https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg "Example Image" +### With a config file - +```bash +npx textlint -f pretty-error file.md +``` -![image3] +## Sample Outputs -[image3]: https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg "Example Image" +When configured like below. - +```javascript +module.exports = { + rules: { + "allowed-uris": { + allowed: { + links: [/google/], + }, + } + } +} +``` - +### `-f pretty-error` option -## Image with link +
+ Click to see sample outputs + +```text +> npx textlint tests/textlint-rule-allowed-uris.data.md --rulesdir ./src -f pretty-error + +textlint-rule-allowed-uris: allowed.links +- problem: 'mailto:example@gmail.com' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:9:1 + v + 8. + 9. example@gmail.com + 10. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: 'mailto:example@gmail.com' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:15:1 + v + 14. + 15. + 16. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: '' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:21:1 + v + 20. + 21. [google]() + 22. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: '#heading' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:23:1 + v + 22. + 23. [title](#heading) + 24. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: '../README.md' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:25:1 + v + 24. + 25. [README.md](../README.md) + 26. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: 'https://en.wikipedia.org/wiki/File:Example.jpg' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:86:1 + v + 85. + 86. [![example](https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg "Example Image")](https://en.wikipedia.org/wiki/File:Example.jpg) + 87. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: '/README.md' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:101:1 + v + 100. + 101. [linkLocal1]: /README.md "Hello README" + 102. + ^ + +textlint-rule-allowed-uris: allowed.links +- problem: '/LICENSE' +- allowed regular expressions: '/google/' +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md:103:1 + v + 102. + 103. [neverUsed]: /LICENSE "neverUsed" + 104. + ^ + +✖ 8 problems (8 errors, 0 warnings) +``` -[![example](https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg "Example Image")](https://en.wikipedia.org/wiki/File:Example.jpg) +
-## Comment +### `-f stylish` option -[//]: # (This behaves like a comment) -[//]: # "This behaves like a comment" -[//]: # 'This behaves like a comment' +
+ Click to see sample outputs + +```text +> npx textlint tests/textlint-rule-allowed-uris.data.md --rulesdir ./src -f stylish + +textlint-rule-allowed-uris/tests/textlint-rule-allowed-uris.data.md + 9:1 error allowed.links +- problem: 'mailto:example@gmail.com' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 15:1 error allowed.links +- problem: 'mailto:example@gmail.com' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 21:1 error allowed.links +- problem: '' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 23:1 error allowed.links +- problem: '#heading' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 25:1 error allowed.links +- problem: '../README.md' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 86:1 error allowed.links +- problem: 'https://en.wikipedia.org/wiki/File:Example.jpg' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 101:1 error allowed.links +- problem: '/README.md' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + 103:1 error allowed.links +- problem: '/LICENSE' +- allowed regular expressions: '/google/' textlint-rule-allowed-uris + +✖ 8 problems (8 errors, 0 warnings) ```
-You can also check out the AST Tree of the examples. [Click!](https://textlint.github.io/astexplorer/#/snippet/woXCqHBhcnNlcklEwrh0ZXh0bGludDptxINrZG93bi10by1hc3TCqMSFdHTEkGdzwoHEisSMxI7EkMSSxJRyxJbEmMSaxJzEnsSgw4DCqHbEhnNpb27EqMSqxI3Ej8SRxJPElcSXxJnEm8SdxJ90wqYxNC4wLjTCqGZpbGVuYW1lwrBzb3VyY2UudW5kZcWUbmVkwqRjb8Wmw5oGUyMjIEzEkGtzCgo8IS0tIMSvxLHFh2F1xJzFgmstcmF3IMW-PsW6aMSkcHM6Ly93xpguZ29vZ8WWLsWtbcW6xIzFmXDFlkBnxJTFlcagb8aixbvFvcW_xoHFhsSaxoTGhsW3LWLGimNrZXTGjS3Gj8W7xpF0xpPGlcaXxpnGm8adxp_GoceBPMakbcamZcaoxqpsxqxtx43GsMaAxYXEsi3EkMWCZca_x4Fbx4nGnmVdKMeDx4XGlsaYd8aaxpzHpceWICJIZWxsbyBHx6_FliIpxbrHo8e7x6YoKSDFvMW-IGXHkHR5IMaHx6HHv8SlxI7IgiNoZWFkxKbIhMiGxb9mxorGqcWXxr7Gjse_UkVBRE1FLm1kx6fIpMimyKjIqmTImseZcse1YcSlxLkgxIJ0aMiPxq_Ih8ayx5zItWbEhsWXxaEtZnXHtsi-yIDHisemW8aHMV3Hv8mRXTogx6nGlMerx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gyc}) +## Q&A -## Usage +### How to distinguish email links? -### NO +Email links like `` are interpreted as `mailto:example@gmail.com`. Therefore, use `/^mailto:/` in regular expressions. -1. URIs which are not recognized by Markdown. - - Note that every URIs should be recognized by Markdown. - - For example, URIs without `https://...` or `http://...`. +## Change Log - ```markdown - - www.google.com - ``` +See [`CHANGELOG.md`](/CHANGELOG.md) ## Contributing @@ -124,6 +411,8 @@ I recommend you to read [textlint guides](https://textlint.github.io/) before co 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. + ### Installation 1. Fork it. @@ -153,7 +442,7 @@ And check out the [Installation](#installation) and [Concepts of `textlint-rule- git switch -c feature ``` -1. Commit your changes. +1. Commit your changes. (`husky` and `lint-staged` will lint and test your changed files!) ```bash git commit -am "feat: feature" @@ -169,21 +458,21 @@ And check out the [Installation](#installation) and [Concepts of `textlint-rule- ### Concepts of `textlint-rule-allowed-uris` -`textlint-rule-allowed-uris` rule checks **allowed URIs** in ***links*** and ***images*** of Markdown. +`textlint-rule-allowed-uris` rule checks **allowed or disallowed URIs** in ***links*** and ***images*** of Markdown. -Detailed node types which are checked by this rule are described below. +#### Detailed node types which are checked by this rule -1. ***Links*** +1. ***Links*** node type - 1. `ASTNodeTypes.Link` - 1. `LinkReference` & `Definition` - 1. `ASTNodeTypes.Html` + 1. `Link`(`ASTNodeTypes.Link`) + 1. `Definition` (We don't use ~~`LinkReference`~~) + 1. `Html`(`ASTNodeTypes.Html`) -1. ***Images*** +1. ***Images*** node type - 1. `ASTNodeTypes.Image` - 1. `ImageReference` & `Definition` - 1. `ASTNodeTypes.Html` + 1. `Image`(`ASTNodeTypes.Image`) + 1. `Definition` (We don't use ~~`ImageReference`~~) + 1. `Html`(`ASTNodeTypes.Html`) > [!NOTE] > @@ -209,7 +498,7 @@ Detailed node types which are checked by this rule are described below. #### AST Tree -You can see detailed parsed AST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YcuLx73JpceZyYHKjsmryLXJrWXJiMmKyrLLlcuXy5nFlsm3y6bMhmXJkse_zJnLi8mSyqHHhMqjy57Ht8uhy6PLpcuny7LLqnLLrMyny6_Lscuzy7XLs2HLuMyCx5DLvcu_zIHLu8y3zITLimXKrsyKyo3EmsqPzI7Jrm_JsMmyZMi-y5fMnmXJtsm4zJ3Mvsm9yZjKoseGzKTLoGTLosuuzKnLqcury63Lpcuwy6jLtG7Ltsy0y7nMu8eRLsu-zIAizLbHkcuIzL7NgMmAzYLJqsmEzYXMkMqSypTKlsqYzJRbzY3Km82RzJrKoM2UzKLNlsufzKbNm8ywzKvMrcuuzaHLss2jzaXMtc2ozLjNrM2uxZbNsMyazbLFv8qwzJPHgMmly6bMgHPFoMq4y5zNl86IzKjOis2ezK7OjsyxzaTMs86SzIPNqsu_yr_FusuHzIXLiyDLo8i8yI3Ft8e_zJXOk8iCzqXOh82ZzK7NnM6LzZ_Mr82izLLLt82nzrHNq8y6zIPOmMyHKcubzZXGlsWXzZrNoM6pzKzPiC9GxZVlOs6WxaLNq8e-CsuHQ8atxZrEkce_xpbJliDFtChUaGlzIGJlaGHEuc-2xI_GvCDKtcahz6t0x75bz67Jl8W0Is-zz7XPt8-5z7vLjM68z7_Qgc-qyKDJpNCGL8-vxbQn0IvPts-4z7rPvNCRx6DQk23Qgyc}). (Already mentioned above.) Look which kind of types are exist for ***links*** and ***images***. +You can see detailed parsed AST Tree in [here](https://textlint.github.io/astexplorer/#/snippet/woXCqHBhcnNlcklEwrh0ZXh0bGludDptxINrZG93bi10by1hc3TCqMSFdHTEkGdzwoHEisSMxI7EkMSSxJRyxJbEmMSaxJzEnsSgw4DCqHbEhnNpb27EqMSqxI3Ej8SRxJPElcSXxJnEm8SdxJ90wqYxNC4wLjXCqGZpbGVuYW1lwrBzb3VyY2UudW5kZcWUbmVkwqRjb8Wmw5oJezwhLS0gxK_EscSZxYJ0LWRpc2FixZYgxbU-CgojIyBMxJBrc8aHxbPFtcW3xYXEss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y5zNj8uEyqTNk8mazKHNl8qqyqzKrsqwyrLMpsyqzY_Ktc2kzKzKtc2nx5bKlc2qzLfNrs2BzLzMvsyCzbTMhs22zbjNhs27zYnNv86BxoPMmcybzZHKk8uHyZfLusyUc8Wgy43MtMuzzpvMuc6dzbHMv86hzYLNt82EzqXMl829zJPLlMaQxb52PjzOsSDOs2POtc2oxqjOms2szL_Nr86ezbLNgM21zYPMi826z4LNvsuUz4ptzrLOtMuOz5DLsc63z5POnMu8z5bOvM2BzqPPgM-czY3Pg2fPny_Ph8eTz7YKIMiUz4vPjc-PzpjNqc-nza3Ouc-qzrvOoM-tz5rNuc6pxaLPnsaGz7rPoM-iz47PpM-_z5HQgc-UzrrMvc-Xzr3Prs-b0IrPss-Fy5fPuMaIxorOq8ewy7fJlSDLisaZx7LMp86myKLOtsy2z6jQg8y70IXNs9CHzr_QnNCtz7LNi8yXzoPMrMiNy6_PpcWX0ILPmNCz0JjMvy9GxZVlOtCdzb7IjtCiIEPGv8WaxJHLoVvGqMqSxoooVGjFvyBiZcitxLlzyJvLuMewy4rGs9GUyLXIntGYya_GiiLRnNGe0aDRosug0aXHj9CoINGpyLTJvNGXL9GZICfRsdGk0bNh0aPRttGn0bnRk8i0J8ie0brEkcqSPD4g0ZvRndKD0aHShdG1xI_Rt9Go0orEkciOW9KOdNKQ0pLRsNKV0Z_Sl9KG0prSiNKh0bzSodKj0oDSgtKn0bTRpNKq0bjSodKM0ZBPyZXEusmsxo1Mb2NhbMyuypDSvtOA04LMsiDJhci6yLzIvsmAypvJuMiIyYbTjcqiW8WpxLlyVc2cypIvTElDRU5TRciC05fEhtOaxarLhM-40I7PvM-j0K_Nq9GDz5XQtNGEzr7OpM-wzbzQjDzHjNCNyJTLimjLjNCSx7rKlsq9yIDLk8uVyabLl8uZ07py07zQj8-M067Ppc-S07HQl86f0LXPmdC30InQudO507vHgc-1ac-ICg}). (Already mentioned above.) Look which kind of types are exist for ***links*** and ***images***. ## License diff --git a/package.json b/package.json index 541a282..4c04b55 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "lint": "concurrently \"npm:lint-*\"", "lint-eslint": "npx eslint . --ext .js", "lint-prettier": "npx prettier . --check", - "lint-editorconfig": "npx editorconfig-checker", + "lint-editorconfig": "npx editorconfig-checker -exclude README.md", "lint-markdownlint": "npx markdownlint **/*.md", "fix": "concurrently \"npm:fix-*\"", "fix-eslint": "npx eslint . --fix --ext .js", @@ -79,7 +79,7 @@ "lint-staged": { "*": [ "npx prettier --check", - "npx editorconfig-checker" + "npx editorconfig-checker -exclude README.md" ], "*.js": "npx eslint", "*.md": "npx markdownlint",