Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent test.only #24235

Merged
merged 3 commits into from
Oct 3, 2024
Merged
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
8 changes: 6 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"mocha": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": [
"@typescript-eslint",
"no-only-tests"
],
Copy link

@anthonykim1 anthonykim1 Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had #24161 with

"mocha/no-exclusive-tests": "error"

Is the one mentioned in this PR more general? I don't know which one is necessarily better/ more broader.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as it works in the python ext correctly, we should probably use yours if it matches with what vscode is doing

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vscode had something like

"local/code-no-test-only": "error", 

but I couldnt figure out where the part ""local/code" was coming from, and just saw/tested with mocha/no-execlusive-tests works. I think we can still use your no-only-tests though. For me that looks more generalized/better since we seem to have combination of different tests in Python repo.

"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
Expand Down Expand Up @@ -97,6 +100,7 @@
}
],
"operator-assignment": "off",
"strict": "off"
"strict": "off",
"no-only-tests/no-only-tests": ["error", { "block": ["test", "suite"], "focus": ["only"] }]
}
}
17 changes: 17 additions & 0 deletions package-lock.json

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

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
"browser": "./dist/extension.browser.js",
"l10n": "./l10n",
"contributes": {
"problemMatchers":
[
"problemMatchers": [
{
"name": "python",
"owner": "python",
Expand All @@ -98,7 +97,6 @@
},
{
"regexp": "^\\s*(.*)\\s*$"

},
{
"regexp": "^\\s*(.*Error.*)$",
Expand Down Expand Up @@ -1640,6 +1638,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "^4.0.0",
"expose-loader": "^3.1.0",
Expand Down
Loading