Thank you for your interest in contributing to eslint-cdk-plugin!
This document provides guidelines and steps for contributing.
By participating in this project, you are expected to uphold our Code of Conduct.
Please report unacceptable behavior to @ren-yamanashi
.
Before creating issue, please check the existing issues to avoid duplicates.
When you create a bug issue, include as following content:
- A clear and descriptive title
- Steps to reproduce the behavior
- Expected behavior
- Actual behavior
- Code samples if applicable
- Version information (Node.js, ESLint)
We welcome suggestions for new rules! When proposing a new rule:
- First, check existing rules and issues to avoid duplicates
- Create an issue with the following information:
- Rule name
- Description of the problem the rule solves
- Examples of code that should pass/fail
- References to AWS CDK best practices if applicable
- Fork the repo and create your branch from
main
- Implement the rules
- Implement the test for the rule and make sure it passes. (Tests are run in CI)
- Update the documentation
- Create a pull request
# Clone your fork
https://github.com/ren-yamanashi/eslint-cdk-plugin.git
# Install dependencies
pnpm install
# Run tests
pnpm test
# Run linter
pnpm lint
- Create a new file in
src
(file name should same rule name) - Create corresponding test file in
src/__tests__
- Add rule to
src/index.ts
- Add documentation in
docs
Note: Writing the document is optional (because it is written using Vitepress and is not yet ready to accept contributions)
Example rule structure:
import { ESLintUtils } from "@typescript-eslint/utils";
export const newRule = ESLintUtils.RuleCreator.withoutDocs({
meta: {
type: "problem",
docs: {
description: "Rule description",
},
messages: {
ruleError: "Error message with {{ placeholder }}",
},
schema: [],
},
defaultOptions: [],
create(context) {
// Rule implementation
},
});
- Changes are merged to
main
- Maintainers will review and merge
- Publish to npm according to Milestone
Feel free to create an issue for any questions about contributing!
By contributing, you agree that your contributions will be licensed under the project's MIT License.