Skip to content

Commit

Permalink
docs: enable/autofix indent rule in markdown JS code samples
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Apr 19, 2021
1 parent a0f21a0 commit 15581da
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
"brace-style": "off",
"eqeqeq": "off",
"guard-for-in": "off",
"indent": "off",
"no-constant-condition": "off",
"no-empty-function": "off",
"no-undef": "off",
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-assert-ok.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ An example when using `assert.ok` can involuntarily go wrong:

```js
test('test myFunc returns a truthy value', (assert) => {
assert.ok(myFunc);
assert.ok(myFunc);
});
```

Expand Down
14 changes: 7 additions & 7 deletions docs/rules/no-async-module-callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ if it was within the last `module` that QUnit processes.

```js
QUnit.module('An async module', async function () {
QUnit.test('a passing test', function (assert) {
assert.ok(true);
});
QUnit.test('a passing test', function (assert) {
assert.ok(true);
});

await Promise.resolve();
await Promise.resolve();

QUnit.test('another passing test', function (assert) {
assert.ok(true);
});
QUnit.test('another passing test', function (assert) {
assert.ok(true);
});
});

QUnit.module('Some other module');
Expand Down
14 changes: 7 additions & 7 deletions docs/rules/no-hooks-from-ancestor-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ The following patterns are considered warnings:

```js
QUnit.module("outer module", function(hooks) {
QUnit.module("inner module", function() {
hooks.beforeEach(function() {});
});
QUnit.module("inner module", function() {
hooks.beforeEach(function() {});
});
});

QUnit.module("outer module", function(outerHooks) {
QUnit.module("inner module", function(innerHooks) {
outerHooks.beforeEach(function() {});
});
QUnit.module("inner module", function(innerHooks) {
outerHooks.beforeEach(function() {});
});
});
```

The following patterns are not warnings:

```js
QUnit.module("example module", function(hooks) {
hooks.beforeEach(function() {});
hooks.beforeEach(function() {});
});
```

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-loose-assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ An example when using `assert.ok` can involuntarily go wrong:

```js
test('test myFunc returns a truthy value', (assert) => {
assert.ok(myFunc);
assert.ok(myFunc);
});
```

Expand Down

0 comments on commit 15581da

Please sign in to comment.