-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f72fac2
commit e2d5436
Showing
14 changed files
with
114 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @ts-check | ||
|
||
/** | ||
* Wrapper for calling Node's require.resolve with additional paths. | ||
* @param {object} require Node's require implementation (or equivalent). | ||
* @param {string} request Module path to require. | ||
* @param {string[]} paths Paths to resolve module location from. | ||
* @returns {string} Resolved file name. | ||
*/ | ||
const resolveModule = (require, request, paths) => { | ||
const resolvePaths = require.resolve.paths ? require.resolve.paths("") : []; | ||
const allPaths = [ ...paths, ...resolvePaths ]; | ||
return require.resolve(request, { "paths": allPaths }); | ||
}; | ||
|
||
export default resolveModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"customRules": [ | ||
"markdownlint-rule-sample-commonjs", | ||
"../node_modules/markdownlint-rule-sample-module/sample-rule.mjs" | ||
"markdownlint-rule-sample-module" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"outputFormatters": [ | ||
[ "output-formatter-sample-commonjs" ], | ||
[ "output-formatter-sample-module" ], | ||
[ "./node_modules/output-formatter-sample-commonjs/sample-formatter.cjs" ], | ||
[ "./node_modules/output-formatter-sample-module/sample-formatter.mjs" ] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.