Skip to content

Commit

Permalink
Add eslint-plugin-no-only-tests (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Jun 17, 2024
1 parent d4b051c commit 7afef66
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"extends": "airbnb-base",
"env": { "node": true },
"parserOptions": { "ecmaVersion": 2020 },
"plugins": [
"no-only-tests"
],
"rules": {
"array-bracket-spacing": "off",
"arrow-parens": "off",
Expand All @@ -25,6 +28,7 @@
"no-else-return": "off",
"no-multiple-empty-lines": "off",
"no-nested-ternary": "off",
"no-only-tests/no-only-tests": "error",
"no-restricted-syntax": "off",
"no-underscore-dangle": "off",
"nonblock-statement-body-position": "off",
Expand Down
16 changes: 16 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 @@ -53,6 +53,7 @@
"eslint": "^8.44.0",
"eslint-config-airbnb-base": "~15",
"eslint-plugin-import": "~2.25",
"eslint-plugin-no-only-tests": "~3.1",
"fetch-cookie": "^2.1.0",
"http-proxy-middleware": "^2.0.6",
"lodash": "^4.17.21",
Expand Down
1 change: 1 addition & 0 deletions test/integration/other/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const down = () => withTestDatabase((migrator) =>
const testMigration = (filename, tests, options = {}) => {
const { only = false, skip = false } = options;
const f = only
// eslint-disable-next-line no-only-tests/no-only-tests
? describe.only.bind(describe)
: (skip ? describe.skip.bind(describe) : describe);
// eslint-disable-next-line func-names, space-before-function-paren
Expand Down

0 comments on commit 7afef66

Please sign in to comment.