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 b7cc91a commit d95ebaa
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 d95ebaa

Please sign in to comment.