Skip to content

Commit

Permalink
refactor(nodes-base): Apply lint rule `cred-class-field-authenticate-…
Browse files Browse the repository at this point in the history
…type-assertion` (#4057)

👕 Apply `cred-class-field-authenticate-type-assertion`
  • Loading branch information
ivov committed Sep 9, 2022
1 parent d4f858d commit d0c9120
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ module.exports = {
files: ['./packages/nodes-base/credentials/*.credentials.ts'],
plugins: ['eslint-plugin-n8n-nodes-base'],
rules: {
'n8n-nodes-base/cred-class-field-authenticate-type-assertion': 'error',
'n8n-nodes-base/cred-class-field-display-name-missing-oauth2': 'error',
'n8n-nodes-base/cred-class-field-name-missing-oauth2': 'error',
'n8n-nodes-base/cred-class-field-name-unsuffixed': 'error',
Expand Down
4 changes: 2 additions & 2 deletions packages/nodes-base/credentials/KoBoToolboxApi.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export class KoBoToolboxApi implements ICredentialType {
hint: 'You can get your API token at https://[api-root]/token/?format=json (for a logged in user)',
},
];
authenticate = {
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Token {{$credentials.token}}',
},
},
} as IAuthenticateGeneric;
};

test: ICredentialTestRequest = {
request: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class UrlScanIoApi implements ICredentialType {
'API-KEY': '={{$credentials.apiKey}}',
},
},
} as IAuthenticateGeneric;
};

test: ICredentialTestRequest = {
request: {
Expand Down

0 comments on commit d0c9120

Please sign in to comment.