Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
larrrssss committed Feb 13, 2024
1 parent 8d5fddc commit 00885fd
Show file tree
Hide file tree
Showing 22 changed files with 8,908 additions and 3,174 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.js

This file was deleted.

17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"rules": {
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/prefer-literal-enum-member": "off",
"@typescript-eslint/sort-type-union-intersection-members": "off",
"import/extensions": "off",
"tsdoc/syntax": "off",
"typescript-sort-keys/interface": "off",
"typescript-sort-keys/string-enum": "off",
"unicorn/prefer-math-trunc": "off"
}
}
2 changes: 1 addition & 1 deletion api/ads.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Response } from './responses';
import type { Response } from './responses';

/**
* Start Commercial
Expand Down
2 changes: 1 addition & 1 deletion api/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams } from './responses';
import type { PaginatedResponse, PaginationParams } from './responses';

enum AnalyticsReportType {
OverviewV2 = 'overview_v2',
Expand Down
4 changes: 2 additions & 2 deletions api/bits.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Response } from './responses';
import { Cheermote } from './cheermote';
import type { Response } from './responses';
import type { Cheermote } from './cheermote';

Check failure on line 2 in api/bits.ts

View workflow job for this annotation

GitHub Actions / ESLint and TypeScript compilation

`./cheermote` type import should occur before type import of `./responses`

/**
* Get Bits Leaderboard
Expand Down
2 changes: 1 addition & 1 deletion api/channel-points.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams, Response } from './responses';
import type { PaginatedResponse, PaginationParams, Response } from './responses';

export type CustomRewardImageSet = {

Check failure on line 3 in api/channel-points.ts

View workflow job for this annotation

GitHub Actions / ESLint and TypeScript compilation

Use an `interface` instead of a `type`
/**
Expand Down
4 changes: 2 additions & 2 deletions api/channels.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PaginatedResponse, PaginationParams, Response } from './responses';
import { ContentClassificationLabel } from './label';
import type { PaginatedResponse, PaginationParams, Response } from './responses';
import type { ContentClassificationLabel } from './label';

export type Channel = {
/**
Expand Down
2 changes: 1 addition & 1 deletion api/charity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams, Response } from './responses';
import type { PaginatedResponse, PaginationParams, Response } from './responses';

export type CharityCampaignAmount = {
/**
Expand Down
2 changes: 1 addition & 1 deletion api/cheermote.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Format, Size, Theme } from './images';
import type { Format, Size, Theme } from './images';

export type CheermoteImageFormat = Record<Format, Record<Size, string>>;

Expand Down
2 changes: 1 addition & 1 deletion api/moderation/automod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Response } from '../responses';
import type { Response } from '../responses';

/**
* Check AutoMod Status
Expand Down
4 changes: 2 additions & 2 deletions api/moderation/bans.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams, Response } from '../responses';
import type { PaginatedResponse, PaginationParams, Response } from '../responses';

/**
* Get Banned Users
Expand All @@ -15,7 +15,7 @@ export interface GetBannedUsersParams extends PaginationParams {
*
* The returned list includes only those users that were banned or put in a timeout. The list is returned in the same order that you specified the IDs.
*/
user_id?: string | string[];
user_id?: string[] | string;
/**
* The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20.
*/
Expand Down
6 changes: 3 additions & 3 deletions api/moderation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export interface DeleteChatMessagesParams {
moderator_id: string;
/**
* The ID of the message to remove. The id tag in the [PRIVMSG](https://dev.twitch.tv/docs/irc/tags#privmsg-tags) tag contains the message’s ID. Restrictions:
* * The message must have been created within the last 6 hours.
* * The message must not belong to the broadcaster.
* * The message must not belong to another moderator.
* The message must have been created within the last 6 hours.
* The message must not belong to the broadcaster.
* The message must not belong to another moderator.
*
* If not specified, the request removes all messages in the broadcaster’s chat room.
*/
Expand Down
4 changes: 2 additions & 2 deletions api/moderation/moderator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams } from '../responses';
import type { PaginatedResponse, PaginationParams } from '../responses';

/**
* Get Moderated Channels
Expand Down Expand Up @@ -49,7 +49,7 @@ export interface GetModeratorsParams extends PaginationParams {
*
* The returned list includes only the users from the list who are moderators in the broadcaster’s channel. The list is returned in the same order as you specified the IDs.
*/
user_id?: string | string[];
user_id?: string[] | string;
/**
* The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20.
*/
Expand Down
2 changes: 1 addition & 1 deletion api/moderation/shield.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Response } from '../responses';
import type { Response } from '../responses';

/**
* Update Shield Mode Status
Expand Down
6 changes: 3 additions & 3 deletions api/moderation/term.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { PaginatedResponse, PaginationParams, Response } from '../responses';
import type { PaginatedResponse, PaginationParams, Response } from '../responses';

/**
* Get Blocked Terms
* Extracted from https://dev.twitch.tv/docs/api/reference/#get-blocked-terms
*/

export type BlockedTerm = {
export interface BlockedTerm {
/**
* The broadcaster that owns the list of blocked terms.
*/
Expand Down Expand Up @@ -38,7 +38,7 @@ export type BlockedTerm = {
* This field is **null** if the term was added manually or was permanently blocked by AutoMod.
*/
expires_at: string | null;
};
}

export interface GetBlockedTermsParams extends PaginationParams {
/**
Expand Down
4 changes: 2 additions & 2 deletions api/moderation/vip.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams } from '../responses';
import type { PaginatedResponse, PaginationParams } from '../responses';

/**
* Get VIPs
Expand All @@ -9,7 +9,7 @@ export interface GetVIPsParams extends PaginationParams {
/**
* Filters the list for specific VIPs. To specify more than one user, include the user_id parameter for each user to get. For example, `&user_id=1234&user_id=5678`. The maximum number of IDs that you may specify is 100. Ignores the ID of those users in the list that aren’t VIPs.
*/
user_id?: string | string[];
user_id?: string[] | string;
/**
* The ID of the broadcaster whose list of VIPs you want to get. This ID must match the user ID in the access token.
*/
Expand Down
2 changes: 1 addition & 1 deletion api/users.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginatedResponse, PaginationParams, Response } from './responses';
import type { PaginatedResponse, PaginationParams, Response } from './responses';

/**
* The type of user.
Expand Down
2 changes: 1 addition & 1 deletion authentication/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Scope } from './scopes';
import type { Scope } from './scopes';

export enum OAuthResponseType {
Token = 'token',
Expand Down
Loading

0 comments on commit 00885fd

Please sign in to comment.