refactor(nodes-base): Apply lint rule cred-class-field-authenticate-type-assertion (#4057)

👕 Apply `cred-class-field-authenticate-type-assertion`
This commit is contained in:
Iván Ovejero 2022-09-09 10:35:50 +02:00 committed by GitHub
parent d4f858db92
commit d0c9120031
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -376,6 +376,7 @@ module.exports = {
files: ['./packages/nodes-base/credentials/*.credentials.ts'], files: ['./packages/nodes-base/credentials/*.credentials.ts'],
plugins: ['eslint-plugin-n8n-nodes-base'], plugins: ['eslint-plugin-n8n-nodes-base'],
rules: { 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-display-name-missing-oauth2': 'error',
'n8n-nodes-base/cred-class-field-name-missing-oauth2': 'error', 'n8n-nodes-base/cred-class-field-name-missing-oauth2': 'error',
'n8n-nodes-base/cred-class-field-name-unsuffixed': 'error', 'n8n-nodes-base/cred-class-field-name-unsuffixed': 'error',

View file

@ -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)', hint: 'You can get your API token at https://[api-root]/token/?format=json (for a logged in user)',
}, },
]; ];
authenticate = { authenticate: IAuthenticateGeneric = {
type: 'generic', type: 'generic',
properties: { properties: {
headers: { headers: {
Authorization: '=Token {{$credentials.token}}', Authorization: '=Token {{$credentials.token}}',
}, },
}, },
} as IAuthenticateGeneric; };
test: ICredentialTestRequest = { test: ICredentialTestRequest = {
request: { request: {

View file

@ -25,7 +25,7 @@ export class UrlScanIoApi implements ICredentialType {
'API-KEY': '={{$credentials.apiKey}}', 'API-KEY': '={{$credentials.apiKey}}',
}, },
}, },
} as IAuthenticateGeneric; };
test: ICredentialTestRequest = { test: ICredentialTestRequest = {
request: { request: {