@schwarzhirsch/styleguide

1.0.15 • Public • Published

Schwarzhirsch Style Guide

This Style Guide contains best practices and basic frontend rules to
apply when working on an Schwarzhirsch projects.

npm version

Summary

Rules are created to ensure cohesion in the code produced, to ease maintainability and give a common and known structure to work on.

We aim at producing something that will be able to grow and scale, while keeping it human readable and understandable for a newcomer. A balance between speed, ease and simplicity.

Editor Code Style

EditorConfig is used to define indentation style and size, EOL, final new line, charset across a single project. This helps developers define and maintain consistent coding styles between different editors and IDEs.

# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org
 
root = true
 
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

JavaScript Code Style

One JavaScript Style to Rule Them All

ESLint

ESLint shareable config by Schwarzhirsch built on the Airbnb JavaScript Style Guide

Installation

$ npm install --save-dev @schwarzhirsch/eslint-config

Usage

Once the @schwarzhirsch/eslint-config package is installed, you can use it by specifying @schwarzhirsch/eslint-config in the extends section of your ESLint configuration.

{
  "extends": "@schwarzhirsch/eslint-config",
  "rules": {
    // Additional, per-project rules...
  }
}

Version Control

The Art of the commit

  • Be useful
  • Be detailed
  • Be consistent
  • Use the active voice

Feature Branch

  • feature development encapsulated
  • leverage pull requests

Git Flow

  • master
  • develop
  • feature
  • release
  • hotfix

Conventions

The following links attempts to explain the basic styles and patterns used in the Schwarzhirsch projects.

License

The MIT License

Copyright 2018 Schwarzhirsch Kreativagentur GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

back to top

Package Sidebar

Install

npm i @schwarzhirsch/styleguide

Weekly Downloads

1

Version

1.0.15

License

MIT

Unpacked Size

6.29 kB

Total Files

4

Last publish

Collaborators

  • steinke