Skip to content

Commit

Permalink
Merge pull request #6 from arcticicestudio/task/gh-5-markdown-style-g…
Browse files Browse the repository at this point in the history
…uide-and-linter

Markdown style guide and linter
  • Loading branch information
arcticicestudio committed Feb 17, 2018
2 parents c2144ff + f1f28e0 commit fa9af09
Show file tree
Hide file tree
Showing 20 changed files with 317 additions and 257 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- run:
name: preprocess-npm-install
command: npm install
- run:
name: lint
command: npm run lint
- run:
name: generate-docs
command: npm run docs:build
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ trim_trailing_whitespace = true
# +-----------+
# +--- Markdown ---+
[*.{md,gfm}]
max_line_length = off
trim_trailing_whitespace = false
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ What actually happens?

Provide a [MCVE - The Minimal, Complete, and Verifiable Example](https://github.com/arcticicestudio/styleguide-javascript/blob/develop/CONTRIBUTING.md#mcve)

**This is a optional section, but it can drastically increase the speed at which this issue can be processed since it takes away the time-consuming reconstruction to reproduce the enhancement or bug.**
Note that **this is a optional section, but it can drastically increase the speed at which this issue can be processed since it takes away the time-consuming reconstruction to reproduce the enhancement or bug.**

The recommened way is to upload it as [Gist](https://gist.github.com) or new repository to GitHub, but of course you can [attach it to this issue](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests), use any free file hosting service or paste the code in [Markdown code blocks](https://help.github.com/articles/basic-writing-and-formatting-syntax) into this issue.

Expand All @@ -66,7 +66,7 @@ If possible please provide more context by answering these questions:

## Stack Trace and Error Messages

```
```raw
Paste the full stack trace, error messages or the logfile here ...
```

Expand Down
5 changes: 5 additions & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# +---------+
# + Node.js +
# +---------+
src/node_modules/*
node_modules/*
17 changes: 17 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2018-present Arctic Ice Studio <development@arcticicestudio.com>
* Copyright (c) 2018-present Sven Greb <code@svengreb.de>
*
* Project: Styleguide JavaScript
* Repository: https://github.com/arcticicestudio/styleguide-javascript
* License: MIT
*/

/**
* @file The remark-lint configuration.
* @author Arctic Ice Studio <development@arcticicestudio.com>
*/

module.exports = {
plugins: ["remark-preset-lint-arcticicestudio"]
};
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

<p align="center">The Arctic Ice Studio JavaScript Code Style based on the <a href="https://github.com/airbnb/javascript">Airbnb JavaScript Style Guide</a>.</p>

---

# 0.1.0

![Release Date: 2018-01-27](https://img.shields.io/badge/Release_Date-2018--01--28-88C0D0.svg?style=flat-square) [![Project Board](https://img.shields.io/badge/Project_Board-0.1.0-88C0D0.svg?style=flat-square)](https://github.com/arcticicestudio/styleguide-javascript/projects/2) [![Milestone](https://img.shields.io/badge/Milestone-0.1.0-88C0D0.svg?style=flat-square)](https://github.com/arcticicestudio/styleguide-javascript/milestone/1)

> Detailed information can be found in the [project documentation][docs].
Expand All @@ -25,7 +24,6 @@

<p align="center"><a href="https://github.com/arcticicestudio/styleguide-javascriptscript/blob/develop/LICENSE.md"><img src="https://img.shields.io/badge/License-MIT-5E81AC.svg?style=flat-square"/></a></p>

[airbnb-javascript-style-guide]: https://github.com/airbnb/javascript
[docs]: https://arcticicestudio.github.io/styleguide-javascript
[docs-rules]: https://arcticicestudio.github.io/styleguide-javascript/rules/index.html
[docs-rules-react]: https://arcticicestudio.github.io/styleguide-javascript/rules/react/index.html
Expand Down
12 changes: 9 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ As for everything else in the project, the contributions to Styleguide JavaScrip

## Getting Started

Styleguide JavaScript is an open source project and we love to receive contributions from the community! There are many ways to contribute, from [writing- and improving documentation and tutorials](), [reporting bugs](#bug-reports), [submitting enhancement suggestions](#enhancement-suggestions) which can be incorporated into Styleguide JavaScript itself by [submitting a pull request](#pull-requests).
Styleguide JavaScript is an open source project and we love to receive contributions from the community! There are many ways to contribute, from [writing- and improving documentation and tutorials](#documentations), [reporting bugs](#bug-reports), [submitting enhancement suggestions](#enhancement-suggestions) which can be incorporated into Styleguide JavaScript itself by [submitting a pull request](#pull-requests).

The project development workflow and process uses [GitHub Issues][gh-issues]- and [Pull Requests][gh-pr] management to track issues and pull requests.

Expand Down Expand Up @@ -107,13 +107,19 @@ Every major open source project has its own style guide, a set of standards and

A style guide establishes and enforces style to improve the intelligibility and communication within the project community. It ensures consistency and enforces best practice in usage and language composition.

### Markdown Code Style

All Markdown sources and documentations adhere to the [Arctic Ice Studio Markdown Style Guide][styleguide-markdown-github-ghdocs].

<a href="https://github.com/arcticicestudio/styleguide-markdown"><img src="https://rawgit.com/arcticicestudio/styleguide-markdown/develop/assets/styleguide-markdown-banner-typography-badge.svg" width="40%"/></a>

### Git Commit Messages

A well-crafted Git commit message is the best way to communicate *context* about a change to the maintainers. The code will tell what changed, but only the commit message can properly tell why. Re-establishing the context of a piece of code is wasteful. We can't avoid it completely, so our efforts should go to reducing it as much as possible.

Styleguide JavaScript adheres to the [Arctic Ice Studio Git Style Guide][styleguide-git-github].

[![][styleguide-git-badge]][styleguide-git-github]
[![Arctic Ice Studio Git Style Guide Badge][styleguide-git-badge]][styleguide-git-github]

The style guide assumes that you are familiar with the [gitflow][gitflow] branching model.

Expand Down Expand Up @@ -164,7 +170,6 @@ Every significant change is documented in the [changelog][changelog].

Thanks for the inspirations and attributions to GitHub's [Open Source Guides](https://opensource.guide) and various contribution guides of large open source projects like [Atom][ref-atom-contributing], [React][ref-react-contributing] and [Ruby on Rails][ref-rubyonrails-contributing].

[arcver]: https://github.com/arcticicestudio/arcver
[branch-develop]: https://github.com/arcticicestudio/styleguide-javascript/tree/develop
[changelog]: https://github.com/arcticicestudio/styleguide-javascript/blob/develop/CHANGELOG.md
[code-of-conduct]: https://github.com/arcticicestudio/styleguide-javascript/blob/develop/CODE_OF_CONDUCT.md
Expand All @@ -186,6 +191,7 @@ Thanks for the inspirations and attributions to GitHub's [Open Source Guides](ht
[stackoverflow-mcve]: https://stackoverflow.com/help/mcve
[styleguide-git-badge]: https://rawgit.com/arcticicestudio/styleguide-git/develop/src/assets/styleguide-git-banner-typography-badge.svg
[styleguide-git-github]: https://github.com/arcticicestudio/styleguide-git
[styleguide-markdown-github-ghdocs]: https://arcticicestudio.github.io/styleguide-markdown
[sscce]: http://sscce.org
[template-issue]: https://github.com/arcticicestudio/styleguide-javascript/blob/develop/.github/ISSUE_TEMPLATE.md
[template-pr]: https://github.com/arcticicestudio/styleguide-javascript/blob/develop/.github/PULL_REQUEST_TEMPLATE.md
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

---

<p align="center"><img src="https://cdn.rawgit.com/arcticicestudio/styleguide-javascript/develop/assets/styleguide-javascript-banner-typography-badge.svg"/></p>
<p align="center"><img src="https://cdn.rawgit.com/arcticicestudio/styleguide-javascript/develop/assets/styleguide-javascript-banner-typography-badge.svg" width="40%" /></p>

Every major open source project has its own style guide, a set of standards and conventions for the writing and design of code, documentations and assets. It is much easier to understand a large codebase when all the code in it is in a consistent style.

Expand All @@ -19,7 +19,7 @@ A style guide establishes and enforces style to improve the intelligibility and
The [project documentation][docs] contains chapters to learn about
the [comprehensive base rule set][docs-rules] including [ECMAScript +6 (ES 2015+)][docs-rules-ecmascript_6+_styles] and [React][docs-rules-react] specific styles like e.g. [Higher-Order Components][docs-rules-react-hoc], the [component methods & properties ordering][docs-rules-react-ordering-methods_and_properties] and [props][docs-rules-react-props].

The development chapters contain information about the [requirements][docs-dev-requirements] and [how to build][docs-dev-building] the style guide documentation.
The development chapters contain information about the [requirements][docs-dev-requirements], [how to build][docs-dev-building] this style guide documentation and [run the tests][docs-dev-testing].

### Contributing

Expand Down Expand Up @@ -52,3 +52,4 @@ The guide also includes information about [minimal, complete, and verifiable exa
[docs-rules-react-hoc]: https://arcticicestudio.github.io/styleguide-javascript/rules/react/higher_order_components.html
[docs-rules-react-ordering-methods_and_properties]: https://arcticicestudio.github.io/styleguide-javascript/rules/react/ordering.html#component-methods-and-properties
[docs-rules-react-props]: https://arcticicestudio.github.io/styleguide-javascript/rules/react/props.html
[docs-dev-testing]: https://arcticicestudio.github.io/styleguide-javascript/development/testing.html
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@
"scripts": {
"clean": "del build",
"docs:build": "gitbook install src && gitbook build src build/docs",
"docs:dev": "npm run docs:build && gitbook serve src build/docs"
"docs:dev": "npm run docs:build && gitbook serve src build/docs",
"lint:md": "remark --no-stdout ./*.md src/ .github/",
"lint": "npm run lint:md",
"prepublishOnly": "npm run lint"
},
"devDependencies": {
"del-cli": "1.1.0",
"gitbook-cli": "2.3.2"
"gitbook-cli": "2.3.2",
"remark-cli": "5.0.0",
"remark-preset-lint-arcticicestudio": "0.1.0"
}
}
3 changes: 2 additions & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A style guide establishes and enforces style to improve the intelligibility and

This style guide provides the [comprehensive base rule set][rules] including [ECMAScript +6 (ES 2015+)][rules-ecmascript_6+_styles] and [React][rules-react] specific styles like e.g. [Higher-Order Components][rules-react-hoc], the [component methods & properties ordering][rules-react-ordering-methods_and_properties] and [props][rules-react-props].

The development chapters contain information about the [requirements][dev-requirements] and [how to build][dev-building] this style guide documentation.
The development chapters contain information about the [requirements][dev-requirements], [how to build][dev-building] this style guide documentation and [run the tests][dev-testing].

### Contributing

Expand All @@ -44,6 +44,7 @@ The guide also includes information about [minimal, complete, and verifiable exa
[dev-contributing-styleguides]: development/contributing.md#styleguides
[dev-contributing-versioning]: development/contributing.md#versioning
[dev-requirements]: development/requirements.md
[dev-testing]: development/testing.md
[rules]: rules/index.md
[rules-ecmascript_6+_styles]: rules/ecmascript_6+_styles.md
[rules-react]: rules/react/index.md
Expand Down
Loading

0 comments on commit fa9af09

Please sign in to comment.