Skip to content

Commit

Permalink
add eslint rule for only tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Oct 26, 2024
1 parent cfb3efe commit 918612e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import markdown from "@eslint/markdown";
import json from "@eslint/json";
import js from "@eslint/js";
import globals from "globals";
import noOnlyTests from "eslint-plugin-no-only-tests";

export default [
{
Expand Down Expand Up @@ -39,6 +40,10 @@ export default [
...js.configs.recommended.rules,
// turn this off for Prettier
"no-irregular-whitespace": "off",
"no-only-tests/no-only-tests": "error",
},
plugins: {
"no-only-tests": noOnlyTests,
},
},
{
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@web/test-runner-junit-reporter": "^0.7.1",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"globals": "^15.10.0",
"http-server": "^14.1.1",
"husky": "^9.0.11",
Expand Down
2 changes: 1 addition & 1 deletion src/components/side-nav/side-nav.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ROUTE = "/guides/";
const HEADING = "Guides";
const CURRENT_ROUTE = "/guides/getting-started/key-concepts/";

describe.only("Components/Side Nav", () => {
describe("Components/Side Nav", () => {
let nav;
let expectedGuidesContent = [];
let expectedHeadingsContent = [];
Expand Down

0 comments on commit 918612e

Please sign in to comment.