Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/fixtures/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export default [
reportUnusedDisableDirectives: "off",
},
rules: {
"eol-last": "error",
"dot-notation": "error",
"no-console": "error",
"no-undef": "error",
quotes: "error",
"spaced-comment": "error",
"no-warning-comments": ["error", { terms: ["eslint-disable"] }],
yoda: "error",
},
},
{
Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures/eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
}
],
"rules": {
"eol-last": "error",
"dot-notation": "error",
"no-console": "error",
"no-undef": "error",
"quotes": "error",
"spaced-comment": "error"
"no-warning-comments": ["error", { "terms": ["eslint-disable"] }],
"yoda": "error"
}
}
10 changes: 5 additions & 5 deletions tests/fixtures/long.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ function foo() {
```

<!-- global process -->
<!-- eslint-disable eol-last, quotes -->
<!-- eslint-disable yoda, dot-notation -->

```js
console.log(process.version);
console.log("linux" === process["platform"]);
```

How about some JSX?

<!--
eslint quotes: [
eslint yoda: [
"error",
"single"
"always"
]
-->
<!--eslint-disable no-console-->

```js
console.log("Error!");
console.log(window.length === 0);
```

I may be a code block, but don't lint me!
Expand Down
10 changes: 5 additions & 5 deletions tests/language/markdown-source-code.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This is a paragraph with an inline config comment. <!-- eslint-disable-line no-c

<!--
eslint-enable no-console -- ok to use console here
-->Something something<!-- eslint-disable semi -->
-->Something something<!-- eslint-disable yoda -->

<!--
eslint-disable-line no-console
Expand Down Expand Up @@ -334,7 +334,7 @@ describe("MarkdownSourceCode", () => {
});

assert.deepEqual(nodes[3], {
value: "eslint-disable semi",
value: "eslint-disable yoda",
position: {
start: { line: 19, column: 23, offset: 356 },
end: { line: 19, column: 51, offset: 384 },
Expand Down Expand Up @@ -427,7 +427,7 @@ describe("MarkdownSourceCode", () => {
);

assert.strictEqual(directives[3].type, "disable");
assert.strictEqual(directives[3].value, "semi");
assert.strictEqual(directives[3].value, "yoda");
assert.strictEqual(directives[3].justification, "");

assert.strictEqual(directives[4].type, "disable");
Expand Down Expand Up @@ -525,12 +525,12 @@ describe("MarkdownSourceCode", () => {
[
1,
"html",
"<!--\neslint-enable no-console -- ok to use console here\n-->Something something<!-- eslint-disable semi -->",
"<!--\neslint-enable no-console -- ok to use console here\n-->Something something<!-- eslint-disable yoda -->",
],
[
2,
"html",
"<!--\neslint-enable no-console -- ok to use console here\n-->Something something<!-- eslint-disable semi -->",
"<!--\neslint-enable no-console -- ok to use console here\n-->Something something<!-- eslint-disable yoda -->",
],
[1, "html", "<!--\n eslint-disable-line no-console\n -->"],
[2, "html", "<!--\n eslint-disable-line no-console\n -->"],
Expand Down
Loading
Loading