Skip to content

Commit

Permalink
Chore: Update linters
Browse files Browse the repository at this point in the history
  • Loading branch information
sapegin committed Jul 7, 2018
1 parent 5f3d606 commit bdbacef
Show file tree
Hide file tree
Showing 35 changed files with 490 additions and 497 deletions.
20 changes: 10 additions & 10 deletions .github/Code_of_Conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand Down
22 changes: 11 additions & 11 deletions .github/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ If you want to contribute but don’t know what to do, take a look at these two

## Prerequisites

* If it’s your first pull request, watch [this amazing course](http://makeapullrequest.com/) by [Kent C. Dodds](https://twitter.com/kentcdodds).
* Install [EditorConfig](http://editorconfig.org/) plugin for your code editor to make sure it uses correct settings.
* Fork the repository and clone your fork.
* Install dependencies: `npm install`.
* Read the [developer guide](https://react-styleguidist.js.org/docs/development.html).
- If it’s your first pull request, watch [this amazing course](http://makeapullrequest.com/) by [Kent C. Dodds](https://twitter.com/kentcdodds).
- Install [EditorConfig](http://editorconfig.org/) plugin for your code editor to make sure it uses correct settings.
- Fork the repository and clone your fork.
- Install dependencies: `npm install`.
- Read the [developer guide](https://react-styleguidist.js.org/docs/development.html).

## Development workflow

Expand Down Expand Up @@ -48,11 +48,11 @@ npx jest -u

## Other notes

* If you have commit access to repository and want to make big change or not sure about something, make a new branch and open pull request.
* We’re using [Prettier](https://github.com/prettier/prettier) to format JavaScript, so don’t worry much about code formatting.
* Don’t commit generated files, like minified JavaScript.
* Don’t change version number and change log.
* If you're updating examples other then `examples/basic`, you'll need to modify your watch and start commands:
- If you have commit access to repository and want to make big change or not sure about something, make a new branch and open pull request.
- We’re using [Prettier](https://github.com/prettier/prettier) to format JavaScript, so don’t worry much about code formatting.
- Don’t commit generated files, like minified JavaScript.
- Don’t change version number and change log.
- If you're updating examples other then `examples/basic`, you'll need to modify your watch and start commands:

```bash
npm run compile:watch & npm run start:customised # if making changes to examples/customised
Expand All @@ -69,4 +69,4 @@ node bin/styleguidist.js server --config examples/path/to/example/styleguide.con

## Need help?

* Join our [Gitter](https://gitter.im/styleguidist/styleguidist) or [Spectrum](https://spectrum.chat/styleguidist) chats and ask everything you need.
- Join our [Gitter](https://gitter.im/styleguidist/styleguidist) or [Spectrum](https://spectrum.chat/styleguidist) chats and ask everything you need.
30 changes: 15 additions & 15 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
---
name: "\U0001F41B Bug report"
about: Something isn’t working as expected
---

**Current behavior**

<!-- A clear and concise description of what the bug is -->

**To reproduce**

about: Something isn’t working as expected
---

**Current behavior**

<!-- A clear and concise description of what the bug is -->

**To reproduce**

<!--
Post a link to a reproducible demo repository here.
Expand All @@ -22,8 +22,8 @@ Most likely you’ll find an issue yourself, while creating a demo.
Make sure you’re using the latest version of React Styleguidist.
💀 Issues without a demo will be closed! 💀
-->

**Expected behavior**

<!-- A clear and concise description of what you expected to happen -->
-->

**Expected behavior**

<!-- A clear and concise description of what you expected to happen -->
42 changes: 21 additions & 21 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
---
name: "\U0001F680 Feature request"
about: I have a suggestion (and might want to implement myself)
---

<!-- Consider opening a pull request instead: it’s a more productive way to discuss new features -->

**The problem**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Proposed solution**

<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. -->

**Alternative solutions**

<!-- A clear and concise description of any alternative solutions or features you’ve considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->
about: I have a suggestion (and might want to implement myself)
---

<!-- Consider opening a pull request instead: it’s a more productive way to discuss new features -->

**The problem**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Proposed solution**

<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. -->

**Alternative solutions**

<!-- A clear and concise description of any alternative solutions or features you’ve considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->
28 changes: 14 additions & 14 deletions .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
---
name: "\U0001F914 Support question"
about: I have a question or don’t know how to do something
---

--------------^ Click “Preview”!

If you have a support question, ask it on [Stack Overflow](https://stackoverflow.com/questions/tagged/react-styleguidist) using the `react-styleguidist` tag.

Before submitting a new question, make sure you:

* Searched existing [Stack Overflow questions](https://stackoverflow.com/questions/tagged/react-styleguidist).
* Searched opened and closed [GitHub issues](https://github.com/styleguidist/react-styleguidist/issues?utf8=%E2%9C%93&q=is%3Aissue).
* Read [the documentation](https://react-styleguidist.js.org/docs/getting-started.html).
* Googled your question.
about: I have a question or don’t know how to do something
---

--------------^ Click “Preview”!

If you have a support question, ask it on [Stack Overflow](https://stackoverflow.com/questions/tagged/react-styleguidist) using the `react-styleguidist` tag.

Before submitting a new question, make sure you:

- Searched existing [Stack Overflow questions](https://stackoverflow.com/questions/tagged/react-styleguidist).
- Searched opened and closed [GitHub issues](https://github.com/styleguidist/react-styleguidist/issues?utf8=%E2%9C%93&q=is%3Aissue).
- Read [the documentation](https://react-styleguidist.js.org/docs/getting-started.html).
- Googled your question.
36 changes: 18 additions & 18 deletions .github/ISSUE_TEMPLATE/Support.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
---
name: "\U0001F984 Support Styleguidist development"
about: I want to support efforts in maintaining this community-driven project
---

--------------^ Click “Preview”!

Developing and maintaining an open source project is a big effort. Styleguidist isn’t supported by any big company, and all the contributors are working on it in their free time. We need your help to make it sustainable.

There are two ways you can help:

1. Help develop and maintain the project:

* Answer questions in [GitHub issues](https://github.com/styleguidist/react-styleguidist/issues) and [Stack Overflow](https://stackoverflow.com/questions/tagged/react-styleguidist).
* Review [pull requests](https://github.com/styleguidist/react-styleguidist/pulls).
* Fix bugs and add new features.
* Write articles and talk about Styleguidist on conferences and meetups (we’re always happy to review your texts and slides).

2. Donate via [Open Collective](https://opencollective.com/styleguidist).
about: I want to support efforts in maintaining this community-driven project
---

--------------^ Click “Preview”!

Developing and maintaining an open source project is a big effort. Styleguidist isn’t supported by any big company, and all the contributors are working on it in their free time. We need your help to make it sustainable.

There are two ways you can help:

1. Help develop and maintain the project:

- Answer questions in [GitHub issues](https://github.com/styleguidist/react-styleguidist/issues) and [Stack Overflow](https://stackoverflow.com/questions/tagged/react-styleguidist).
- Review [pull requests](https://github.com/styleguidist/react-styleguidist/pulls).
- Fix bugs and add new features.
- Write articles and talk about Styleguidist on conferences and meetups (we’re always happy to review your texts and slides).

2. Donate via [Open Collective](https://opencollective.com/styleguidist).
62 changes: 31 additions & 31 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,57 @@ React Styleguidist is a component development environment with hot reloaded dev

## Usage

* **[Getting Started](https://react-styleguidist.js.org/docs/getting-started.html): install and run Styleguidist**
* [Documenting components](https://react-styleguidist.js.org/docs/documenting.html): how to write documentation
* [Locating components](https://react-styleguidist.js.org/docs/components.html): point Styleguidist to your React components
* [Configuring webpack](https://react-styleguidist.js.org/docs/webpack.html): tell Styleguidist how to load your code
* [Cookbook](https://react-styleguidist.js.org/docs/cookbook.html): how to solve common tasks with Styleguidist
- **[Getting Started](https://react-styleguidist.js.org/docs/getting-started.html): install and run Styleguidist**
- [Documenting components](https://react-styleguidist.js.org/docs/documenting.html): how to write documentation
- [Locating components](https://react-styleguidist.js.org/docs/components.html): point Styleguidist to your React components
- [Configuring webpack](https://react-styleguidist.js.org/docs/webpack.html): tell Styleguidist how to load your code
- [Cookbook](https://react-styleguidist.js.org/docs/cookbook.html): how to solve common tasks with Styleguidist

## Advanced documentation

* [Configuration](https://react-styleguidist.js.org/docs/configuration.html)
* [CLI commands and options](https://react-styleguidist.js.org/docs/cli.html)
* [Node.js API](https://react-styleguidist.js.org/docs/api.html)
- [Configuration](https://react-styleguidist.js.org/docs/configuration.html)
- [CLI commands and options](https://react-styleguidist.js.org/docs/cli.html)
- [Node.js API](https://react-styleguidist.js.org/docs/api.html)

## Examples

* [Basic style guide](https://react-styleguidist.js.org/examples/basic/), [source](./examples/basic)
* Style guide with sections, [source](./examples/sections)
* Style guide with customized styles, [source](./examples/customised)
* Style guide with custom express endpoints, [source](./examples/express)
* Create React App integration, [source](./examples/cra)
- [Basic style guide](https://react-styleguidist.js.org/examples/basic/), [source](./examples/basic)
- Style guide with sections, [source](./examples/sections)
- Style guide with customized styles, [source](./examples/customised)
- Style guide with custom express endpoints, [source](./examples/express)
- Create React App integration, [source](./examples/cra)

## Showcase

Real projects using React Styleguidist:

* [Rumble Charts](https://rumble-charts.github.io/rumble-charts/)
* [better-react-spinkit](http://better-react-spinkit.benjamintatum.com/)
* [Semantic UI Components for React](https://hallister.github.io/semantic-react/)
* [Dialog Components](https://dialogs.github.io/dialog-web-components/)
* [Bulma Components](https://bokuweb.github.io/re-bulma/)
* [Yammer Components](https://microsoft.github.io/YamUI/)
* [More projects…](https://github.com/styleguidist/react-styleguidist/issues/127)
- [Rumble Charts](https://rumble-charts.github.io/rumble-charts/)
- [better-react-spinkit](http://better-react-spinkit.benjamintatum.com/)
- [Semantic UI Components for React](https://hallister.github.io/semantic-react/)
- [Dialog Components](https://dialogs.github.io/dialog-web-components/)
- [Bulma Components](https://bokuweb.github.io/re-bulma/)
- [Yammer Components](https://microsoft.github.io/YamUI/)
- [More projects…](https://github.com/styleguidist/react-styleguidist/issues/127)

## Integration with other tools

* Create React App — just works, see the [Getting Started](https://react-styleguidist.js.org/docs/getting-started.html) guide!
* Create React App + TypeScript, see [Configuring webpack](https://react-styleguidist.js.org/docs/webpack.html)
* TypeScript, see [react-docgen-typescript](https://github.com/styleguidist/react-docgen-typescript)
* Vue, see [Vue Styleguidist](https://github.com/vue-styleguidist/vue-styleguidist)
- Create React App — just works, see the [Getting Started](https://react-styleguidist.js.org/docs/getting-started.html) guide!
- Create React App + TypeScript, see [Configuring webpack](https://react-styleguidist.js.org/docs/webpack.html)
- TypeScript, see [react-docgen-typescript](https://github.com/styleguidist/react-docgen-typescript)
- Vue, see [Vue Styleguidist](https://github.com/vue-styleguidist/vue-styleguidist)

## Third-party tools

* [snapguidist](https://github.com/styleguidist/snapguidist): snapshot testing for React Styleguidist
* [react-styleguidist-visual](https://github.com/unindented/react-styleguidist-visual): automated visual testing for React Styleguidist, using Puppeteer and pixelmatch
* [styleguidist-scrapper](https://github.com/livechat/styleguidist-scrapper): scrapper script for documentation generated by React Styleguidist
- [snapguidist](https://github.com/styleguidist/snapguidist): snapshot testing for React Styleguidist
- [react-styleguidist-visual](https://github.com/unindented/react-styleguidist-visual): automated visual testing for React Styleguidist, using Puppeteer and pixelmatch
- [styleguidist-scrapper](https://github.com/livechat/styleguidist-scrapper): scrapper script for documentation generated by React Styleguidist

## Resources

* [The Dream of Styleguide Driven Development](https://www.youtube.com/watch?v=JjXnmhNW8Cs) talk by [Sara Vieira](https://github.com/saravieira)
* [Building React Components Library](https://skillsmatter.com/skillscasts/8140-building-react-components-library) talk by [Robert Haritonov](https://github.com/operatino)
* [Say Cheese: Snapshots and Visual Testing](https://developers.livechatinc.com/blog/snapshots-visual-testing/)
* [Interview with Artem Sapegin](https://survivejs.com/blog/styleguidist-interview/) about React Styleguidist.
- [The Dream of Styleguide Driven Development](https://www.youtube.com/watch?v=JjXnmhNW8Cs) talk by [Sara Vieira](https://github.com/saravieira)
- [Building React Components Library](https://skillsmatter.com/skillscasts/8140-building-react-components-library) talk by [Robert Haritonov](https://github.com/operatino)
- [Say Cheese: Snapshots and Visual Testing](https://developers.livechatinc.com/blog/snapshots-visual-testing/)
- [Interview with Artem Sapegin](https://survivejs.com/blog/styleguidist-interview/) about React Styleguidist.

## Change log

Expand Down
4 changes: 2 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

<!-- toc -->

* [Initialization](#initialization)
* [Methods](#methods)
- [Initialization](#initialization)
- [Methods](#methods)

<!-- tocstop -->

Expand Down
6 changes: 3 additions & 3 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ These commands are supposed to be placed in `package.json` `scripts` (see [Getti

CLI Options:

* `--config <file>`: Specify path to a config file.
* `--open`: Open Styleguidist in the default browser.
* `--verbose`: Print debug information.
- `--config <file>`: Specify path to a config file.
- `--open`: Open Styleguidist in the default browser.
- `--verbose`: Print debug information.
36 changes: 18 additions & 18 deletions docs/Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<!-- toc -->

* [Finding components](#finding-components)
* [Loading and exposing components](#loading-and-exposing-components)
* [Sections](#sections)
* [Limitations](#limitations)
- [Finding components](#finding-components)
- [Loading and exposing components](#loading-and-exposing-components)
- [Sections](#sections)
- [Limitations](#limitations)

<!-- tocstop -->

Expand All @@ -17,14 +17,14 @@ By default Styleguidist will search components using this [glob pattern](https:/

It will pick up files like:

* `src/components/Button.js`,
* `src/components/Button/Button.js`,
* `src/components/Button/index.js`.
- `src/components/Button.js`,
- `src/components/Button/Button.js`,
- `src/components/Button/index.js`.

But will ignore tests:

* `__tests__` folder,
* files containing `.test.js` or `.spec.js` (or same for `.jsx`, `.ts` and `.tsx`).
- `__tests__` folder,
- files containing `.test.js` or `.spec.js` (or same for `.jsx`, `.ts` and `.tsx`).

If it doesn’t work for you, create a `styleguide.config.js` file in your project’s root folder and configure the patterns to fit your project structure.

Expand Down Expand Up @@ -104,15 +104,15 @@ Group components into sections or add extra Markdown documents to your style gui

Each section consists of (all fields are optional):

* `name` — section title.
* `content` — location of a Markdown file containing the overview content.
* `components` — a glob pattern string, an array of component paths or glob pattern strings, or a function returning a list of components or glob pattern strings. The same rules apply as for the root `components` option.
* `sections` — array of subsections (can be nested).
* `description` — A small description of this section.
* `sectionDepth` — Number of subsections with single pages, only available with [pagePerSection](Configuration.md#pagepersection) is enabled.
* `exampleMode` — Initial state of the code example tab, uses [exampleMode](Configuration.md#examplemode).
* `usageMode` — Initial state of the props and methods tab, uses [usageMode](Configuration.md#usagemode).
* `ignore` — string/array of globs that should not be included in the section.
- `name` — section title.
- `content` — location of a Markdown file containing the overview content.
- `components` — a glob pattern string, an array of component paths or glob pattern strings, or a function returning a list of components or glob pattern strings. The same rules apply as for the root `components` option.
- `sections` — array of subsections (can be nested).
- `description` — A small description of this section.
- `sectionDepth` — Number of subsections with single pages, only available with [pagePerSection](Configuration.md#pagepersection) is enabled.
- `exampleMode` — Initial state of the code example tab, uses [exampleMode](Configuration.md#examplemode).
- `usageMode` — Initial state of the props and methods tab, uses [usageMode](Configuration.md#usagemode).
- `ignore` — string/array of globs that should not be included in the section.

Configuring a style guide with textual documentation section and a list of components would look like:

Expand Down
Loading

0 comments on commit bdbacef

Please sign in to comment.