Skip to content
This repository has been archived by the owner on Jun 17, 2019. It is now read-only.

custom eslint rules to enforce conventions #20

Open
FrancescoCioria opened this issue Jan 25, 2016 · 0 comments
Open

custom eslint rules to enforce conventions #20

FrancescoCioria opened this issue Jan 25, 2016 · 0 comments

Comments

@FrancescoCioria
Copy link
Contributor

original issue: https://github.omnilab.our.buildo.io/buildo/labonline/issues/1305

requirements

eslint can be very effective to enforce some conventions. We're already using it to verify if a component's name is the same of its filename.
New rules to help us enforce some conventions::

  • a Component can import only one sass file and only if it has the same name (but in camelCase)
    • ex: MyBeautifulComponent can have import './myBeautifulComponent.scss'
  • the imported sass must be in the same folder (./*.scss)
  • if a component has a main class, this should be the component's name in kebab-case
    • ex: MyBeautifulComponent can have <div className='my-beautiful-component' ...
@gabro gabro removed their assignment Mar 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants