packages/@n8n/eslint-plugin-community-nodes/docs/rules/credential-password-field.md
@n8n/community-nodes/credential-password-field)š¼ This rule is enabled in the following configs: ā
recommended, āļø recommendedWithoutN8nCloudSupport.
š§ This rule is automatically fixable by the --fix CLI option.
Ensures that credential fields with names like "password", "secret", "token", or "key" are properly masked in the UI by having typeOptions.password = true.
export class MyApiCredential implements ICredentialType {
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
default: '',
// Missing typeOptions.password
},
];
}
export class MyApiCredential implements ICredentialType {
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
default: '',
},
];
}