Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

eslint-import-resolver-parcel

Package Overview
Dependencies
1
Maintainers
1
Versions
25
Issues
File Explorer

Advanced tools

eslint-import-resolver-parcel

Parcel import resolution plugin for eslint-plugin-import.

    1.10.6latest
    GitHub

Version published
Maintainers
1
Weekly downloads
684
increased by10.5%

Weekly downloads

Readme

Source

eslint-import-resolver-parcel

Build Status Known Vulnerabilities

About

Parcel import resolution plugin for eslint-plugin-import. This allows for eslint/import to work with parcel's module resolution.

Installation

npm install eslint-import-resolver-parcel -D

Usage

Add this to your eslint config:

settings: { 'import/resolver': 'parcel' }

Current status

*About Root Paths

Because root paths require knowledge of the entry points, you must pass in the folder where the entry points are located into the config:

settings: { 'import/resolver': { parcel: { rootDir: 'src' // wherever your entrypoints are located } } }

If not specified, it will assume process.cwd() (where eslint is called from, probably where the package.json is located).

Extensions

If you want to automatically add extra extensions to resolve to, e.g., test-file resolves to test-file.ts, just pass in an array to the extensions key of the config.

settings: { 'import/resolver': { parcel: { extensions: ['.ts'] // whatever extra extensions you want to look for } } }

Current default extensions are .js and .jsx.

Keywords

FAQs

Last updated on 02 Dec 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc