From 22d805acd66953b00fd93d5fc6dc88551f88ab75 Mon Sep 17 00:00:00 2001 From: Paul Bredenberg Date: Wed, 11 Jan 2023 11:22:12 -0500 Subject: [PATCH] docs: fix some markdown linter errors --- README.md | 28 +++++++++++++++++++--------- docs/rules/call-indentation.md | 12 ++++++++---- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1ca71f6..86bc179 100644 --- a/README.md +++ b/README.md @@ -12,29 +12,37 @@ ## What? Shareable [ESLint](http://eslint.org/) plugins that are used by our shareable config rules. -See [eslint-config-silvermine](https://github.com/silvermine/eslint-config-silvermine/) for more details. +See [eslint-config-silvermine][1] for more details. ## Why? -Because we need it. Whitespace errors are evil. As are the other hundreds of types of errors this protects us from. +Because we need it. Whitespace errors are evil. As are the other hundreds of types of errors +this protects us from. ## Installation You'll first need to install [ESLint](http://eslint.org): -``` +```shell $ npm install eslint --save-dev + ++ eslint@8.16.0 +installed 9 packages and audited 955 packages in 5.833s ``` Next, install `@silvermine/eslint-plugin-silvermine`: -``` +```shell $ npm install @silvermine/eslint-plugin-silvermine --save-dev + ++ @silvermine/eslint-plugin-silvermine@2.4.0 +installed 1 package and audited 955 packages in 4.95s ``` ## Usage -Add `silvermine` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: +Add `silvermine` to the plugins section of your `.eslintrc` configuration file. You can +omit the `eslint-plugin-` prefix: ```json { @@ -57,10 +65,10 @@ Then configure the rules you want to use under the rules section. ## Supported Rules -- [fluent-chaining](docs/rules/fluent-chaining.md) -- [call-indentation](docs/rules/call-indentation.md) -- [array-indentation](docs/rules/array-indentation.md) -- [no-multiple-inline-functions](docs/rules/no-multiple-inline-functions.md) + * [fluent-chaining](docs/rules/fluent-chaining.md) + * [call-indentation](docs/rules/call-indentation.md) + * [array-indentation](docs/rules/array-indentation.md) + * [no-multiple-inline-functions](docs/rules/no-multiple-inline-functions.md) ## Note on Semantic Versioning @@ -86,3 +94,5 @@ rules - in other words, primarily big policy changes rather than simply technica ## License This software is released under the MIT license. See [the license file](LICENSE) for more details. + +[1]: diff --git a/docs/rules/call-indentation.md b/docs/rules/call-indentation.md index ba9924a..f6816d9 100644 --- a/docs/rules/call-indentation.md +++ b/docs/rules/call-indentation.md @@ -6,6 +6,7 @@ Only one multiline argument is allowed per function call in either format. ## Option 1 - All start on the same line + A call to a function that spans multiple lines because of an array, object or anonymous function call should begin and end with the same indentation. Each argument should start on the same line that @@ -18,7 +19,7 @@ of the arguments should have each argument on its own line. The closing parenthesis should be on its own line with the same indentation as the function call. -### Invalid examples: +### Invalid examples ```js _.map(languages, @@ -26,17 +27,19 @@ _.map(languages, return lang.name; }); ``` + The inner function should have started on the same line as the outer and the inner function's closing bracket should be indented to the same level as the line of the outer function. -``` +```js fn(arg1, arg2, arg3); ``` + The arg3 should have been on the same line as the other two. -``` +```js promise.then(function() { yayItWorked(); }, function(err) { @@ -52,9 +55,10 @@ promise.then( } ); ``` + Only one multiline argument is allowed. -### Valid examples: +### Valid examples ```js _.map(languages, function(lang) {