Skip to content

Commit 981d3e7

Browse files
Fix: Remove prefer ESM from cjs files
1 parent 5f497e4 commit 981d3e7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/configs/esm.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
],
66

77
"rules": {
8+
// Reason: Error on use of any non-module API
89
"unicorn/prefer-module": "error",
910
// Reason: File paths and extensions must fully resolve for the current version of ESM
1011
"import/extensions": [
@@ -18,6 +19,15 @@ module.exports = {
1819
},
1920

2021
"overrides": [
22+
{
23+
"files": [
24+
"**/*.{cjs}",
25+
],
26+
"rules": {
27+
// Reason: Using `.cjs` is an explicit opt-out of the package's default module behavior
28+
"unicorn/prefer-module": "off",
29+
},
30+
},
2131
{
2232
"files": [
2333
"**/*.{ts,tsx}",

0 commit comments

Comments
 (0)