diff options
Diffstat (limited to 'eslint.config.js')
| -rw-r--r-- | eslint.config.js | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/eslint.config.js b/eslint.config.js index 29aa23dc..169bbd17 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -12,7 +12,6 @@ import prettierConfig from 'eslint-config-prettier'; import importPlugin from 'eslint-plugin-import'; import globals from 'globals'; import licenseHeader from 'eslint-plugin-license-header'; -import noRelativeCrossPackageImports from './eslint-rules/no-relative-cross-package-imports.js'; import path from 'node:path'; // Use node: prefix for built-ins import url from 'node:url'; @@ -34,7 +33,6 @@ export default tseslint.config( 'packages/core/dist/**', 'packages/server/dist/**', 'packages/vscode-ide-companion/dist/**', - 'eslint-rules/*', 'bundle/**', ], }, @@ -72,6 +70,14 @@ export default tseslint.config( { // General overrides and rules for the project (TS/TSX files) files: ['packages/*/src/**/*.{ts,tsx}'], // Target only TS/TSX in the cli package + plugins: { + import: importPlugin, + }, + settings: { + 'import/resolver': { + node: true, + }, + }, languageOptions: { globals: { ...globals.node, @@ -106,6 +112,13 @@ export default tseslint.config( caughtErrorsIgnorePattern: '^_', }, ], + 'import/no-internal-modules': [ + 'error', + { + allow: ['react-dom/test-utils', 'memfs/lib/volume.js', 'yargs/**'], + }, + ], + 'import/no-relative-packages': 'error', 'no-cond-assign': 'error', 'no-debugger': 'error', 'no-duplicate-case': 'error', @@ -213,24 +226,4 @@ export default tseslint.config( ], }, }, - // Custom eslint rules for this repo - { - files: ['packages/**/*.{js,jsx,ts,tsx}'], - plugins: { - custom: { - rules: { - 'no-relative-cross-package-imports': noRelativeCrossPackageImports, - }, - }, - }, - rules: { - // Enable and configure your custom rule - 'custom/no-relative-cross-package-imports': [ - 'error', - { - root: path.join(projectRoot, 'packages'), - }, - ], - }, - }, ); |
