From 0192f539327d9038aaafd88db934719f32b5ac37 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Thu, 21 May 2020 21:51:35 +0300 Subject: [PATCH] Fix linting errors --- .eslintrc.js | 2 ++ packages/app/components/auth/finish/Finish.tsx | 1 - packages/app/components/dev/apps/index.ts | 4 ++-- packages/app/services/api/authentication.test.ts | 1 - packages/app/services/api/authentication.ts | 1 - packages/app/services/api/oauth.ts | 1 - packages/app/services/authFlow/OAuthState.test.ts | 1 - tests-e2e/cypress/integration/auth/oauth.test.ts | 1 - 8 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a8e623e..ca9d164 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -158,6 +158,8 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-use-before-define': 'off', '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-inferrable-types': 'off', '@typescript-eslint/no-unused-vars': [ diff --git a/packages/app/components/auth/finish/Finish.tsx b/packages/app/components/auth/finish/Finish.tsx index 5e8b844..8f68766 100644 --- a/packages/app/components/auth/finish/Finish.tsx +++ b/packages/app/components/auth/finish/Finish.tsx @@ -21,7 +21,6 @@ class Finish extends React.Component { render() { const { appName, code, state, displayCode, success } = this.props; const authData = JSON.stringify({ - // eslint-disable-next-line @typescript-eslint/camelcase auth_code: code, state, }); diff --git a/packages/app/components/dev/apps/index.ts b/packages/app/components/dev/apps/index.ts index d4554bd..15855b9 100644 --- a/packages/app/components/dev/apps/index.ts +++ b/packages/app/components/dev/apps/index.ts @@ -1,3 +1,3 @@ export type ApplicationType = 'application' | 'minecraft-server'; -export const TYPE_APPLICATION: 'application' = 'application'; -export const TYPE_MINECRAFT_SERVER: 'minecraft-server' = 'minecraft-server'; +export const TYPE_APPLICATION = 'application' as const; +export const TYPE_MINECRAFT_SERVER = 'minecraft-server' as const; diff --git a/packages/app/services/api/authentication.test.ts b/packages/app/services/api/authentication.test.ts index 2ea6baa..7101921 100644 --- a/packages/app/services/api/authentication.test.ts +++ b/packages/app/services/api/authentication.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/camelcase */ import expect from 'app/test/unexpected'; import sinon, { SinonFakeServer } from 'sinon'; diff --git a/packages/app/services/api/authentication.ts b/packages/app/services/api/authentication.ts index 98ef509..be371a3 100644 --- a/packages/app/services/api/authentication.ts +++ b/packages/app/services/api/authentication.ts @@ -169,7 +169,6 @@ export async function requestToken(refreshToken: string): Promise { const response: OAuthResponse = await request.post( '/api/authentication/refresh-token', { - // eslint-disable-next-line @typescript-eslint/camelcase refresh_token: refreshToken, }, { diff --git a/packages/app/services/api/oauth.ts b/packages/app/services/api/oauth.ts index b0d00f2..853ce47 100644 --- a/packages/app/services/api/oauth.ts +++ b/packages/app/services/api/oauth.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/camelcase */ import { ApplicationType } from 'app/components/dev/apps'; import request from 'app/services/request'; diff --git a/packages/app/services/authFlow/OAuthState.test.ts b/packages/app/services/authFlow/OAuthState.test.ts index 30d6e47..ea8b1b2 100644 --- a/packages/app/services/authFlow/OAuthState.test.ts +++ b/packages/app/services/authFlow/OAuthState.test.ts @@ -1,4 +1,3 @@ -/* eslint @typescript-eslint/camelcase: off */ import sinon, { SinonMock } from 'sinon'; import OAuthState from 'app/services/authFlow/OAuthState'; diff --git a/tests-e2e/cypress/integration/auth/oauth.test.ts b/tests-e2e/cypress/integration/auth/oauth.test.ts index 98a3c86..accbadf 100644 --- a/tests-e2e/cypress/integration/auth/oauth.test.ts +++ b/tests-e2e/cypress/integration/auth/oauth.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/camelcase */ import { account1 } from '../../fixtures/accounts.json'; const defaults = {