Skip to content

[FR] "javascript/typescript.preferences.importModuleSpecifier": "no-relative-parent-imports" #54955

@wenfangdu

Description

@wenfangdu

Works like https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-parent-imports.md
The following patterns are considered problems:

/**
 *  in my-project/lib/a.js
 */

import bar from '../main' // Import parent file using a relative path

The following patterns are NOT considered problems:

/**
 *  in my-project/main.js
 */

import foo from 'foo' // Import package using module path
import a from './lib/a' // Import child file using relative path

/**
 *  in my-project/lib/a.js
 */

import b from './b' // Import sibling file using relative path

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy