Skip to content

Commit

Permalink
Fix eslint issues in export-order-loaader
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Nov 8, 2023
1 parent 5d1ba5e commit 6cc2b34
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { parse } from 'es-module-lexer';
import MagicString from 'magic-string';
import { LoaderContext } from 'webpack';
import type { LoaderContext } from 'webpack';

export default async function loader(this: LoaderContext<any>, source: string) {
const callback = this.async();

try {
// eslint-disable-next-line @typescript-eslint/naming-convention
const [_, exports] = parse(source);

if (exports.includes('__namedExportsOrder')) {
Expand All @@ -21,4 +22,4 @@ export default async function loader(this: LoaderContext<any>, source: string) {
} catch (err) {
return callback(err as any);
}
};
}

0 comments on commit 6cc2b34

Please sign in to comment.