github-actions[bot] 7021be3a27
Create rule S6627: Users should not use internal APIs (#4234)
* Add javascript to rule S6627

* add javascript language to rule

* improve js example

---------

Co-authored-by: ilia-kebets-sonarsource <ilia-kebets-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <ilia.kebets@sonarsource.com>
2024-09-09 15:55:10 +02:00

36 lines
630 B
Plaintext

== Why is this an issue?
include::../common/why.adoc[]
=== What is the potential impact?
include::../common/potential_impact.adoc[]
== How to fix it
include::../common/how.adoc[]
=== Code examples
==== Noncompliant code example
[source,javascript,diff-id=1,diff-type=noncompliant]
----
import { _parseWith } from './node_modules/foo/helpers'
----
==== Compliant solution
[source,javascript,diff-id=1,diff-type=compliant]
----
import { parse } from 'foo'
----
//== Resources
//=== Documentation
//=== Articles & blog posts
//=== Conference presentations
//=== Standards
//=== External coding guidelines
//=== Benchmarks