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
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' #163
Comments
The default value for Regarding TypeScript, I have not tried using eslint-config-hardcore with TypeScript, and I have no idea whether it would work or not. And the |
Please let me know if |
BTW, I can see that Node.js 14 was promoted to LTS two days ago, which means now we should be able to use ES6 modules both on client side and on server side. I guess I should set |
In which cases would you want to use I tried adding some variations of
Bit unfamiliar to Eslint, do you know why this might be? |
Here are some useful typescript-eslint rules that work with JavaScript (they all are included in
Looks like you are facing a known issue with eslint-plugin-import and its Let me know if that helps. |
BTW, I noticed you have |
Aha, I see. With the config {
"extends": ["hardcore", "hardcore/fp", "hardcore/node"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script"
},
"overrides": [
{
"files": ["*.ts"],
"extends": ["hardcore/ts-for-js"],
"parserOptions": { "project": "./tsconfig.json" },
"rules": {"import/no-unused-modules": "off"}
}
]
}
But then I'll look for another config for typescript |
That's unfortunate :( I can see in the stack trace that it's related to the |
This seems like a really cool eslint config! I gave it a try on a typescript project with eslint config
and get the error
I tried with a ts config of
{}
as suggested in readme.I am using E6 syntax and want to use the
import/export
syntax. Do you know what has gone wrong here?The text was updated successfully, but these errors were encountered: