diff --git a/package-lock.json b/package-lock.json index 540c9f0b30ff..19f7c18139aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15271,10 +15271,6 @@ "node": ">=4" } }, - "node_modules/eslint-plugin-forbidden-imports": { - "resolved": "packages/devextreme/js/__internal/.eslint-tmp-local-plugin", - "link": true - }, "node_modules/eslint-plugin-i18n": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-i18n/-/eslint-plugin-i18n-2.1.0.tgz", @@ -46416,7 +46412,6 @@ "devextreme-screenshot-comparer": "2.0.15", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.7", - "eslint-plugin-forbidden-imports": "file:js/__internal/.eslint-tmp-local-plugin", "exceljs": "4.3.0", "fancy-log": "2.0.0", "file-saver": "2.0.5", @@ -49051,7 +49046,7 @@ "packages/devextreme/js/__internal/.eslint-tmp-local-plugin": { "name": "eslint-plugin-forbidden-imports", "version": "1.0.0", - "dev": true, + "extraneous": true, "peerDependencies": { "@typescript-eslint/eslint-plugin": ">=5.0.0", "eslint": ">=8.0.0" diff --git a/packages/devextreme/js/__internal/.eslint-tmp-local-plugin/index.js b/packages/devextreme/js/__internal/.eslint-tmp-local-plugin/index.js deleted file mode 100644 index 839971e0c13f..000000000000 --- a/packages/devextreme/js/__internal/.eslint-tmp-local-plugin/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// TODO Vinogradov: Move this plugin to this package: -// https://github.com/DevExpress/eslint-config-devextreme -const { rules } = require('@typescript-eslint/eslint-plugin'); - -module.exports = { - rules: { - 'no-restricted-imports': rules['no-restricted-imports'], - }, -}; diff --git a/packages/devextreme/js/__internal/.eslint-tmp-local-plugin/package.json b/packages/devextreme/js/__internal/.eslint-tmp-local-plugin/package.json deleted file mode 100644 index 60a690469f73..000000000000 --- a/packages/devextreme/js/__internal/.eslint-tmp-local-plugin/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "eslint-plugin-forbidden-imports", - "version": "1.0.0", - "private": true, - "main": "./index.js", - "peerDependencies": { - "eslint": ">=8.0.0", - "@typescript-eslint/eslint-plugin": ">=5.0.0" - } -} diff --git a/packages/devextreme/js/__internal/.eslintrc.js b/packages/devextreme/js/__internal/.eslintrc.js index b3739f793d79..343c46b7fa41 100644 --- a/packages/devextreme/js/__internal/.eslintrc.js +++ b/packages/devextreme/js/__internal/.eslintrc.js @@ -7,11 +7,6 @@ module.exports = { }, plugins: [ 'simple-import-sort', - // TODO Vinogradov: Move this plugin to this package: - // https://github.com/DevExpress/eslint-config-devextreme - // This custom plugin clones the @typescript-eslint/no-restricted-imports rule - // See issue: https://github.com/eslint/eslint/issues/14061 - 'forbidden-imports', ], overrides: [ // General TS rules. @@ -38,21 +33,6 @@ module.exports = { } ], 'no-restricted-imports': 'off', - 'forbidden-imports/no-restricted-imports': [ - 'error', - { - paths: [{ - name: '@js/core/utils/iterator', - message: 'Please use @dom_utils/element_wrapper_iterator or native js methods instead.', - }], - patterns: [ - { - group: ['../'], - message: 'Please try to avoid import of modules from upper directories.', - } - ] - } - ], '@typescript-eslint/no-restricted-imports': [ 'error', { @@ -141,7 +121,6 @@ module.exports = { '@typescript-eslint/no-implied-eval': 'warn', '@typescript-eslint/ban-ts-comment': 'warn', '@typescript-eslint/prefer-for-of': 'warn', - 'forbidden-imports/no-restricted-imports': 'warn', } }, ], diff --git a/packages/devextreme/js/__internal/grids/grid_core/row_dragging/dom.ts b/packages/devextreme/js/__internal/grids/grid_core/row_dragging/dom.ts index df88d4f9b6ce..139259ae0810 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/row_dragging/dom.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/row_dragging/dom.ts @@ -4,7 +4,6 @@ import $ from '@js/core/renderer'; // eslint-disable-next-line @typescript-eslint/no-restricted-imports, -// eslint-disable-next-line forbidden-imports/no-restricted-imports import gridCoreUtils from '../m_utils'; import { CLASSES } from './const'; diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/view_model/__tests__/utils.test.ts b/packages/devextreme/js/__internal/scheduler/workspaces/view_model/__tests__/utils.test.ts index 4b5a0fbc6b3b..3b7cc85c3e16 100644 --- a/packages/devextreme/js/__internal/scheduler/workspaces/view_model/__tests__/utils.test.ts +++ b/packages/devextreme/js/__internal/scheduler/workspaces/view_model/__tests__/utils.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-undef, forbidden-imports/no-restricted-imports */ +/* eslint-disable no-undef */ import each from 'jest-each'; import { diff --git a/packages/devextreme/package.json b/packages/devextreme/package.json index 12a87ea07df0..7e3d88fc5658 100644 --- a/packages/devextreme/package.json +++ b/packages/devextreme/package.json @@ -88,7 +88,6 @@ "devextreme-screenshot-comparer": "2.0.15", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.7", - "eslint-plugin-forbidden-imports": "file:js/__internal/.eslint-tmp-local-plugin", "exceljs": "4.3.0", "fancy-log": "2.0.0", "file-saver": "2.0.5",