This repository provides a custom CursorRules file tailored for Drupal 11 projects. The rules defined in the .cursorrules
file ensure that AI-generated code adheres to Drupal 11’s coding standards, best practices, and modern architecture, leveraging PHP 8.x, Symfony 6, and Drupal’s APIs.
The goal of this project is to enable a consistent, secure, and efficient development experience by guiding AI tools (such as the Cursor AI editor or VS Code extensions) with Drupal-specific instructions. This helps ensure that all code suggestions are:
- Fully compatible with Drupal 11.
- Aligned with Drupal’s coding and performance standards.
- Designed using best practices in module, theme, and API development.
.cursorrules
: Contains detailed instructions for AI behavior, including guidelines for code structure, naming conventions, Drupal API usage, theming, and security.README.md
: Provides an overview of the project, installation instructions, and contribution guidelines.
-
Copy the Rule File:
Place the.cursorrules
file in the root of your Drupal 11 project (i.e., in the same directory as yourcomposer.json
). -
Enable in Your Editor:
- If you’re using the Cursor AI editor, make sure that project rules are enabled (usually via a settings toggle).
- For VS Code users, install the Cursor VS Code extension and use its command palette to ensure the
.cursorrules
file is recognized.
-
Commit the Changes:
Once added, commit the file to your repository so that the rules are shared with your entire development team.
Contributions and improvements are welcome. If you have suggestions or enhancements, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.