LivelyKernel / LivelyKernel/lively.next
Decorator Support and Linting of Experimental Syntax Features
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by evaluating the browser limitations of the Babel ESLint packages from jspm and the proposed server-side linting approach; done means choosing and implementing a workable decorator-linting strategy that preserves client-side reconciliation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100