New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-cdk

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-cdk

ESLint rules for aws cdk

  • 0.8.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
decreased by-2.87%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-cdk

:warning: This is experimental and subject to breaking changes.

Install

yarn add -D eslint-plugin-cdk

Usage

Add cdk to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["cdk"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "cdk/ban-lambda-runtimes": [
      "error", 
      { 
        "bannedRuntimes": [
          "NODEJS",
          "NODEJS_4_3",
          "NODEJS_6_10",
          "NODEJS_8_10",
          "NODEJS_10_X",
          "DOTNET_CORE_1",
          "DOTNET_CORE_2",
        ]
      }
    ],
    "cdk/construct-ctor": "error",
    "cdk/construct-props-struct-name": "error",
    "cdk/filename-match-regex": "error",
    "cdk/public-static-property-all-caps": "error",
    "cdk/no-static-import": "error",
    "cdk/stack-props-struct-name": "error",
    "cdk/prefer-type-only-imports": [
      "error",
      {
        "moduleNames": ["aws-lambda"],
      }
    ],
    "cdk/ban-reserved-words": [
      "error", 
      {
        "wordList": [...PYTHON_RESERVED],
        "jsiiOnly": true,
      }
    ],
  }
}

Rules

RuleDescription
ban-lambda-runtimes
ban-reserved-words
construct-ctor
construct-props-struct-name
filename-match-regex
no-static-imports
prefer-type-only-imports
public-static-property-all-caps
stack-props-struct-name

Example

See a more complete real world example

License

MIT

FAQs

Package last updated on 13 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc