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

Decorator Support and Linting of Experimental Syntax Features #1132

Open
linusha opened this issue Dec 12, 2023 · 0 comments
Open

Decorator Support and Linting of Experimental Syntax Features #1132

linusha opened this issue Dec 12, 2023 · 0 comments
Labels
✨ enhancement New feature or request

Comments

@linusha
Copy link
Contributor

linusha commented Dec 12, 2023

We recently began looking into using decorators inside of lively. The only hard problem we ran into is that our linter does not support them.

The normal solution would be to use https://www.npmjs.com/package/@babel/eslint-parser and possibly https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin. However, we currently cannot use those inside of the browser, as the transforms we retrieve from jspm are not valid.

An experiment we could try is to lint source code on save on the server side, installing the linter there regularly via npm. This would require us to send the whole sourcecode to the server and back to the client on each save. It might be, that this is not a problem performance wise, as the linter runs very slow in the browser as well.
This approach would however warrant us to have the currently running linter inside of the client as well, as the reconciliation requires the linter for the source code formatting. As components are guaranteed to not contain decorators, we could be able to just lint the component definition with our current setup and linting whole modules on the server side.

Alternative approach is to just check again in the future if the version of the above mentioned packages out of jspm now are working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant