-
Notifications
You must be signed in to change notification settings - Fork 269
Code Style
Eugenio Romano edited this page Oct 12, 2017
·
16 revisions
The code style is defined in the tslint.json and .editorconfig files.
- Do name events without the prefix on.
- Do name event handler methods with the prefix on followed by the event name
- Do name events in camelcase.
- All event names should be verbs and use the present tense. For example, cancel instead of canceled
- leave one whitespace character inside of the import statements' curly braces ("ES6 import/export braces" rule for IntelliJ IDEA)
- leave one whitespace character after type reference colon ':' ("After type reference colon ':'" rule for IntelliJ IDEA)
- All the Directive has to end with the suffix .directive
- All the Component has to end with the suffix .component
- All the Service has to end with the suffix .service
- ALFRESCO|ACTIVITI|ADF prefix for file names are not allowed
- All the Directive class name has to end with the suffix Directive
- All the Component class name has to end with the suffix Component
- All the Service class name has to end with the suffix Service
- ALFRESCO|ACTIVITI|ADF prefixes are not allowed
- CSS files are deprecated in the project use only scss
- All the style class has to start with ADF- prefix
May you want to use our yeoman generator to create a new component generator-ng2-alfresco-component
- Class selector in all the test is not suggested. Element ID is preferred