Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sourceType 'module' is not supported when ecmaVersion < 2015 #185

Closed
vladshcherbin opened this issue Nov 15, 2024 · 4 comments · May be fixed by #186
Closed

sourceType 'module' is not supported when ecmaVersion < 2015 #185

vladshcherbin opened this issue Nov 15, 2024 · 4 comments · May be fixed by #186

Comments

@vladshcherbin
Copy link

vladshcherbin commented Nov 15, 2024

Hey 👋

I for the love of god can't understand what's this error. Even the simplest config gives it:

import js from '@eslint/js'
import eslintPluginImportX from 'eslint-plugin-import-x'

export default [
  js.configs.recommended,
  eslintPluginImportX.flatConfigs.recommended,
  {
    rules: {
      'comma-dangle': ['error', 'never'],
      'semi': ['error', 'never']
    }
  }
]

I've tried different setting configurations and language options with no luck.

image

node - 22.10.0
eslint - 9.15.0
eslint-plugin-import-x - 4.4.2

reproduction - https://github.com/vladshcherbin/eslint-import
script - pnpm lint or pnpm eslint

@SukkaW
Copy link
Collaborator

SukkaW commented Nov 16, 2024

@vladshcherbin I will look into this! I suspect #181 is related.

@huynhducduy
Copy link

Some other packages that I find having the same issue:

@eslint-react/eslint-plugin@1.16.1
@tanstack/eslint-plugin-query@5.60.1
eslint-config-flat-gitignore@0.3.0
eslint-plugin-i18next@6.1.0
eslint-plugin-no-use-extend-native@0.7.2
eslint-plugin-react-compiler@19.0.0-beta-8a03594-20241020
eslint-plugin-vitest@0.5.4
typescript-eslint@8.15.0

@SukkaW
Copy link
Collaborator

SukkaW commented Nov 19, 2024

cc @vladshcherbin @huynhducduy

I have created a PR #186 to fix the issue!

@SukkaW
Copy link
Collaborator

SukkaW commented Nov 20, 2024

Fixed by #187

@SukkaW SukkaW closed this as completed Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants