Skip to content
Dmytro Vakuliuk edited this page Jul 19, 2022 · 4 revisions

File naming

All files must be named in kebab-case

Examples:

some-component.js
very-long-style-name.less
use-custom-hook.js

General rules

  • Don't create an external directory for 1-2 file
  • Don't create an external file for each function that you have. You may leave it below the component, or combine a bunch of functions in one file.

Component structure

Desription: directory | file.js

  • components
    • bl-<component-name>-component
      • src
        • index.js
        • subcomponents (it could be file or directory, depends on counts of file.
        • helpers
          • here must be all files which you use to decompose your logic. Some utils/constants/hooks/etc.
        • lib (all files inside must be compressed)
          • <library-name>.js
          • <library-name>
            • lib-file-1.js
            • lib-file-2.js
      • styles
        • index.less
        • another-styles.less
      • .gitignore
      • README.md
      • component.json
      • thumbnail.png

Clone this wiki locally