Skip to content

Naming rules

Son Chan Uk edited this page Aug 10, 2017 · 3 revisions

Component and Repository naming

  • the name of component uses lowercase with egjs- prefix.
  • if component names require semantic separation, use -.
  • the repository name should be the same as the component.
egjs-axes
egjs-flicking
egjs-infinitegrid
egjs-jquery-transform

NPM package naming

  • Use the "@egjs" scoped package.
  • the name of npm package uses lowercase with @egjs/ prefix.
  • if component names require semantic separation, use -.
@egjs/axes
@egjs/flicking
@egjs/infinitegrid
@egjs/jquery-transform

Coding convention

Follow the Naver Javascript Coding Conventions
The Coding convention is modified version based on Airbnb JavaScript Style Guide.

  • Use PascalCase only when naming constructors or classes [link]

    • Use eg namespace in ES5
      eg.Flicking, eg.Axes, eg.InfiniteGrid, eg.JqueryTransform
      
  • Use camelCase when namespace, naming objects, functions, and instances [link]