diff --git a/.cursor/rules/no-macros.mdc b/.cursor/rules/no-macros.mdc new file mode 100644 index 0000000000000..d7d4a28a8eb3e --- /dev/null +++ b/.cursor/rules/no-macros.mdc @@ -0,0 +1,6 @@ +--- +glob: **/*.rs +alwaysApply: false +--- + +Do not use macro_rules when you write Rust code. diff --git a/.cursor/rules/use-cargo-build.mdc b/.cursor/rules/use-cargo-build.mdc new file mode 100644 index 0000000000000..e51e002125d15 --- /dev/null +++ b/.cursor/rules/use-cargo-build.mdc @@ -0,0 +1,5 @@ +--- +alwaysApply: true +--- + +When working on our Rust code, if you need to do a build, use `cargo build`, without the `--release` flag. We want to do this because debug builds give a faster feedback loop. diff --git a/.cursor/rules/use-contributing.mdc b/.cursor/rules/use-contributing.mdc new file mode 100644 index 0000000000000..a4e8986b22860 --- /dev/null +++ b/.cursor/rules/use-contributing.mdc @@ -0,0 +1,7 @@ +--- +alwaysApply: true +--- + +Make sure to read our CONTRIBUTING.md and stick with contributor guidance. + +@CONTRIBUTING.md diff --git a/.cursor/rules/use-pnpm.mdc b/.cursor/rules/use-pnpm.mdc new file mode 100644 index 0000000000000..eb48cc0a3f174 --- /dev/null +++ b/.cursor/rules/use-pnpm.mdc @@ -0,0 +1,5 @@ +--- +alwaysApply: true +--- + +Whenever you need to use a JavaScript package manager, use pnpm. diff --git a/.cursor/rules/use-semantic-commits.mdc b/.cursor/rules/use-semantic-commits.mdc new file mode 100644 index 0000000000000..f7f7a7e9acc76 --- /dev/null +++ b/.cursor/rules/use-semantic-commits.mdc @@ -0,0 +1,5 @@ +--- +alwaysApply: false +--- + +When creating pull requests, use semantic commits for the title. You can find acceptable patterns in @.github/workflows/lint-pr-title.yaml. diff --git a/.cursor/rules/use-valuable-comments.mdc b/.cursor/rules/use-valuable-comments.mdc new file mode 100644 index 0000000000000..6a55e8c789c5f --- /dev/null +++ b/.cursor/rules/use-valuable-comments.mdc @@ -0,0 +1,8 @@ +--- +alwaysApply: true +--- + +Only add comments to code when they are truly valuable. + +- If you are considering adding a comment restates what the code does without any further explanation, do not add the comment. +- Comments should add contextual information that can't be easily recognized by reading the code.