Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 146e9d1

Browse files
authored
Merge pull request #1368 from maddogjt/eslint-enums
Fix eslint parsing for enums
2 parents fba4a22 + a5f14a9 commit 146e9d1

File tree

6 files changed

+1
-15
lines changed

6 files changed

+1
-15
lines changed

.eslintrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ plugins:
1919
- '@typescript-eslint'
2020
rules: {
2121
"no-empty": ["error", { "allowEmptyCatch": true }],
22-
"no-unused-vars": ["error", { "args": "none" }]
22+
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }]
2323
}
2424

src/arduino/arduino.ts

-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import { SerialMonitor } from "../serialmonitor/serialMonitor";
2727
import { UsbDetector } from "../serialmonitor/usbDetector";
2828
import { ProgrammerManager } from "./programmerManager";
2929

30-
// Not sure why eslint fails to detect usage of this enum, so disable checking.
31-
/* eslint-disable no-unused-vars */
3230
/**
3331
* Supported build modes. For further explanation see the documentation
3432
* of ArduinoApp.build().
@@ -42,7 +40,6 @@ export enum BuildMode {
4240
UploadProgrammer = "Uploading (programmer)",
4341
CliUploadProgrammer = "Uploading (programmer) using Arduino CLI",
4442
}
45-
/* eslint-enable no-unused-vars */
4643

4744
/**
4845
* Represent an Arduino application based on the official Arduino IDE.

src/arduino/intellisense.ts

-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ function makeCompilerParserEngines(dc: DeviceContext) {
146146
}
147147

148148
// Not sure why eslint fails to detect usage of these enums, so disable checking.
149-
/* eslint-disable no-unused-vars */
150149
/**
151150
* Possible states of AnalysisManager's state machine.
152151
*/
@@ -189,7 +188,6 @@ enum AnalysisEvent {
189188
*/
190189
AnalysisBuildDone,
191190
}
192-
/* eslint-enable no-unused-vars */
193191

194192
/**
195193
* This class manages analysis builds for the automatic IntelliSense

src/arduino/package.ts

-3
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ export interface IBoardConfigItem {
152152
options: IBoardConfigOption[];
153153
}
154154

155-
// Not sure why eslint fails to detect usage of this enum, so disable checking.
156-
/* eslint-disable no-unused-vars */
157155
/**
158156
* Return values of calls to IBoard.loadConfig() and IBoard.updateConfig().
159157
*/
@@ -182,7 +180,6 @@ export enum BoardConfigResult {
182180
*/
183181
InvalidFormat,
184182
}
185-
/* eslint-enable no-unused-vars */
186183

187184
/**
188185
* Interface for classes that represent an Arduino supported board.

src/common/constants.ts

-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ export const CPP_CONFIG_FILE = path.join(".vscode", "c_cpp_properties.json");
1010
/** The name of the intellisense configuration managed by vscode-arduino. */
1111
export const C_CPP_PROPERTIES_CONFIG_NAME = "Arduino";
1212

13-
// Not sure why eslint fails to detect usage of this enum, so disable checking.
14-
/* eslint-disable no-unused-vars */
1513
export enum LogLevel {
1614
Info = "info",
1715
Verbose = "verbose",
1816
}
19-
/* eslint-enable no-unused-vars */
2017

2118
export const ARDUINO_MODE: vscode.DocumentSelector = [
2219
{ language: "cpp", scheme: "file" },

src/logger/logger.ts

-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ import * as winston from "winston";
66
import TelemetryTransport from "./telemetry-transport";
77
import UserNotificationTransport from "./user-notification-transport";
88

9-
// Not sure why eslint fails to detect usage of this enum, so disable checking.
10-
/* eslint-disable no-unused-vars */
119
export enum LogLevel {
1210
Info = "info",
1311
Warn = "warn",
1412
Error = "error",
1513
}
16-
/* eslint-enable no-unused-vars */
1714

1815
function FilterErrorPath(line: string): string {
1916
if (line) {

0 commit comments

Comments
 (0)