Skip to content

Commit

Permalink
fix(eslint-config): allow import module from devDependencies for conf…
Browse files Browse the repository at this point in the history
…ig files
  • Loading branch information
zanminkian committed Nov 27, 2024
1 parent 0c4462d commit 0d71378
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-poets-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fenge/eslint-config": patch
---

fix(eslint-config): allow import module from devDependencies for config files
1 change: 1 addition & 0 deletions packages/eslint-config/src/config/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ export function javascript() {
name: "fenge/javascript/config",
files: ["**/*.config.{js,cjs,mjs,jsx}"],
rules: {
"esm/no-phantom-dep-imports": ["error", { allowDevDependencies: true }],
"import/no-default-export": "off",
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/src/config/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export function typescript(project?: string) {
name: "fenge/typescript/config",
files: ["**/*.config.{ts,cts,mts,tsx}"],
rules: {
"esm/no-phantom-dep-imports": ["error", { allowDevDependencies: true }],
"import/no-default-export": "off",
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/test/no-duplicated.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ await describe("no duplicated", async () => {
[
"@typescript-eslint/no-floating-promises",
"@typescript-eslint/unbound-method",
"esm/no-phantom-dep-imports",
"import/no-default-export",
// extension rule
"@typescript-eslint/dot-notation",
Expand Down

0 comments on commit 0d71378

Please sign in to comment.