Skip to content

Commit

Permalink
Use built-in type definitions of import-lazy (#5237)
Browse files Browse the repository at this point in the history
This change uses the built-in type definitions of the `import-lazy` package.

`importLazy()` accepts an argument as a module ID:
https://github.com/sindresorhus/import-lazy/blob/v4.0.0/index.js#L2-L3
  • Loading branch information
ybiquitous committed Apr 11, 2021
1 parent 0500d7e commit 75f629d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/formatters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
const importLazy = require('import-lazy');

module.exports = {
compact: importLazy(() => require('./compactFormatter'))(),
json: importLazy(() => require('./jsonFormatter'))(),
string: importLazy(() => require('./stringFormatter'))(),
tap: importLazy(() => require('./tapFormatter'))(),
unix: importLazy(() => require('./unixFormatter'))(),
verbose: importLazy(() => require('./verboseFormatter'))(),
compact: importLazy(() => require('./compactFormatter'))('compactFormatter'),
json: importLazy(() => require('./jsonFormatter'))('jsonFormatter'),
string: importLazy(() => require('./stringFormatter'))('stringFormatter'),
tap: importLazy(() => require('./tapFormatter'))('tapFormatter'),
unix: importLazy(() => require('./unixFormatter'))('unixFormatter'),
verbose: importLazy(() => require('./verboseFormatter'))('verboseFormatter'),
};
1 change: 0 additions & 1 deletion types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
declare module '@stylelint/postcss-css-in-js';
declare module '@stylelint/postcss-markdown';
declare module 'import-lazy';
declare module 'postcss-html';
declare module 'postcss-sass';
declare module 'sugarss';

0 comments on commit 75f629d

Please sign in to comment.