mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
GitHub Actions: Add basic ESLinter checks
This commit is contained in:
parent
45fa641d26
commit
c51a3270da
3 changed files with 25 additions and 14 deletions
6
.github/workflows/linters.yml
vendored
6
.github/workflows/linters.yml
vendored
|
@ -13,11 +13,13 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install jshint
|
- name: Install linters
|
||||||
run: |
|
run: |
|
||||||
sudo npm install -g jshint@2.13.6
|
sudo npm install -g jshint@2.13.6 eslint@8.57.0
|
||||||
- name: Run jshint
|
- name: Run jshint
|
||||||
run: jshint internal/ui/static/js/*.js
|
run: jshint internal/ui/static/js/*.js
|
||||||
|
- name: Run ESLint
|
||||||
|
run: eslint internal/ui/static/js/*.js
|
||||||
|
|
||||||
golangci:
|
golangci:
|
||||||
name: Golang Linter
|
name: Golang Linter
|
||||||
|
|
9
internal/ui/static/js/.eslintrc.json
Normal file
9
internal/ui/static/js/.eslintrc.json
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2017": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"indent": ["error", 4]
|
||||||
|
}
|
||||||
|
}
|
|
@ -246,7 +246,7 @@ function handleRefreshAllFeeds() {
|
||||||
function updateEntriesStatus(entryIDs, status, callback) {
|
function updateEntriesStatus(entryIDs, status, callback) {
|
||||||
let url = document.body.dataset.entriesStatusUrl;
|
let url = document.body.dataset.entriesStatusUrl;
|
||||||
let request = new RequestBuilder(url);
|
let request = new RequestBuilder(url);
|
||||||
request.withBody({entry_ids: entryIDs, status: status});
|
request.withBody({ entry_ids: entryIDs, status: status });
|
||||||
request.withCallback((resp) => {
|
request.withCallback((resp) => {
|
||||||
resp.json().then(count => {
|
resp.json().then(count => {
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
@ -675,7 +675,7 @@ function handlePlayerProgressionSave(playerElement) {
|
||||||
) {
|
) {
|
||||||
playerElement.dataset.lastPosition = currentPositionInSeconds.toString();
|
playerElement.dataset.lastPosition = currentPositionInSeconds.toString();
|
||||||
let request = new RequestBuilder(playerElement.dataset.saveUrl);
|
let request = new RequestBuilder(playerElement.dataset.saveUrl);
|
||||||
request.withBody({progression: currentPositionInSeconds});
|
request.withBody({ progression: currentPositionInSeconds });
|
||||||
request.execute();
|
request.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue