Skip to content

ren-yamanashi/eslint-cdk-plugin

Repository files navigation

ESLint plugin for AWS CDK logo

eslint-cdk-plugin

ESLint plugin for AWS CDK

NPM

📔 Documentation

See here

📦 Installation

# npm
npm install -D eslint-cdk-plugin

# yarn
yarn add -D eslint-cdk-plugin

# pnpm
pnpm install -D eslint-cdk-plugin

🚀 Usage

Use recommended config

// eslint.config.mjs
import eslintCdkPlugin from "eslint-cdk-plugin";
export default [
  {
    plugins: {
      cdk: eslintCdkPlugin,
    },
    rules: {
      ...eslintCdkPlugin.configs.recommended.rules,
    },
  },
];

Use custom config

// eslint.config.mjs
import eslintCdkPlugin from "eslint-cdk-plugin";
export default [
  {
    plugins: {
      cdk: eslintCdkPlugin,
    },
    rules: {
      "cdk/no-class-in-interface": "error",
      "cdk/no-construct-stack-suffix": "error",
      "cdk/no-parent-name-construct-id-match": "error",
    },
  },
];

❗ Issue

If you have any questions or suggestions, please open an issue.

💪 Contribution

Contributions are welcome! Please see Contribution Guide for more details.

©️ License

MIT