-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathesm.js
23 lines (22 loc) · 828 Bytes
/
esm.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import tseslint from "typescript-eslint";
import {possibleModuleExtensionsFiles} from "../files.js";
export default tseslint.config(
{
files: possibleModuleExtensionsFiles,
rules: {
// Reason: Error on use of any non-module API
"unicorn/prefer-module": "error",
// Reason: File paths and extensions must fully resolve for the current version of ESM
"import/extensions": [
"error",
// In ESM, always include extensions
// - If using TypeScript, consider using `.js` extensions or the `allowImportingTsExtensions` or
// `rewriteRelativeImportExtensions` TypeScript compiler options
"ignorePackages",
],
// Reason: Doesn't work correctly when using ESM
// See: https://github.com/import-js/eslint-plugin-import/issues/2442
"import/no-named-as-default-member": "off",
},
},
);