eslint-plugin-sonarjs
Version:
SonarJS rules for ESLint
32 lines (31 loc) • 1.05 kB
TypeScript
import { Node } from 'estree';
import type { Rule } from 'eslint';
import { Result } from '../result.js';
import { StringLiteral } from '../ast.js';
export interface PolicyCheckerOptions {
effect: {
property: string;
type: 'FullyQualifiedName' | 'string';
allowValue: string;
};
actions: {
property: string;
anyValues?: string[];
};
resources: {
property: string;
};
conditions: {
property: string;
};
principals: {
property: string;
type: 'FullyQualifiedName' | 'json';
anyValues?: string[];
};
}
type StatementChecker = (expr: Node, ctx: Rule.RuleContext, options: PolicyCheckerOptions) => void;
export declare function AwsIamPolicyTemplate(statementChecker: StatementChecker, meta: Rule.RuleMetaData): Rule.RuleModule;
export declare function getSensitiveEffect(properties: Result, ctx: Rule.RuleContext, options: PolicyCheckerOptions): Result;
export declare function isAnyLiteral(literal: StringLiteral): boolean;
export {};