2 Commits

Author SHA1 Message Date
c985af6156 fix: ignore absolute paths /absolute/path 2023-04-02 21:10:47 +02:00
77b8988bea build(deps): update latest 2023-04-02 21:03:51 +02:00
7 changed files with 2853 additions and 11005 deletions

View File

@ -10,10 +10,10 @@ jobs:
lint: lint:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.5.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'

View File

@ -8,13 +8,13 @@ jobs:
release: release:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.5.0'
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'

View File

@ -10,10 +10,10 @@ jobs:
test: test:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.5.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'

13799
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
"lint:commit": "commitlint", "lint:commit": "commitlint",
"lint:editorconfig": "editorconfig-checker", "lint:editorconfig": "editorconfig-checker",
"lint:markdown": "markdownlint-cli2", "lint:markdown": "markdownlint-cli2",
"lint:eslint": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"", "lint:eslint": "eslint \".\" --ignore-path \".gitignore\"",
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"", "lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
"lint:staged": "lint-staged", "lint:staged": "lint-staged",
"test": "tap", "test": "tap",
@ -39,24 +39,24 @@
"postpublish": "pinst --enable" "postpublish": "pinst --enable"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "17.3.0", "@commitlint/cli": "17.5.1",
"@commitlint/config-conventional": "17.3.0", "@commitlint/config-conventional": "17.4.4",
"@types/tap": "15.0.7", "@types/tap": "15.0.8",
"editorconfig-checker": "4.0.2", "editorconfig-checker": "5.0.1",
"eslint": "8.31.0", "eslint": "8.37.0",
"eslint-config-conventions": "6.0.0", "eslint-config-conventions": "8.0.0",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.27.5",
"eslint-plugin-prettier": "4.2.1", "eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1", "eslint-plugin-promise": "6.1.1",
"eslint-plugin-unicorn": "45.0.2", "eslint-plugin-unicorn": "46.0.0",
"husky": "8.0.2", "husky": "8.0.3",
"lint-staged": "13.1.0", "lint-staged": "13.2.0",
"markdownlint": "0.27.0", "markdownlint": "0.28.0",
"markdownlint-cli2": "0.6.0", "markdownlint-cli2": "0.6.0",
"pinst": "3.0.0", "pinst": "3.0.0",
"prettier": "2.8.1", "prettier": "2.8.7",
"semantic-release": "19.0.5", "semantic-release": "21.0.1",
"tap": "16.3.2" "tap": "16.3.4"
} }
} }

View File

@ -71,7 +71,8 @@ const customRule = {
if (hrefSrc != null) { if (hrefSrc != null) {
const url = new URL(hrefSrc, pathToFileURL(params.name)) const url = new URL(hrefSrc, pathToFileURL(params.name))
url.hash = '' url.hash = ''
const isRelative = url.protocol === 'file:' const isRelative =
url.protocol === 'file:' && !hrefSrc.startsWith('/')
if (isRelative && !fs.existsSync(url)) { if (isRelative && !fs.existsSync(url)) {
const detail = `Link "${hrefSrc}" is dead` const detail = `Link "${hrefSrc}" is dead`
addError(onError, lineNumber, detail) addError(onError, lineNumber, detail)

View File

@ -4,6 +4,8 @@
![Image](./image.png) ![Image](./image.png)
![Absolute Path](/absolute/path.png)
[External https link](https://example.com/) [External https link](https://example.com/)
[External https link 2](https:./external.https) [External https link 2](https:./external.https)