2.0.1 â€ĸ Published 4 months ago

eslint-cdk-plugin v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

📔 Documentation

Please refer to the website.

đŸ“Ļ Installation

# npm
npm install -D eslint-cdk-plugin

# yarn
yarn add -D eslint-cdk-plugin

# pnpm
pnpm install -D eslint-cdk-plugin

🚀 Usage

Note: This plugin uses typescript type information and must be used in conjunction with typescript-eslint.

When using recommended config

// eslint.config.mjs
import cdkPlugin from "eslint-cdk-plugin";
import tsEslint from "typescript-eslint";

export default [
  ...tsEslint.configs.recommended,
  // ✅ Add plugins
  cdkPlugin.configs.recommended,
  {
    files: ["lib/**/*.ts", "bin/*.ts"],
    // ... some configs
  },
];

When using custom config

// eslint.config.mjs
import tsEslint from "typescript-eslint";
import cdkPlugin from "eslint-cdk-plugin";

export default [
  ...tsEslint.configs.recommended,
  {
    files: ["lib/**/*.ts", "bin/*.ts"],
    languageOptions: {
      parserOptions: {
        projectService: true,
        project: "./tsconfig.json",
      },
    },
    // ✅ Add plugins
    plugins: {
      cdk: cdkPlugin,
    },
    // ✅ Add rules (use custom rules)
    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.

⚓ Versioning Policy

Please see Versioning Policy.

ÂŠī¸ License

MIT

2.0.1

4 months ago

2.0.0

4 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.4.0

8 months ago

0.3.2

8 months ago

0.1.0

8 months ago