2.0.1 âĸ Published 4 months ago
eslint-cdk-plugin v2.0.1
đ 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.