Skip to content

Commit

Permalink
[qa] Switched to prettier for CSS/JS formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
youhaveme9 authored Jan 27, 2025
1 parent 0200b6c commit face815
Show file tree
Hide file tree
Showing 13 changed files with 1,207 additions and 1,072 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
pip install -U -I -e .
pip uninstall -y django
pip install -U ${{ matrix.django-version }}
sudo npm install -g jshint stylelint
sudo npm install -g prettier
# start influxdb
docker compose up -d influxdb
Expand Down
1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

1 change: 1 addition & 0 deletions .stylelintignore → .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/*.min.js
**/*.min.css
20 changes: 0 additions & 20 deletions .stylelintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion docs/developer/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Install development dependencies:
pip install -e .
pip install -r requirements-test.txt
npm install -g jshint stylelint
npm install -g prettier
Install WebDriver for Chromium for your browser version from
https://chromedriver.chromium.org/home and extract ``chromedriver`` to one
Expand Down
22 changes: 14 additions & 8 deletions openwisp_monitoring/device/static/monitoring/js/alert-settings.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
(function ($) {
'use strict';
$(function () {
var isActiveCheckboxes = $('[id^="id_monitoring-metric-content_type-object_id"][id $="alertsettings-0-is_active"]');
isActiveCheckboxes.each(function(i, checkbox){
$(checkbox).click(function () {
$('#' + this.id).parent().parent().siblings().toggle(this.checked);
});
});
"use strict";
$(function () {
var isActiveCheckboxes = $(
'[id^="id_monitoring-metric-content_type-object_id"][id $="alertsettings-0-is_active"]',
);
isActiveCheckboxes.each(function (i, checkbox) {
$(checkbox).click(function () {
$("#" + this.id)
.parent()
.parent()
.siblings()
.toggle(this.checked);
});
});
});
})(django.jQuery);
Loading

0 comments on commit face815

Please sign in to comment.