-
-
Notifications
You must be signed in to change notification settings - Fork 198
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: Unexpected token typescript inside Vue files #659
Comments
You'll need to configure ESLint to use This can be done by either using the options callback of |
@Lyrkan Thank you for the answer.
with my
I think everything is well configured but I still can't figure out on why I'm getting such error. |
You're not using Replace |
@Lyrkan Thank you for your answer and helping me out. I have installed typescrpit loader:
and now I'm getting a |
You only added the |
@Lyrkan Solved my problem. Thank you very much. Have a wonderful week 👍 |
This PR was merged into the master branch. Discussion ---------- Remove ESLint user-related config Hi ✋ This PR is a proposal for #657 implementation and should fix issues encountered in #473, #574, #656, #659, and #685. As discussed in #657, it would be better if Encore didn't configure ESLint itself. It should be done by the end user in an configuration file (e.g.: `.eslintrc.js`) ESLint's `parser` option is not configured by default anymore, and `babel-eslint` requirement has been removed. We can considering this as a breaking change, end users should now configure `parser: 'babel-eslint` themselves. Method `Encore.enableEslintLoader('extends-name')` has been deprecated and undocumented, in order to prevent end users to configure ESLint through Encore. A nice message is also displayed when no ESLint configuration is found: ![Capture d’écran de 2020-01-12 11-15-09](https://user-images.githubusercontent.com/2103975/72217430-dfa2a480-352d-11ea-96e3-0e77236127d6.png) I couldn't use `FriendlyErrorsPlugin` for this because error is not coming from Webpack. If someone has a better idea... 😕 **Pros:** - end users have now full control hover ESLint configuration **by default** - no need to `delete options.parser` when trying to use [`eslint-plugin-vue`](https://github.com/vuejs/eslint-plugin-vue) or [`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) - IDEs will be able to integrate ESLint (if they support it) **Cons:** - end users should now configure `parser` option to `babel-eslint` themselves - end users will have to move their config to external config file, but it's ok What do you think? Thanks. **EDIT:** tests failures are unrelated I think. Commits ------- 9d3b02f tweaking wording and order d23982a Display message if no ESLint configuration is found c828b32 Deprecate `Encore.enableEslintLoader('extends-name')` 9f31d95 Add test for ESLint with external configuration (and babel-eslint usage) 3ba6cf2 Remove babel-eslint from ESLint configuration
@Lyrkan Solved my problem. |
@Lyrkan thank you very much |
Hello, first of all I would like to state I know this is not the right place to make such question but I have tried other means but got no response. This leaves me no choice other than to come to the repository itself.
I'm getting the following error when watching for files rebuild from ESLint
In my webpack configuration I have added
typeScriptLoader
:My
tsconfig.json
file looks like:Probably I'm looking at something pretty stupid from my part here. Any help would be much appreciated
The text was updated successfully, but these errors were encountered: