Conversation
This allows use via API Gateway in a web form.
mikeselander
left a comment
There was a problem hiding this comment.
This is pretty simple and I like how you handled the separate request 👍
Once stylelint is enabled this will be. good to go.
src/http.js
Outdated
| version: 'inherit', | ||
| }, | ||
| stylelint: { | ||
| enabled: false, |
There was a problem hiding this comment.
Since there's a CSS button on the Make site, we'll need to enable stylelint here.
There was a problem hiding this comment.
duh! I copied this from config.js but that was pre-merge!
|
|
||
| // Then, prepare the linters. | ||
| const config = { | ||
| version: data.get( 'version' ) || 'latest', |
There was a problem hiding this comment.
This is a future enhancement, but it would be really great to be able to push up a "future" version with the unreleased changes and check against them before they're released. I think it would help us in testing and potentially help projects with checking some code without having to update a. whole project.
There was a problem hiding this comment.
Should be possible already I think?
| let baseDir = dir; | ||
| while ( fnParts.length > 1 ) { | ||
| const nextPart = fnParts.shift(); | ||
| if ( nextPart === '..' || nextPart === '.' ) { |
This allows use via API Gateway in a web form, powering https://make.hmn.md/lint-check/
Requires API Gateway reconfiguration; hm-linter-development has that reconfiguration, but hm-linter does not yet. (Also, I've already deployed this to hm-linter-development.)
Sidenote: I spent a few hours trying to get API Gateway testing locally, and could not work it out, I don't think it's really possible. For testing this, unfortunately the best way is to use hm-linter-development so you get the actual event object from API Gateway. 😞