Skip to content

Commit 891c77b

Browse files
committed
ci(lint): update linter and use ts
1 parent b3a8ea5 commit 891c77b

File tree

7 files changed

+927
-1982
lines changed

7 files changed

+927
-1982
lines changed

.eslintrc.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import eslint from "@eslint/js"
2+
import stylistic from '@stylistic/eslint-plugin'
3+
import tseslint from "typescript-eslint"
4+
5+
/** @type {import('eslint').Linter.Config[]} */
6+
export default [
7+
eslint.configs.recommended,
8+
tseslint.configs.base,
9+
...tseslint.configs.strict,
10+
...tseslint.configs.stylistic,
11+
stylistic.configs.customize({
12+
indent: 2,
13+
quotes: 'single',
14+
semi: false,
15+
}),
16+
{
17+
rules: {
18+
"@typescript-eslint/no-empty-object-type": "off",
19+
"@typescript-eslint/no-inferrable-types": "off",
20+
"@typescript-eslint/no-non-null-assertion": "off",
21+
"@stylistic/brace-style": "off",
22+
"comma-dangle": ["error", "always-multiline"]
23+
},
24+
},
25+
{ ignores: ["lib/", "src/types/"] },
26+
]

lib/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ declare const SCOPE_FULL_CAMERA = "read_camera write_camera access_camera read_p
1717
* Full scope for camera and weather station, end user has to provide an explicit consent with autorization code flow
1818
*/
1919
declare const SCOPE_FULL = "read_station read_camera write_camera access_camera read_presence access_presence";
20-
type NetatmoToken = {
20+
interface NetatmoToken {
2121
access_token: string;
2222
refresh_token: string;
2323
expires_in: number;
24-
};
24+
}
2525
declare class Token {
2626
accessToken: string | null;
2727
refreshToken: string | null;

lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class NetatmoClient {
240240
* @param {boolean} isRetry This is the second try for this request (default false)
241241
* @return {object|Array} Data in response
242242
*/
243+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
243244
request(method_1, path_1) {
244245
return __awaiter(this, arguments, void 0, function* (method, path, params = null, data = null, isRetry = false) {
245246
const config = Object.assign(Object.assign({}, this.requestConfig), { method,

0 commit comments

Comments
 (0)