Skip to content

Commit 6dd75db

Browse files
authored
chore: enable object-shorthand eslint rule (#44)
ECMAScript 6 provides a concise form for defining object literal methods and properties. This syntax can make defining complex object literals much cleaner.
1 parent f78c873 commit 6dd75db

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

eslint.config.mjs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
import { fileURLToPath, URL } from "node:url";
22

33
import { includeIgnoreFile } from "@eslint/compat";
4+
import { defineConfig } from "eslint/config";
45
import importPlugin from "eslint-plugin-import";
56
import tseslint from "typescript-eslint";
67

7-
export default tseslint.config(
8+
export default defineConfig(
89
includeIgnoreFile(fileURLToPath(new URL(".gitignore", import.meta.url))),
910
{
10-
extends: [tseslint.configs.recommendedTypeChecked],
11+
rules: {
12+
"object-shorthand": ["error", "always"],
13+
},
14+
},
15+
{
16+
extends: [
17+
// Base recommended rules from @typescript-eslint.
18+
tseslint.configs.recommendedTypeChecked,
19+
// In the future, we might want to switch to more strict configs.
20+
// tseslint.configs.strictTypeChecked,
21+
// tseslint.configs.stylisticTypeChecked,
22+
],
1123
languageOptions: {
1224
parserOptions: {
1325
projectService: true,

src/plugins/configure-aws.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default createPlugin(
99
context.subscriptions.push(
1010
commands.registerCommand("localstack.configureAwsProfiles", async () => {
1111
await configureAwsProfiles({
12-
telemetry: telemetry,
12+
telemetry,
1313
notifyNoChangesMade: true,
1414
outputChannel,
1515
});

src/plugins/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default createPlugin(
224224
});
225225
await minDelay(
226226
configureAwsProfiles({
227-
telemetry: telemetry,
227+
telemetry,
228228
origin: origin_trigger,
229229
}),
230230
);

src/utils/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function pullDockerImage(
8282
await spawn("docker", ["pull", LOCALSTACK_DOCKER_IMAGE_NAME], {
8383
outputChannel,
8484
outputLabel: "docker.pull",
85-
cancellationToken: cancellationToken,
85+
cancellationToken,
8686
});
8787
} catch (error) {
8888
outputChannel.error("Could not pull LocalStack docker image");

0 commit comments

Comments
 (0)