Codify existing practices for writing Markdown in style guides and
enforce them via Markdownlint. A new npm script "lint" in the top level
package.json runs before tests or as the first step of the "travis"
script.
Only modify documents in cases where they had bugs or isolated cases of
inconsistency:
README.md: 10: MD007 Unordered list indentation
Inconsistent with all other top level lists
README.md: 10: MD032 Lists should be surrounded by blank lines
Some Markdown parsers don't handle this correctly
README.md: 3156-3161: MD005 Inconsistent indentation for list items at
the same level
Bug, looks like it's intended to be another list level but GitHub
renders it at the same level as the "No but seriously"
README.md & css-in-javascript/README.md: throughout: MD012 Multiple
consecutive blank lines
README.md: throughout: MD004 Unordered list style
Some nested lists used plusses, now everything consistently uses
dashes.
Actually, if we want to make the thing more convenient, we could go as far as saying: “
Before using our `.eslintrc` install these dependencies:
```sh
npm install --save-dev eslint-config-airbnb eslint babel-eslint eslint-plugin-react
```
”. I want to leave the decision up to you though.
Added new ES6 rule, introduced in eslint 0.23.0
> This rule is aimed to flag variables that are declared using let keyword, but never modified after initial assignment.
In `eslint-plugin-react`'s page on their sorting rules they show the order I showed here. https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md#rule-options
I noticed because according to the current rules `contextTypes` goes below `render` and I also noticed other methods were missing from the list. Since we're being specific we should also include the other methods and properties that `eslint-plugin-react` handles by default.
This adds a `.jshintrc` to the `linters/` directory. I just copied over
the settings from the `SublimeLinter` file, de-nesting the JSON object
by one level.
It means we'll have to maintain both files, but it's good to have a
basic `.jshintrc` for those of us that aren't using JSHint through
Sublime Text.
The Airbnb guide states: "Strings longer than 80 characters should be written across multiple lines using string concatenation."
I propose to add the maxlen option to enforce this rule: http://www.jshint.com/docs/options/#maxlen
However maxlen enforces the entire source code, not just a line of String. I would like to hear your thoughts on whether that is a beneficial enforcement to keep JS code at a set width.