48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
== Why is this an issue?
|
|
|
|
Shared naming conventions allow teams to collaborate efficiently. In Dart, the convention is that all library prefixes should use lowercase_with_underscores.
|
|
|
|
This rule raises an issue when a library prefix does not comply with this convention.
|
|
|
|
== How to fix it
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,dart,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
import 'dart:io' as IO;
|
|
import 'dart:math' as Math;
|
|
import 'dart:js_interop' as jsInterop;
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,dart,diff-id=1,diff-type=compliant]
|
|
----
|
|
import 'dart:io' as io;
|
|
import 'dart:math' as math;
|
|
import 'dart:js_interop' as js_interop;
|
|
----
|
|
|
|
== Resources
|
|
|
|
* Dart Docs - https://dart.dev/tools/linter-rules/library_prefixes[Dart Linter rule - library_prefixes]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
* The prefix <prefix> isn't a lower_case_with_underscores identifier.
|
|
|
|
=== Highlighting
|
|
|
|
The prefix identifier.
|
|
|
|
endif::env-github,rspecator-view[]
|