Skip to content

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Nov 26, 2020

Enables linting of inline scripts using eslint-plugin-html.

Had to exclude a few files where using template variables in the JS is causing syntax errors for the JS parser. I don't think there's a way to solve this otherwise.

Also contains a bugfix regarding a typo recently introduced, now caught by the linter.

@silverwind silverwind mentioned this pull request Nov 26, 2020
@silverwind silverwind changed the title Enable linting of JS inside templates Enable linting of JS inside templates and fix typo bug Nov 26, 2020
@techknowlogick techknowlogick added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Nov 26, 2020
@techknowlogick techknowlogick added this to the 1.14.0 milestone Nov 26, 2020
Indentation-related rules are disabled because indent templates with
tabs but our lint rules expect spaces.

Also had to exclude a few files where using template variables in the JS
is causing syntax errors for the JS parser. I don't think there's a way
to solve this otherwise.
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 27, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 27, 2020
@lafriks lafriks merged commit 7ab3633 into go-gitea:master Nov 27, 2020
@silverwind silverwind deleted the htmljslint branch November 28, 2020 08:13
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants