Why is this an issue?

The public API of a framework, plugin, or library is the way its provider intended it to be used. API stability and compatibility (within the same major version number) of a library are guaranteed only for its public API.

Internal APIs are mere implementation details and are prone to breaking changes as the implementation of the library changes. No guarantees are being made about them. Therefore, users should not use internal APIs, even when visible.

What is the potential impact?

Code Stability

If not fixed, your code might break when the library is upgraded to a new version, even if only the minor version number or the patch number changes.

How to fix it

Replace internal API usage with the public API designed for your use case. This may imply a refactoring of the affected code if no one-to-one replacement is available in the public API. If a specific functionality is required, copying the required parts of the implementation into your code may even be better than using the internal API.

Code examples

Noncompliant code example

import { _parseWith } from './node_modules/foo/helpers'

Compliant solution

import { parse } from 'foo'