fix(lint): remove unnecessary async keywords from synchronous functions
- Remove async from functions that don't use await - Change return types from Promise<void> to void for synchronous functions - Fixes all 8 require-await lint warnings - Reduces total lint warnings from 63 to 55
This commit is contained in:
@@ -119,7 +119,7 @@ WantedBy=multi-user.target
|
||||
* Stop the systemd service
|
||||
* @throws Error if stop fails
|
||||
*/
|
||||
public async stop(): Promise<void> {
|
||||
public stop(): void {
|
||||
try {
|
||||
execSync('systemctl stop nupst.service');
|
||||
logger.success('NUPST service stopped');
|
||||
@@ -168,7 +168,7 @@ WantedBy=multi-user.target
|
||||
* Display the systemd service status
|
||||
* @private
|
||||
*/
|
||||
private async displayServiceStatus(): Promise<void> {
|
||||
private displayServiceStatus(): void {
|
||||
try {
|
||||
const serviceStatus = execSync('systemctl status nupst.service').toString();
|
||||
const boxWidth = 45;
|
||||
@@ -315,7 +315,7 @@ WantedBy=multi-user.target
|
||||
* Stop the service if it's running
|
||||
* @private
|
||||
*/
|
||||
private async stopService(): Promise<void> {
|
||||
private stopService(): void {
|
||||
try {
|
||||
logger.log('Stopping NUPST service...');
|
||||
execSync('systemctl stop nupst.service');
|
||||
@@ -329,7 +329,7 @@ WantedBy=multi-user.target
|
||||
* Disable the service
|
||||
* @private
|
||||
*/
|
||||
private async disableService(): Promise<void> {
|
||||
private disableService(): void {
|
||||
try {
|
||||
logger.log('Disabling NUPST service...');
|
||||
execSync('systemctl disable nupst.service');
|
||||
|
Reference in New Issue
Block a user