Skip to content

Commit 503ec42

Browse files
committed
chore: run linter
1 parent 4a82fb2 commit 503ec42

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/loaders/windicss-style-pitcher.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
import type webpack from 'webpack'
22

3-
type LoaderTest = (l: { path: string, ident?: string }) => boolean
3+
type LoaderTest = (l: { path: string; ident?: string }) => boolean
44

5-
const templatePitcherTest : LoaderTest = l => /(\/|\\|@)windicss-template/.test(l.path)
6-
const windiPitcherTest : LoaderTest = l => /(\/|\\|@)windicss-style-pitcher/.test(l.path)
7-
const postCssLoaderTest : LoaderTest = l => /(\/|\\|@)postcss-loader/.test(l.path)
8-
const cssLoaderTest : LoaderTest = l => /(\/|\\|@)css-loader/.test(l.path)
5+
const templatePitcherTest: LoaderTest = l => /(\/|\\|@)windicss-template/.test(l.path)
6+
const windiPitcherTest: LoaderTest = l => /(\/|\\|@)windicss-style-pitcher/.test(l.path)
7+
const postCssLoaderTest: LoaderTest = l => /(\/|\\|@)postcss-loader/.test(l.path)
8+
const cssLoaderTest: LoaderTest = l => /(\/|\\|@)css-loader/.test(l.path)
99

1010
/*
1111
* Move the position of the transform-template loader for Vue SFCs.
1212
*
1313
* We move it just after the PostCSS loader
1414
*/
1515
export const pitch = function(this: webpack.loader.LoaderContext, remainingRequest: string) {
16-
1716
const findLoaderIndex = (test: LoaderTest) => this.loaders.findIndex(test)
1817
/**
1918
* Removes a loader recursively from the request and returns a found instance
2019
* @param test
2120
*/
22-
const removeLoader : (test: LoaderTest) => any = (test) => {
21+
const removeLoader: (test: LoaderTest) => any = (test) => {
2322
let index, loader
2423
while ((index = findLoaderIndex(test)) !== -1) {
2524
loader = this.loaders[index]
@@ -38,7 +37,6 @@ export const pitch = function(this: webpack.loader.LoaderContext, remainingReque
3837
return
3938
}
4039

41-
4240
let newTemplateLoaderIndex = findLoaderIndex(postCssLoaderTest)
4341
// just in-case they don't have post-css for whatever reason we also search for the css-loader
4442
if (newTemplateLoaderIndex === -1)

0 commit comments

Comments
 (0)