From 62f345ff397b75f1f8fc622654c7139d62d34e03 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Wed, 8 May 2024 17:13:40 +0700 Subject: [PATCH] chore: fix lints (#630) See this usage: https://github.com/SonarSource/eslint-plugin-sonarjs?tab=readme-ov-file#usage --- .eslintrc.js | 2 +- package-lock.json | 1 + package.json | 5 +++-- test/index.test.ts | 2 ++ test/marketplaces.test.ts | 2 ++ test/utils.test.ts | 2 ++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 466b18bf..eedb1864 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,7 +22,7 @@ const eslint = { 'plugin:eslint-comments/recommended', 'plugin:jest/all', 'plugin:jest-formatting/strict', - 'plugin:sonarjs/recommended', + 'plugin:sonarjs/recommended-legacy', 'plugin:unicorn/recommended', ], plugins: [ diff --git a/package-lock.json b/package-lock.json index 6eed2e78..4d7e9d58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@lavadrop/ensure": "1.0.0" }, "devDependencies": { + "@jest/globals": "29.7.0", "@scaleleap/semantic-release-config": "1.1.41", "@types/jest": "29.5.12", "@types/node": "20.12.10", diff --git a/package.json b/package.json index 5b0eb5c1..619a5f4e 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,13 @@ "@lavadrop/ensure": "1.0.0" }, "devDependencies": { + "@jest/globals": "29.7.0", + "@scaleleap/semantic-release-config": "1.1.41", "@types/jest": "29.5.12", "@types/node": "20.12.10", "@typescript-eslint/eslint-plugin": "7.8.0", "@typescript-eslint/parser": "7.8.0", - "@scaleleap/semantic-release-config": "1.1.41", + "danger": "12.2.0", "eslint-config-airbnb-base": "15.0.0", "eslint-config-prettier": "9.1.0", "eslint-import-resolver-typescript": "3.6.1", @@ -47,7 +49,6 @@ "eslint-plugin-simple-import-sort": "12.1.0", "eslint-plugin-sonarjs": "1.0.3", "eslint-plugin-unicorn": "52.0.0", - "danger": "12.2.0", "jest": "29.7.0", "rimraf": "5.0.5", "ts-jest": "29.1.2", diff --git a/test/index.test.ts b/test/index.test.ts index ad5f8397..f4031df9 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals' + import { AmazonMarketplace, AmazonMarketplaceAdvertisingCountryCode, diff --git a/test/marketplaces.test.ts b/test/marketplaces.test.ts index 7ab544f3..5c2c86fc 100644 --- a/test/marketplaces.test.ts +++ b/test/marketplaces.test.ts @@ -1,6 +1,8 @@ import { readdirSync } from 'node:fs' import path from 'node:path' +import { describe, expect, it } from '@jest/globals' + import { amazonMarketplaces } from '../src/marketplaces' const countryCodes = readdirSync(path.join(__dirname, '../src/marketplaces')) diff --git a/test/utils.test.ts b/test/utils.test.ts index 2a85692c..ff74ba56 100644 --- a/test/utils.test.ts +++ b/test/utils.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals' + import { amazonMarketplaces } from '../src/marketplaces' import { assertMarketplaceHasAdvertising,