bansavage / wmw-coding-guidelines

Coding guidelines for JS, Vue, HTML, CSS, and Liquid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We Make Websites

📏 Coding Guidelines

Standards, guidelines, and best practice when working on our Canvas framework.

Updates to Basis and projects using Basis Adapter must also follow these guidelines.

For Frame projects follow these guidelines.

Table of contents

Why do we need guidelines?

When working on large, long-running projects, with dozens of developers of differing specialities and abilities, it is important that we all work in a unified way in order to:

  • Keep the code base maintainable
  • Keep code transparent, sane, and readable
  • Keep the code base scalable
  • Maintain the code base's performance

Applying the guidelines

When you are writing new code you are expected to maintain the guidelines, if you update an existing feature you are expected to update any non-adhering code that you interact with or change. This means you are not expected to fix the whole file when adding new functionality, just the code you write or change.

Assuming you've followed setup then your JS, SCSS, and Vue files will be formatted when you save by eslint --fix and stylelint --fix. Other eslint and stylelint errors will be flagged when committing your changes. You will have to manually apply the guidelines to HTML and Liquid as there is no linter available.

Can I contribute to the guidelines?

Please branch from master and submit a pull request for any suggested changes.

About

Coding guidelines for JS, Vue, HTML, CSS, and Liquid