Skip to content

Commit

Permalink
refactor: Integrate consistent-type-imports in nodes-base (no-chang…
Browse files Browse the repository at this point in the history
…elog) (#5267)

* 👕 Enable `consistent-type-imports` for nodes-base

* 👕 Apply to nodes-base

* ⏪ Undo unrelated changes

* 🚚 Move to `.eslintrc.js` in nodes-base

* ⏪ Revert "Enable `consistent-type-imports` for nodes-base"

This reverts commit 529ad72.

* 👕 Fix severity
  • Loading branch information
ivov authored Jan 27, 2023
1 parent 845f0f9 commit b03e358
Show file tree
Hide file tree
Showing 1,840 changed files with 3,853 additions and 3,540 deletions.
2 changes: 2 additions & 0 deletions packages/nodes-base/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports = {
...sharedOptions(__dirname),

rules: {
'@typescript-eslint/consistent-type-imports': 'error',

// TODO: remove all the following rules
eqeqeq: 'off',
'id-denylist': 'off',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AcuitySchedulingApi implements ICredentialType {
name = 'acuitySchedulingApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AcuitySchedulingOAuth2Api implements ICredentialType {
name = 'acuitySchedulingOAuth2Api';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/AdaloApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';

export class AdaloApi implements ICredentialType {
name = 'adaloApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/AffinityApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AffinityApi implements ICredentialType {
name = 'affinityApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/AgileCrmApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AgileCrmApi implements ICredentialType {
name = 'agileCrmApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/AirtableApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';

export class AirtableApi implements ICredentialType {
name = 'airtableApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/Amqp.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class Amqp implements ICredentialType {
name = 'amqp';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/AsanaApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';

export class AsanaApi implements ICredentialType {
name = 'asanaApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AsanaOAuth2Api implements ICredentialType {
name = 'asanaOAuth2Api';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/AutomizyApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AutomizyApi implements ICredentialType {
name = 'automizyApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class AutopilotApi implements ICredentialType {
name = 'autopilotApi';
Expand Down
5 changes: 3 additions & 2 deletions packages/nodes-base/credentials/Aws.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Request, sign } from 'aws4';
import type { Request } from 'aws4';
import { sign } from 'aws4';

import {
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/BambooHrApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BambooHrApi implements ICredentialType {
name = 'bambooHrApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BannerbearApi implements ICredentialType {
name = 'bannerbearApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/BaserowApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

// https://api.baserow.io/api/redoc/#section/Authentication

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BitbucketApi implements ICredentialType {
name = 'bitbucketApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/BitlyApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BitlyApi implements ICredentialType {
name = 'bitlyApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BitlyOAuth2Api implements ICredentialType {
name = 'bitlyOAuth2Api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

// https://bitwarden.com/help/article/public-api/#authentication

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BoxOAuth2Api implements ICredentialType {
name = 'boxOAuth2Api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BrandfetchApi implements ICredentialType {
name = 'brandfetchApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/BubbleApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class BubbleApi implements ICredentialType {
name = 'bubbleApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CalApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CalendlyApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class ChargebeeApi implements ICredentialType {
name = 'chargebeeApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CircleCiApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class CircleCiApi implements ICredentialType {
name = 'circleCiApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class CiscoWebexOAuth2Api implements ICredentialType {
name = 'ciscoWebexOAuth2Api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/ClearbitApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class ClearbitApi implements ICredentialType {
name = 'clearbitApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/ClickUpApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class ClickUpOAuth2Api implements ICredentialType {
name = 'clickUpOAuth2Api';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/ClockifyApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CockpitApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class CockpitApi implements ICredentialType {
name = 'cockpitApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CodaApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class CodaApi implements ICredentialType {
name = 'codaApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

//https://www.contentful.com/developers/docs/references/authentication/
export class ContentfulApi implements ICredentialType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class ConvertKitApi implements ICredentialType {
name = 'convertKitApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CopperApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class CopperApi implements ICredentialType {
name = 'copperApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CortexApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/CrateDb.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class CrateDb implements ICredentialType {
name = 'crateDb';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ICredentialDataDecryptedObject,
ICredentialType,
IHttpRequestOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/DeepLApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/DemioApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class DemioApi implements ICredentialType {
name = 'demioApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/DhlApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class DhlApi implements ICredentialType {
name = 'dhlApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/DisqusApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class DisqusApi implements ICredentialType {
name = 'disqusApi';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/DriftApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class DriftApi implements ICredentialType {
name = 'driftApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class DriftOAuth2Api implements ICredentialType {
name = 'driftOAuth2Api';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/DropboxApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

const scopes = ['files.content.write', 'files.content.read', 'sharing.read', 'account_info.read'];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/ERPNextApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/EgoiApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class EgoiApi implements ICredentialType {
name = 'egoiApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class ElasticSecurityApi implements ICredentialType {
name = 'elasticSecurityApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/EmeliaApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class EmeliaApi implements ICredentialType {
name = 'emeliaApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class EventbriteApi implements ICredentialType {
name = 'eventbriteApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class EventbriteOAuth2Api implements ICredentialType {
name = 'eventbriteOAuth2Api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ICredentialType, INodeProperties } from 'n8n-workflow';
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

export class FacebookGraphAppApi implements ICredentialType {
name = 'facebookGraphAppApi';
Expand Down
Loading

0 comments on commit b03e358

Please sign in to comment.