Skip to content

Commit 0c6f292

Browse files
committed
style: lint rule changed
1 parent fe8313e commit 0c6f292

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

packages/shared/plugin-less-copy/rollup.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// import { fileURLToPath, URL } from 'url'
22

3-
import resolve from '@rollup/plugin-node-resolve'
4-
import typescript from '@rollup/plugin-typescript'
5-
import commonjs from '@rollup/plugin-commonjs'
3+
import resolve from '@rollup/plugin-node-resolve';
4+
import typescript from '@rollup/plugin-typescript';
5+
import commonjs from '@rollup/plugin-commonjs';
66

7-
import pkg from './package.json'
7+
import pkg from './package.json';
88

99
export default {
1010
input: 'src/index.ts',
@@ -21,4 +21,4 @@ export default {
2121
sourceMap: false,
2222
}),
2323
],
24-
}
24+
};
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
import { resolve } from 'path'
2-
import { normalizePath, type Plugin } from 'vite'
1+
import { resolve } from 'path';
2+
import { normalizePath, type Plugin } from 'vite';
33

4-
const excludeRegx = /node_modules/
4+
const excludeRegx = /node_modules/;
55

66
function createPlugin(): Plugin {
7-
const maps = new Map<string, string>()
8-
const srcDir = normalizePath(resolve('./src/'))
7+
const maps = new Map<string, string>();
8+
const srcDir = normalizePath(resolve('./src/'));
99

1010
return {
1111
name: 'vite-plugin-less-copy',
1212
enforce: 'pre',
1313
apply: 'build',
1414
transform(code: string, id: string) {
1515
if (!id.endsWith('.less') || excludeRegx.test(id)) {
16-
return
16+
return;
1717
}
1818

19-
maps.set(id, code)
20-
return code
19+
maps.set(id, code);
20+
return code;
2121
},
2222

2323
generateBundle() {
2424
maps.forEach((code, file) => {
25-
const filename = file.replace(srcDir, '').substring(1)
25+
const filename = file.replace(srcDir, '').substring(1);
2626
this.emitFile({
2727
type: 'asset',
2828
fileName: filename,
2929
source: code,
30-
})
31-
})
30+
});
31+
});
3232
},
33-
}
33+
};
3434
}
3535

36-
export default createPlugin
36+
export default createPlugin;

0 commit comments

Comments
 (0)