File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Lombiq.NodeJs.Extensions/scripts Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 1- /* eslint-disable-next-line import/no-unresolved -- ESLint does not know where to find external modules. */
2- const stylelint = require ( 'stylelint' ) ;
3-
41const { handleWarningObject, handleErrorMessage } = require ( './handle-error' ) ;
52
63function formatResult ( result ) {
@@ -38,10 +35,17 @@ const options = {
3835 formatter : ( results ) => results . forEach ( formatResult ) ,
3936} ;
4037
41- stylelint
42- . lint ( options )
43- . catch ( ( error ) => {
44- process . stdout . write ( error + '\n' ) ;
45- handleErrorMessage ( error ) ;
46- process . exit ( 1 ) ;
47- } ) ;
38+ ( async function main ( ) {
39+ const { default : stylelint } = await import ( 'stylelint' ) ;
40+
41+ stylelint
42+ . lint ( options )
43+ . catch ( ( error ) => {
44+ process . stdout . write ( error + '\n' ) ;
45+ handleErrorMessage ( error ) ;
46+ process . exit ( 1 ) ;
47+ } ) ;
48+ } ) ( ) . catch ( ( error ) => {
49+ handleErrorMessage ( error ) ;
50+ process . exit ( 1 ) ;
51+ } ) ;
You can’t perform that action at this time.
0 commit comments