Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import Service from "resource:///com/github/Aylur/ags/service.js";
|
||||
import App from "resource:///com/github/Aylur/ags/app.js";
|
||||
import { monitorFile } from "resource:///com/github/Aylur/ags/utils.js";
|
||||
import Gio from "gi://Gio";
|
||||
import { FileInfo } from "types/@girs/gio-2.0/gio-2.0.cjs";
|
||||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import { monitorFile } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import Gio from 'gi://Gio';
|
||||
import { FileInfo } from 'types/@girs/gio-2.0/gio-2.0.cjs';
|
||||
|
||||
class DirectoryMonitorService extends Service {
|
||||
static {
|
||||
@@ -14,23 +14,19 @@ class DirectoryMonitorService extends Service {
|
||||
this.recursiveDirectoryMonitor(`${App.configDir}/scss`);
|
||||
}
|
||||
|
||||
recursiveDirectoryMonitor(directoryPath: string) {
|
||||
recursiveDirectoryMonitor(directoryPath: string): void {
|
||||
monitorFile(directoryPath, (_, eventType) => {
|
||||
if (eventType === Gio.FileMonitorEvent.CHANGES_DONE_HINT) {
|
||||
this.emit("changed");
|
||||
this.emit('changed');
|
||||
}
|
||||
});
|
||||
|
||||
const directory = Gio.File.new_for_path(directoryPath);
|
||||
const enumerator = directory.enumerate_children(
|
||||
"standard::*",
|
||||
Gio.FileQueryInfoFlags.NONE,
|
||||
null,
|
||||
);
|
||||
const enumerator = directory.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
|
||||
|
||||
let fileInfo: FileInfo;
|
||||
while ((fileInfo = enumerator.next_file(null) as FileInfo) !== null) {
|
||||
const childPath = directoryPath + "/" + fileInfo.get_name();
|
||||
const childPath = directoryPath + '/' + fileInfo.get_name();
|
||||
if (fileInfo.get_file_type() === Gio.FileType.DIRECTORY) {
|
||||
this.recursiveDirectoryMonitor(childPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user