Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
plugins.md
document and createPlugin
type definition
- Loading branch information
1 parent
4772851
commit 121a34f
Showing
6 changed files
with
96 additions
and
71 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 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,17 +1,11 @@ | ||
'use strict'; | ||
|
||
/** @typedef {import('stylelint').Rule} StylelintRule */ | ||
|
||
/** | ||
* @param {string} ruleName | ||
* @param {StylelintRule} rule | ||
* @returns {{ruleName: string, rule: StylelintRule}} | ||
* @type {typeof import('stylelint').createPlugin} | ||
*/ | ||
function createPlugin(ruleName, rule) { | ||
module.exports = function createPlugin(ruleName, rule) { | ||
return { | ||
ruleName, | ||
rule, | ||
}; | ||
} | ||
|
||
module.exports = /** @type {typeof import('stylelint').createPlugin} */ (createPlugin); | ||
}; |
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