Skip to content

Commit

Permalink
fix: add flat config support for eslint plugin import (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepassle committed Jan 9, 2024
1 parent 43d678f commit adfb669
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-badgers-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@open-wc/eslint-config': patch
---

add flat config support for eslint-plugin-import
6 changes: 6 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ module.exports = {
'lit/lifecycle-super': 'error',
},
settings: {
// Adds compatibility for eslint-plugin-import in combination with flat config
// See: https://github.com/import-js/eslint-plugin-import/issues/2556#issuecomment-1419518561
'import/parsers': {
espree: ['.js', '.cjs', '.mjs', '.jsx'],
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
[require.resolve('eslint-plugin-import-exports-imports-resolver')]: {},
},
Expand Down

0 comments on commit adfb669

Please sign in to comment.