sonarjs/aws-apigateway-public-api
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/aws-apigateway-public-api": "error",
},
},
];The documentation shows no incorrect example for this rule.
import {aws_apigateway as apigateway} from "aws-cdk-lib"
const resource = api.root.addResource("example",{
defaultMethodOptions:{
authorizationType: apigateway.AuthorizationType.IAM
}
})
resource.addMethod(
"POST",
new apigateway.HttpIntegration("https://example.org"),
{
authorizationType: apigateway.AuthorizationType.IAM
}
)
resource.addMethod( // authorizationType is inherited from the Resource's configured defaultMethodOptions
"GET"
)import {aws_apigatewayv2 as apigateway} from "aws-cdk-lib"
new apigateway.CfnRoute(this, "auth", {
apiId: api.ref,
routeKey: "POST /auth",
authorizationType: "AWS_IAM",
target: exampleIntegration
})Examples from the ESLint documentation.
sonarjs/aws-apigateway-public-api
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/aws-apigateway-public-api": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Nested properties of Lodash and Underscore.js clone results should not be mutated
Public network access to cloud resources should be disabled
Async test assertions should be awaited or returned