Skip to content

Commit bbdb523

Browse files
authored
[0.81] Fork ubroken module (#15892) (#15897)
* Fork ubroken module (#15892) * Fix linter issues
1 parent a85aa6a commit bbdb523

File tree

12 files changed

+672
-114
lines changed

12 files changed

+672
-114
lines changed

docs/react-native-windows-init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Alternatives considered:
2828
* T4: This would have required visual studio to be installed on the users machine and therefore only work on Windows. There were also some perf concerns and we would have to write and ship a standalone executable for the MSBuild tasks so we can call it from JavaScript.
2929

3030
### Quick mustache tutorial:
31-
For proper docs see the [manual](http://mustache.github.io/mustache.5.html) of [mustache](http://mustache.github.io/)
31+
For proper docs see the [manual](https://mustache.github.io/mustache.5.html) of [mustache](https://mustache.github.io/)
3232
But in short:
3333
You run `mustache` via `const text = mustache.render(inputText, obj);` where obj is a regular JavaScript object.
3434
For example:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"husky": "^4.2.5",
4747
"prettier-plugin-hermes-parser": "0.21.1",
4848
"react-native-platform-override": "0.81.2",
49-
"unbroken": "1.0.27",
49+
"@rnw-scripts/unbroken": "*",
5050
"lage": "^2.7.1",
5151
"lodash": "^4.17.15"
5252
},
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
extends: ['@rnw-scripts'],
3+
parserOptions: {tsconfigRootDir : __dirname},
4+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lib/
2+
lib-commonjs/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lib-commonjs
2+
bin.js
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2020-2022 Alexander Sklar
4+
Copyright (c) Microsoft Corporation.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* Copyright (c) Microsoft Corporation.
5+
* Licensed under the MIT License.
6+
*
7+
* Forked from https://github.com/asklar/unbroken
8+
* Original Copyright (c) 2020-2022 Alexander Sklar
9+
*/
10+
11+
process.setSourceMapsEnabled(true);
12+
require('./lib-commonjs/unbroken');
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "@rnw-scripts/unbroken",
3+
"version": "0.0.1",
4+
"private": true,
5+
"description": "Detect broken links in markdown files. Forked from https://github.com/asklar/unbroken",
6+
"license": "MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/microsoft/react-native-windows",
10+
"directory": "packages/@rnw-scripts/unbroken"
11+
},
12+
"scripts": {
13+
"build": "rnw-scripts build",
14+
"clean": "rnw-scripts clean",
15+
"lint": "rnw-scripts lint",
16+
"lint:fix": "rnw-scripts lint:fix",
17+
"watch": "rnw-scripts watch"
18+
},
19+
"main": "lib-commonjs/unbroken.js",
20+
"bin": {
21+
"unbroken": "./bin.js"
22+
},
23+
"dependencies": {
24+
"@react-native-windows/fs": "^0.0.0-canary.70"
25+
},
26+
"devDependencies": {
27+
"@rnw-scripts/eslint-config": "1.2.38",
28+
"@rnw-scripts/just-task": "2.3.58",
29+
"@rnw-scripts/ts-config": "2.0.6",
30+
"@types/node": "^22.14.0",
31+
"@typescript-eslint/eslint-plugin": "^7.1.1",
32+
"@typescript-eslint/parser": "^7.1.1",
33+
"eslint": "^8.19.0",
34+
"prettier": "^3.0.0",
35+
"typescript": "5.0.4"
36+
},
37+
"files": [
38+
"bin.js",
39+
"lib-commonjs"
40+
],
41+
"engines": {
42+
"node": ">= 22"
43+
}
44+
}

0 commit comments

Comments
 (0)