chore: error for .only usage in tests in plugin-server (#11357)

This commit is contained in:
Tiina Turban
2022-08-17 18:46:28 +01:00
committed by GitHub
parent 2abc0c0a5d
commit 7c11dac3e5
4 changed files with 9 additions and 2 deletions

View File

@@ -6,10 +6,11 @@ module.exports = {
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
},
plugins: ['@typescript-eslint', 'simple-import-sort', 'prettier'],
plugins: ['@typescript-eslint', 'simple-import-sort', 'prettier', 'no-only-tests'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:eslint-comments/recommended', 'prettier'],
ignorePatterns: ['bin', 'dist', 'node_modules', 'src/config/idl'],
rules: {
'no-only-tests/no-only-tests': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'no-unused-vars': 'off',

View File

@@ -104,6 +104,7 @@
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-no-only-tests": "^3.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-simple-import-sort": "^7.0.0",

View File

@@ -590,7 +590,7 @@ describe('PersonState.update()', () => {
expect(hub.db.fetchPerson).toHaveBeenCalledTimes(2)
})
it.only('updates person properties when other thread merges the user', async () => {
it('updates person properties when other thread merges the user', async () => {
const cachedPerson = await hub.db.createPerson(
timestamp,
{ a: 1, b: 2 },

View File

@@ -4564,6 +4564,11 @@ eslint-plugin-import@^2.26.0:
resolve "^1.22.0"
tsconfig-paths "^3.14.1"
eslint-plugin-no-only-tests@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.0.0.tgz#026cbc8cb069c8da6b7e19d03654be7ad49893f6"
integrity sha512-I0PeXMs1vu21ap45hey4HQCJRqpcoIvGcNTPJe+UhUm8TwjQ6//mCrDqF8q0WS6LgmRDwQ4ovQej0AQsAHb5yg==
eslint-plugin-node@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"