npm package: @schwarzhirsch/styleguide
Description: This Style Guide contains best practices and basic frontend rules to apply when working on an Schwarzhirsch projects.
Author: Schwarzhirsch Kreativagentur GmbH
Latest version: 1.0.15


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

[![npm version][npm-version]][sh-styleguide]

## 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][editor-config] 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**<br>

### ESLint
ESLint [shareable config][eslint-config] by [Schwarzhirsch][sh-eslint-config] built on the [Airbnb JavaScript Style Guide][airbnb]

#### 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`][eslint-extends] section of your [ESLint configuration][eslint-config-doc].

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

## Version Control
**[The Art of the commit][version-commit]**
- Be useful
- Be detailed
- Be consistent
- Use the active voice

**[Feature Branch][version-branch]**
- feature development encapsulated
- leverage pull requests

**[Git Flow][version-flow]**
- master
- develop
- feature
- release
- hotfix

## Conventions
The following links attempts to explain the basic styles and patterns used in the Schwarzhirsch projects.
- [HTML Code Guide][conv-html]
- [CSS BEM (Block - Element - Modifier)][conv-css]
- [JavaScript Code Guide][airbnb]

## 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](#schwarzhirsch-style-guide)**


[sh-eslint-config]: https://www.npmjs.com/@schwarzhirsch/eslint-config
[sh-styleguide]: https://www.npmjs.com/@schwarzhirsch/styleguide
[npm-version]: https://badge.fury.io/js/@schwarzhirsch%2Fstyleguide.svg
[airbnb]: https://github.com/airbnb/javascript
[eslint-config]: http://eslint.org/docs/developer-guide/shareable-configs.html
[eslint-extends]: http://eslint.org/docs/user-guide/configuring#extending-configuration-files
[eslint-config-doc]: http://eslint.org/docs/user-guide/configuring
[editor-config]: https://www.npmjs.com/@schwarzhirsch/eslint-config

[version-commit]: http://alistapart.com/article/the-art-of-the-commit
[version-branch]: https://www.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow
[version-flow]: https://www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow

[conv-html]: http://codeguide.co/#html
[conv-css]: https://en.bem.info/methodology/quick-start