From 1849beb703708fa02ad2b31c1ea0f1f6670d5212 Mon Sep 17 00:00:00 2001 From: Vladyslav Zubko <42296182+what1s1ove@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:17:57 +0300 Subject: [PATCH] ci: remove perfectionist eslint plugin fp-137 (#142) --- eslint.config.js | 14 -------------- package-lock.json | 10 ---------- package.json | 1 - src/packages.d.ts | 8 -------- tests/get-form-control-payload.test.js | 3 +-- 5 files changed, 1 insertion(+), 35 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index f81f3a0..4583c95 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,6 @@ import { resolve as tsResolver } from 'eslint-import-resolver-typescript'; import importPlugin from 'eslint-plugin-import'; import jsdoc from 'eslint-plugin-jsdoc'; import perfectionist from 'eslint-plugin-perfectionist'; -import simpleImportSort from 'eslint-plugin-simple-import-sort'; import sonarjs from 'eslint-plugin-sonarjs'; import unicorn from 'eslint-plugin-unicorn'; import globals from 'globals'; @@ -116,17 +115,6 @@ const perfectionistConfig = { rules: perfectionist.configs['recommended-natural'].rules, }; -/** @type {FlatConfig} */ -const simpleImportSortConfig = { - plugins: { - 'simple-import-sort': simpleImportSort, - }, - rules: { - 'simple-import-sort/exports': ['error'], - 'simple-import-sort/imports': ['error'], - }, -}; - /** @type {FlatConfig} */ const typescriptPlugin = { languageOptions: { @@ -198,7 +186,6 @@ const overridesConfigs = [ files: ['tests/**/*.test.js'], rules: { '@typescript-eslint/no-floating-promises': ['off'], - 'perfectionist/sort-imports': ['off'], 'sonarjs/cognitive-complexity': ['off'], }, }, @@ -220,7 +207,6 @@ const config = [ sonarConfig, unicornConfig, perfectionistConfig, - simpleImportSortConfig, mainRulesConfig, ...overridesConfigs, ]; diff --git a/package-lock.json b/package-lock.json index a0bfff6..8fca72a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ "eslint-plugin-import": "2.29.0", "eslint-plugin-jsdoc": "46.9.0", "eslint-plugin-perfectionist": "2.5.0", - "eslint-plugin-simple-import-sort": "10.0.0", "eslint-plugin-sonarjs": "0.23.0", "eslint-plugin-unicorn": "49.0.0", "globals": "13.24.0", @@ -3104,15 +3103,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/eslint-plugin-simple-import-sort": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", - "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", - "dev": true, - "peerDependencies": { - "eslint": ">=5.0.0" - } - }, "node_modules/eslint-plugin-sonarjs": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.23.0.tgz", diff --git a/package.json b/package.json index c183895..82dc2ad 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "eslint-plugin-import": "2.29.0", "eslint-plugin-jsdoc": "46.9.0", "eslint-plugin-perfectionist": "2.5.0", - "eslint-plugin-simple-import-sort": "10.0.0", "eslint-plugin-sonarjs": "0.23.0", "eslint-plugin-unicorn": "49.0.0", "globals": "13.24.0", diff --git a/src/packages.d.ts b/src/packages.d.ts index 0c98fdb..185af86 100644 --- a/src/packages.d.ts +++ b/src/packages.d.ts @@ -1,11 +1,3 @@ -declare module 'eslint-plugin-simple-import-sort' { - import { type ESLint } from 'eslint'; - - const plugin: ESLint.Plugin; - - export default plugin; -} - declare module 'eslint-plugin-perfectionist' { import { type Linter } from 'eslint'; diff --git a/tests/get-form-control-payload.test.js b/tests/get-form-control-payload.test.js index 4b60b24..5f12710 100644 --- a/tests/get-form-control-payload.test.js +++ b/tests/get-form-control-payload.test.js @@ -1,8 +1,7 @@ +import { fireEvent, waitFor } from '@testing-library/dom'; import { deepEqual, equal, throws } from 'node:assert/strict'; import { beforeEach, describe, test } from 'node:test'; -import { fireEvent, waitFor } from '@testing-library/dom'; - import { FormPayloadError, getFormControlPayload } from '../src/index.js'; import { VALUE_AS_ARRAY_IDENTIFIER } from '../src/libs/constants/constants.js'; import { ControlElementType } from '../src/libs/enums/enums.js';