Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Support
import-lazy
bundler format (#6449)
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
- Loading branch information
1 parent
1a63e71
commit 2724aa4
Showing
4 changed files
with
384 additions
and
259 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"stylelint": patch | ||
--- | ||
|
||
Fixed: usage of the `import-lazy` package to fit bundlers |
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,18 +1,16 @@ | ||
'use strict'; | ||
|
||
const _importLazy = require('import-lazy'); | ||
|
||
const importLazy = _importLazy(require); | ||
const importLazy = require('import-lazy'); | ||
|
||
/** @type {typeof import('stylelint').formatters} */ | ||
const formatters = { | ||
compact: importLazy('./compactFormatter'), | ||
github: importLazy('./githubFormatter'), | ||
json: importLazy('./jsonFormatter'), | ||
string: importLazy('./stringFormatter'), | ||
tap: importLazy('./tapFormatter'), | ||
unix: importLazy('./unixFormatter'), | ||
verbose: importLazy('./verboseFormatter'), | ||
compact: importLazy(() => require('./compactFormatter'))(), | ||
github: importLazy(() => require('./githubFormatter'))(), | ||
json: importLazy(() => require('./jsonFormatter'))(), | ||
string: importLazy(() => require('./stringFormatter'))(), | ||
tap: importLazy(() => require('./tapFormatter'))(), | ||
unix: importLazy(() => require('./unixFormatter'))(), | ||
verbose: importLazy(() => require('./verboseFormatter'))(), | ||
}; | ||
|
||
module.exports = formatters; |
Oops, something went wrong.