diff -u b/CONTRIBUTING.md b/CONTRIBUTING.md --- b/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,15 @@ # Contributing to Datetime Extras -This module aims to be a set of widgets, formatters, and other tools to extend the core Datetime and Datetime Range -modules. It serves as both a staging ground to get new features into core, and also as a place to centrally house -features that that should live in contrib. - -While existing as a contrib module, features to SHOULD follow Drupal best practices, such as -[coding standards](https://www.drupal.org/docs/develop/standards) and -[test coverage](https://www.drupal.org/docs/8/testing). For code destined to core, features MUST follow these -practices. +This module aims to be a set of widgets, formatters, and other tools to extend +the core Datetime and Datetime Range modules. It serves as both a staging ground +to get new features into core, and also as a place to centrally collect and +maintain features that should live in contrib. + +While existing as a contrib module, this code SHOULD follow Drupal best +practices, such as: +- [coding standards](https://www.drupal.org/docs/develop/standards) +- [test coverage](https://www.drupal.org/docs/8/testing) +For code to be included in core, features MUST follow these practices. ## Naming Conventions @@ -15,14 +17,16 @@ ```{field-type}_{feature-name}``` -Every field-related plugin in here will operate on a specific field type. Generally either ```datetime``` or -```daterange```. That MUST be the first part of the plugin ID. - -Since the plugins already know what kind of thing they are (widget, formatter, etc) via namespace and otherwise, we -don't want that also in the ID. - -The ```_{feature-name}``` part tells you what feature is provided by that plugin and guarantees uniqueness. If the -feature wants multiple words, separate with more underscores. +Every field-related plugin in here will operate on a specific field +type. Generally either ```datetime``` or ```daterange```. That MUST be the first +part of the plugin ID. + +Since the plugins already know what kind of thing they are (widget, formatter, +etc) via namespace and otherwise, we don't want that also in the ID. + +The ```_{feature-name}``` part tells you what feature is provided by that plugin +and guarantees uniqueness. If the feature wants multiple words, separate with +more underscores. For example: @@ -40,11 +44,13 @@ MUST start with ```datetime_extras.``` (including the period). -Otherwise, attempt to match the ```_{feature-name}``` part of the ID from any related plugins. +Otherwise, attempt to match the ```_{feature-name}``` part of the ID from any +related plugins. ### Class names -Plugin classes MUST follow the agreed upon plugin ID format, plus existing core conventions. +Plugin classes MUST follow the agreed upon plugin ID format, plus existing core +conventions. Examples: