kibana/STYLEGUIDE.md

28 lines
937 B
Markdown
Raw Normal View History

# Kibana Style Guide
This guide applies to all development within the Kibana project and is
recommended for the development of all Kibana plugins.
2016-06-10 04:03:19 +02:00
- [JavaScript](style_guides/js_style_guide.md)
- [Angular](style_guides/angular_style_guide.md)
- [React](style_guides/react_style_guide.md)
2016-06-10 04:03:19 +02:00
- [CSS](style_guides/css_style_guide.md)
[UI Framework] Reorganize UI Framework and add Yeoman generator (#13172) (#13477) * Reorganize documentation styles so they all live in doc_site/components directory. (#12809) - Remove global styles, e.g. body and html element selectors. * Create global_styles dir with sub-directories. (#12833) * Add SCSS style guide. (#12850) * Refactor UI Framework directory structure to house everything in a src directory. (#12880) - Add components/index.js and services/index.js files to continue to export JS modules from the root. * Add KUI Yeoman generator. * Support creation of components. * Add documentation generator for main page, demo, and sandbox. - Add additional documentation snippets to KUI generator. (#13076) - Fix incorrect use of double quotes in KUI generator snippet. (#13086) - Remove infrequently used imports from the KUI generator test template. (#13110) * Mock assets files for Jest. (#13060) * Fix broken coverage report paths in Jest config. (#13082) * Update eslint config to lint the new UI Framework directory structure. (#13102) * Fix positioning of doc site pagination buttons. (#13203) * Support hasReact prop for sandboxes. (#13270) * Remove deprecated used of component mixin from KUI generator's SCSS template. (#13377) * Fix rebasing errors. - Add dashboard back to Jest config. - Add missing form and tool_bar variables. * Rename tasks to createComponent and documentComponent. * Reference correct src paths in README. * Add children and className to templates' propTypes. * Add default folder name for page demo. * Add suffix to sandbox routes. * Specify testPathIgnorePatterns more clearly. * Rename component.test.js to test.js so that Jenkins won't try to run it. * Update npm scripts to depend on local yo dependency, not global. * Add ui_framework/src to copy task. * Simplify npm scripts and remove requirement for installing Yeoman from README. * Add services to moduleNameMapper in jest config. * Clean up Button and Gallery examples.
2017-08-11 18:58:33 +02:00
- [SCSS](style_guides/scss_style_guide.md)
2016-06-10 04:03:19 +02:00
- [HTML](style_guides/html_style_guide.md)
- [API](style_guides/api_style_guide.md)
2017-04-19 15:19:26 +02:00
- [Architecture](style_guides/architecture_style_guide.md)
- [Accessibility](style_guides/accessibility_guide.md)
## Filenames
2014-09-16 01:06:26 +02:00
All filenames should use `snake_case`.
2014-09-16 01:06:26 +02:00
*Right:*
- `src/kibana/index_patterns/index_pattern.js`
2014-09-16 01:06:26 +02:00
*Wrong:*
- `src/kibana/IndexPatterns/IndexPattern.js`
## TypeScript vs JavaScript
Whenever possible, write code in TypeScript instead of javascript, especially if it's new code. Check out [TYPESCRIPT.md](TYPESCRIPT.md) for help with this process.