mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-23 06:12:00 +01:00
Fix analysis errors (#1470)
This commit is contained in:
parent
78aacbcda2
commit
f06937e2df
@ -1,7 +1,6 @@
|
|||||||
name: sass_analysis
|
name: sass_analysis
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
description: Shared analysis options for Sass team packages.
|
description: Shared analysis options for Sass team packages.
|
||||||
author: Sass Team
|
|
||||||
homepage: https://github.com/sass/dart-sass/tree/master/analysis
|
homepage: https://github.com/sass/dart-sass/tree/master/analysis
|
||||||
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
@ -149,7 +149,9 @@ class ArgumentDeclaration implements SassNode {
|
|||||||
if (names.contains(argument.name)) return false;
|
if (names.contains(argument.name)) return false;
|
||||||
} else if (names.contains(argument.name)) {
|
} else if (names.contains(argument.name)) {
|
||||||
namedUsed++;
|
namedUsed++;
|
||||||
} else if (argument.defaultValue == null) return false;
|
} else if (argument.defaultValue == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restArgument != null) return true;
|
if (restArgument != null) return true;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import 'package:js/js.dart';
|
import 'package:js/js.dart';
|
||||||
|
|
||||||
@JS("Function")
|
@JS("Function")
|
||||||
class JSFunction implements Function {
|
class JSFunction {
|
||||||
external JSFunction(String arg1, [String? arg2, String? arg3]);
|
external JSFunction(String arg1, [String? arg2, String? arg3]);
|
||||||
|
|
||||||
// Note that this just invokes the function with the given arguments, rather
|
// Note that this just invokes the function with the given arguments, rather
|
||||||
|
@ -73,7 +73,7 @@ class SassTypes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JS()
|
@JS()
|
||||||
class NodeSassBooleanClass implements Function {
|
class NodeSassBooleanClass {
|
||||||
external NodeSassBoolean call();
|
external NodeSassBoolean call();
|
||||||
external NodeSassBoolean get TRUE;
|
external NodeSassBoolean get TRUE;
|
||||||
external NodeSassBoolean get FALSE;
|
external NodeSassBoolean get FALSE;
|
||||||
@ -124,13 +124,13 @@ class NodeSassMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JS()
|
@JS()
|
||||||
class NodeSassNullClass implements Function {
|
class NodeSassNullClass {
|
||||||
external Object call();
|
external Object call();
|
||||||
external NodeSassNull get NULL;
|
external NodeSassNull get NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JS()
|
@JS()
|
||||||
class NodeSassNull implements Function {
|
class NodeSassNull {
|
||||||
external Constructor get constructor;
|
external Constructor get constructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +108,9 @@ void main() {
|
|||||||
test(
|
test(
|
||||||
"lists with undefined separators are reported as having space "
|
"lists with undefined separators are reported as having space "
|
||||||
"separators", () {
|
"separators", () {
|
||||||
expect(parseValue("()").getSeparator(), isFalse);
|
expect(parseValue<NodeSassList>("()").getSeparator(), isFalse);
|
||||||
expect(parseValue("join((), 1px)").getSeparator(), isFalse);
|
expect(
|
||||||
|
parseValue<NodeSassList>("join((), 1px)").getSeparator(), isFalse);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("has a useful .constructor.name", () {
|
test("has a useful .constructor.name", () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user