Skip to content

Commit

Permalink
adds markdown linting (#3931)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitropoulos committed Aug 27, 2021
1 parent 7135114 commit 422d5a8
Show file tree
Hide file tree
Showing 28 changed files with 481 additions and 295 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -30,6 +30,8 @@ jobs:
run: npm run bootstrap
- name: Lint
run: npm run lint
- name: Lint Markdown
run: npm run lint:markdown
- name: Run tests
run: npm test
- name: Build for smoke tests
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -23,12 +23,11 @@ node_modules/
.idea
.DS_Store
*test-plugins
.vscode
graphql.config.json
.cache
.graphqlconfig
schema.graphql
packages/insomnia-smoke-test/screenshots
*.tsbuildinfo
dist
.history
.history
27 changes: 27 additions & 0 deletions .markdownlint.yaml
@@ -0,0 +1,27 @@
# see https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for docs

# Default state for all rules
default: true

# Path to configuration file to extend
extends: null

# MD004 - Unordered list style
# We want to use dashes consistently everywhere
MD004:
style: dash

# MD013 - Line length
# We do not want to artificially limit line lengh in a language like markdown because of the nature of the language's handling of whitespace. Line wrapping is just a fact of life in markdown and trying to impose the conventions of other languages on markdown is an impedance mismatch that leads to people thinking that whitespace in markdown is more representative of the rendered HTML than it really is.
MD013: false

# MD033 - Inline HTML
MD033:
allowed_elements:
- details # there is no markdown equivalent for accordions
- summary # there is no markdown equivalent for accordions

# MD029 - Ordered list item prefix
# Plain and simple, markdown parsers do not respect the numbering you use for ordered lists. It only leads to confusion and misconception to allow otherwise.
MD029:
style: one
15 changes: 15 additions & 0 deletions .vscode/extensions.json
@@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"yzhang.markdown-all-in-one",
"DavidAnson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
57 changes: 10 additions & 47 deletions CODE_OF_CONDUCT.md
@@ -1,47 +1,18 @@
# Code of Conduct

Like the technical community as a whole, the Insomnia community is made up of a mixture
of professionals and volunteers from all over the world, working on every aspect of the
mission – including mentorship, teaching, and connecting people.
Like the technical community as a whole, the Insomnia community is made up of a mixture of professionals and volunteers from all over the world, working on every aspect of the mission – including mentorship, teaching, and connecting people.

Diversity is a huge priority, but it can also lead to communication issues and
unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This
code applies equally to founders, mentors and those seeking help and guidance.
Diversity is a huge priority, but it can also lead to communication issues and unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This code applies equally to founders, mentors and those seeking help and guidance. This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the technical communities in which we participate.

This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit
in which it’s intended - a guide to make it easier to enrich all of us and the technical
communities in which we participate.
This code of conduct applies to all spaces managed by the Insomnia project, including Slack, the issue tracker, and any other forums created for the project which the community uses for communication. In addition, violations of this code outside these spaces may affect a person's ability to participate within them.

This code of conduct applies to all spaces managed by the Insomnia project, including Slack,
the issue tracker, and any other forums created for the project which the community uses
for communication. In addition, violations of this code outside these spaces may affect
a person's ability to participate within them.

If you believe someone is violating the code of conduct, we ask that you report it by
emailing [support@insomnia.rest](mailto:support@insomnia.rest). For more details
please see our Reporting Guidelines
If you believe someone is violating the code of conduct, we ask that you report it by emailing [support@insomnia.rest](mailto:support@insomnia.rest). For more details please see our Reporting Guidelines

- **Be friendly and patient.**
- **Be welcoming.** We strive to be a community that welcomes and supports people of all
backgrounds and identities. This includes, but is not limited to members of any race,
ethnicity, culture, national origin, colour, immigration status, social and economic
class, educational level, sex, sexual orientation, gender identity and expression, age,
size, family status, political belief, religion, and mental and physical ability.
- **Be considerate.** Your work will be used by other people, and you in turn will
depend on the work of others. Any decision you take will affect users and colleagues,
and you should take those consequences into account when making decisions. Remember
that we're a world-wide community, so you might not be communicating in someone
else's primary language.
- **Be respectful.** Not all of us will agree all the time, but disagreement is no
excuse for poor behavior and poor manners. We might all experience some frustration
now and then, but we cannot allow that frustration to turn into a personal attack.
It’s important to remember that a community where people feel uncomfortable or
threatened is not a productive one. Members of the Insomnia community should be respectful
when dealing with other members as well as with people outside the Insomnia community.
- **Be careful in the words that you choose.** We are a community of professionals,
and we conduct ourselves professionally. Be kind to others. Do not insult or put
down other participants. Harassment and other exclusionary behavior isn't acceptable.
This includes, but is not limited to:
- **Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
- **Be considerate.** Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
- **Be respectful.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the Insomnia community should be respectful when dealing with other members as well as with people outside the Insomnia community.
- **Be careful in the words that you choose.** We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior isn't acceptable. This includes, but is not limited to:
- Violent threats or language directed against another person.
- Discriminatory jokes and language.
- Posting sexually explicit or violent material.
Expand All @@ -50,17 +21,9 @@ please see our Reporting Guidelines
- Unwelcome sexual attention.
- Advocating for, or encouraging, any of the above behavior.
- Repeated harassment of others. In general, if someone asks you to stop, then stop.
- **When we disagree, try to understand why.** Disagreements, both social and technical,
happen all the time and Insomnia is no exception. It is important that we resolve
disagreements and differing views constructively. Remember that we’re different. The
strength of Insomnia comes from its varied community, people from a wide range of backgrounds.
Different people have different perspectives on issues. Being unable to understand why
someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human
to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve
issues and learning from mistakes.
- **When we disagree, try to understand why.** Disagreements, both social and technical, happen all the time and Insomnia is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of Insomnia comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.

Original text courtesy of the
[Speak Up! project](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html).
Original text courtesy of the [Speak Up! project](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html).

## Questions?

Expand Down
50 changes: 14 additions & 36 deletions CONTRIBUTING.md
@@ -1,63 +1,41 @@
# Contributing to this project

Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.

## Using the issue tracker

[GitHub Issues](https://github.com/kong/insomnia/issues) is the preferred channel
for [bug reports](#bug-reports), [features requests](#feature-requests)
and [submitting pull requests](#pull-requests).
[GitHub Issues](https://github.com/kong/insomnia/issues) is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests).

Please respect the following restrictions:

- Please **do not** use the issue tracker for personal support requests (email
[support@insomnia.rest](mailto:support@insomnia.rest)).
- Please **do not** use the issue tracker for personal support requests (email [support@insomnia.rest](mailto:support@insomnia.rest)).

- Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
- Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.

## Bug Reports

A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!

Guidelines for bug reports:

1. **Use the GitHub issue search** — check if the issue has already been
reported.
1. **Use the GitHub issue search** — check if the issue has already been reported.
1. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository.
1. **Demonstrate the problem** — provide clear steps that can be reproduced.

2. **Check if the issue has been fixed** — try to reproduce it using the
latest `master` or development branch in the repository.

3. **Demonstrate the problem** — provide clear steps that can be reproduced.

A good bug report should not leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What OS experienced the
problem? What would you expect to be the outcome? All these details will help
to fix any potential bugs.
A good bug report should not leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What OS experienced the problem? What would you expect to be the outcome? All these details will help to fix any potential bugs.

## Feature Requests

Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to _you_ to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to _you_ to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.

## Pull Requests

Good pull requests (patches, improvements, new features) are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.
Good pull requests (patches, improvements, new features) are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.

**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise, you risk spending a lot of time working on something that might
not get accepted into the project.
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise, you risk spending a lot of time working on something that might not get accepted into the project.

**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project.
**IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project.

## Contributor T-shirt

If your pull request to [Kong/insomnia](https://github.com/Kong/insomnia) was accepted, and it fixes a bug, adds functionality, or makes it significantly easier to use or understand Insomnia, congratulations! You are eligible to receive the very special contributor t-shirt! Go ahead and fill out the [contributor submission form](https://goo.gl/forms/5w6mxLaE4tz2YM0L2).

0 comments on commit 422d5a8

Please sign in to comment.