From e871e1ebaccfa6c7c6bfb4915ec8b18a9355a2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 31 Oct 2022 10:54:35 +0100 Subject: [PATCH] feat: update dependencies and remove jest plugin --- index.js | 2 +- jest.js | 58 ---------------------------------------------------- package.json | 13 +++++------- test/test.js | 6 ++---- 4 files changed, 8 insertions(+), 71 deletions(-) delete mode 100644 jest.js diff --git a/index.js b/index.js index 664df8e..94f25a9 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: ['./base.js', './jest.js'], + extends: ['./base.js'], }; diff --git a/jest.js b/jest.js deleted file mode 100644 index c271de1..0000000 --- a/jest.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -module.exports = { - plugins: ['jest'], - overrides: [ - { - files: [ - '**/__tests__/**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}', - '*.test.{js,jsx,cjs,mjs,ts,tsx,cts,mts}', - ], - env: { - jest: true, - node: true, - }, - rules: { - // Allow empty functions in tests. - 'no-empty-function': 'off', - - // Jest plugin (https://github.com/jest-community/eslint-plugin-jest) - 'jest/consistent-test-it': 'error', - 'jest/expect-expect': 'off', - 'jest/no-alias-methods': 'error', - 'jest/no-commented-out-tests': 'error', - 'jest/no-disabled-tests': 'warn', - 'jest/no-done-callback': 'error', - 'jest/no-duplicate-hooks': 'error', - 'jest/no-export': 'error', - 'jest/no-focused-tests': 'error', - 'jest/no-hooks': 'off', - 'jest/no-identical-title': 'error', - 'jest/no-if': 'error', - 'jest/no-jasmine-globals': 'error', - 'jest/no-jest-import': 'error', - 'jest/no-large-snapshots': 'off', - 'jest/no-mocks-import': 'error', - 'jest/no-standalone-expect': 'error', - 'jest/no-test-prefixes': 'error', - 'jest/no-test-return-statement': 'error', - 'jest/prefer-called-with': 'off', - 'jest/prefer-expect-assertions': 'off', - 'jest/prefer-hooks-on-top': 'error', - 'jest/prefer-lowercase-title': 'off', - 'jest/prefer-spy-on': 'error', - 'jest/prefer-strict-equal': 'warn', - 'jest/prefer-to-be': 'error', - 'jest/prefer-to-contain': 'error', - 'jest/prefer-to-have-length': 'error', - 'jest/prefer-todo': 'error', - 'jest/require-top-level-describe': 'off', - 'jest/require-to-throw-message': 'error', - 'jest/valid-describe-callback': 'error', - 'jest/valid-expect-in-promise': 'error', - 'jest/valid-expect': 'error', - 'jest/valid-title': 'error', - }, - }, - ], -}; diff --git a/package.json b/package.json index 72c8c15..9d2307d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "files": [ "base.js", "index.js", - "jest.js", "jsdoc.js" ], "scripts": { @@ -25,16 +24,14 @@ "homepage": "https://github.com/cheminfo/eslint-config#readme", "dependencies": {}, "peerDependencies": { - "eslint": "^8.16.0", + "eslint": "^8.26.0", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jest": "^26.4.6", - "eslint-plugin-jsdoc": "^39.3.2" + "eslint-plugin-jsdoc": "^39.4.0" }, "devDependencies": { - "eslint": "8.16.0", + "eslint": "8.26.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jest": "26.4.6", - "eslint-plugin-jsdoc": "39.3.2", - "prettier": "^2.6.2" + "eslint-plugin-jsdoc": "39.4.0", + "prettier": "^2.7.1" } } diff --git a/test/test.js b/test/test.js index c7a545c..f7feaa2 100644 --- a/test/test.js +++ b/test/test.js @@ -7,9 +7,9 @@ const { ESLint } = require('eslint'); const eslint = new ESLint({ overrideConfigFile: 'eslintrc.test.yml' }); eslint - .lintFiles(['test/ok.js', 'test/not-ok.js', 'test/jest.test.js']) + .lintFiles(['test/ok.js', 'test/not-ok.js']) .then((results) => { - const [okResult, notOkResult, jestResult] = results; + const [okResult, notOkResult] = results; assert.strictEqual( okResult.errorCount, @@ -39,8 +39,6 @@ eslint 'strict', 'wrap-iife', ]); - - assert.strictEqual(jestResult.errorCount, 1, util.inspect(jestResult)); }) .catch((error) => { console.error(error);