Skip to content

Commit

Permalink
chore: update linting dependencies and configuration (#55)
Browse files Browse the repository at this point in the history
* chore: update ESLint to v9, and fix linting warnings

* style: switch to @elgato/prettier-config

* style: switch to @elgato/prettier-config

* chore: add prettier linting to CI

* build: fix lint script

* chore: remove prettier linting on CI (line-endings strike again)

---------

Co-authored-by: Richard Herman <[email protected]>
  • Loading branch information
GeekyEggo and GeekyEggo authored Oct 10, 2024
1 parent 23e96ab commit f2515bc
Show file tree
Hide file tree
Showing 117 changed files with 8,664 additions and 9,708 deletions.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
max_line_length = 120

[*.yml]
[*.{json,jsonc,md}]
indent_size = 4
indent_style = space

[*.{yaml,yml}]
indent_size = 2
indent_style = space
139 changes: 0 additions & 139 deletions .eslintrc

This file was deleted.

26 changes: 0 additions & 26 deletions .prettierrc

This file was deleted.

56 changes: 28 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
25 changes: 11 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
/** Prefer tabs over spaces for accessibility */
"editor.insertSpaces": false,
"editor.detectIndentation": false,
/* Explorer */
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
"*.ts": "${capture}.test.ts",
".editorconfig": ".eslintrc, .prettierrc",
"jest.config.ts": "babel.config.json",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, .npmrc",
"README.md": "CHANGELOG.md, LICENSE, UPGRADE.md"
}
}
/* Explorer */
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
"*.ts": "${capture}.test.ts",
".editorconfig": ", .prettierrc, eslint.config.mjs",
"jest.config.ts": "babel.config.json",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, .npmrc",
"README.md": "CHANGELOG.md, LICENSE, UPGRADE.md"
}
}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,19 @@ Plugins can be debugged using any Node.js debugger, for example Visual Studio Co

You can configure debugging within the [manifest's Node.js configuration](https://docs.elgato.com/streamdeck/sdk/references/manifest#nodejs).

<!-- prettier-ignore -->
```jsonc
{
// ...
"Nodejs": {
"Version": "20",
"Debug": "enabled"
}
},
}
```

<!-- prettier-ignore-end -->

There are four available options when configuring the `Debug` property within the manifest:

- `"enabled"` - the plugin will run with [`--inspect`](https://nodejs.org/api/cli.html#--inspecthostport) allowing debuggers to connect.
Expand Down
2 changes: 2 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,15 @@ Localization lookup will now return the `key` when the localization cannot be fo

```ts
import streamDeck from "@elgato/streamdeck";

streamDeck.i18n.translate("test"); // undefined
```

**v0.4.0**

```ts
import streamDeck from "@elgato/streamdeck";

streamDeck.i18n.translate("test"); // "test"
```

Expand Down
Loading

0 comments on commit f2515bc

Please sign in to comment.