Skip to content

Commit 78ad66a

Browse files
chore: update version to 1.8.2-dev.1 and remove some linter rules
1 parent 1be349c commit 78ad66a

3 files changed

Lines changed: 2 additions & 78 deletions

File tree

lib/solvro_forks/solvro_custom_linter.dart

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ class SolvroCustomLinterPlugin extends Plugin {
2424
AvoidIconWithoutSemanticLabelRule(),
2525
AvoidImageWithoutSemanticLabelRule(),
2626
AvoidSingleChildRule(),
27-
AvoidSmallInteractiveElementsRule(),
2827
AssetImageRule(),
2928
CognitiveComplexityRule(),
3029
DisposeControllersRule(),
3130
FreezedMissingMixinRule(),
32-
FreezedMissingPrivateEmptyConstructorRule(),
3331
HooksAvoidNestingRule(),
3432
HooksAvoidWithinClassRule(),
3533
HooksExtendsRule(),
@@ -298,48 +296,6 @@ class AvoidImageWithoutSemanticLabelRule extends _SolvroRule {
298296
}
299297
}
300298

301-
class AvoidSmallInteractiveElementsRule extends _SolvroRule {
302-
AvoidSmallInteractiveElementsRule()
303-
: super(
304-
const LintCode(
305-
"avoid_small_interactive_elements",
306-
"Interactive elements should be at least 48x48 logical pixels.",
307-
),
308-
"Ensures common interactive widgets are large enough to tap.",
309-
);
310-
311-
static const _interactiveWidgets = {
312-
"ElevatedButton",
313-
"FilledButton",
314-
"FloatingActionButton",
315-
"IconButton",
316-
"InkWell",
317-
"OutlinedButton",
318-
"TextButton",
319-
};
320-
321-
@override
322-
void registerNodeProcessors(
323-
RuleVisitorRegistry registry,
324-
RuleContext context,
325-
) {
326-
registry.addInstanceCreationExpression(
327-
this,
328-
_InstanceVisitor(this, (node) {
329-
if (!_interactiveWidgets.contains(
330-
node.constructorName.type.name.lexeme,
331-
)) {
332-
return;
333-
}
334-
final minimumSize = _namedArgument(node.argumentList, "minimumSize");
335-
if (minimumSize == null) {
336-
reportAtNode(node);
337-
}
338-
}),
339-
);
340-
}
341-
}
342-
343299
class AddHapticFeedbackOnUserInteractionRule extends _SolvroRule {
344300
AddHapticFeedbackOnUserInteractionRule()
345301
: super(
@@ -455,38 +411,6 @@ class FreezedMissingMixinRule extends _SolvroRule {
455411
}
456412
}
457413

458-
class FreezedMissingPrivateEmptyConstructorRule extends _SolvroRule {
459-
FreezedMissingPrivateEmptyConstructorRule()
460-
: super(
461-
const LintCode(
462-
"freezed_missing_private_empty_constructor",
463-
"Freezed classes should declare a private empty constructor.",
464-
),
465-
"Ensures @freezed classes include ClassName._().",
466-
);
467-
468-
@override
469-
void registerNodeProcessors(
470-
RuleVisitorRegistry registry,
471-
RuleContext context,
472-
) {
473-
registry.addClassDeclaration(
474-
this,
475-
_ClassVisitor(this, (node) {
476-
if (!_hasFreezedAnnotation(node.metadata)) return;
477-
final hasPrivateEmptyCtor = node.body.members
478-
.whereType<ConstructorDeclaration>()
479-
.any(
480-
(ctor) =>
481-
ctor.name?.lexeme == "_" &&
482-
ctor.parameters.parameters.isEmpty,
483-
);
484-
if (!hasPrivateEmptyCtor) reportAtToken(node.namePart.typeName);
485-
}),
486-
);
487-
}
488-
}
489-
490414
bool _hasFreezedAnnotation(NodeList<Annotation> metadata) => metadata.any((a) {
491415
final name = a.name.name;
492416
return name == "freezed" || name == "Freezed";

lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: solvro_config
22
description: A Dart linter/config package for Solvro projects.
3-
version: 1.8.1-dev.1
3+
version: 1.8.2-dev.1
44

55
repository: https://github.com/Solvro/lib-mobile-solvro-config
66

0 commit comments

Comments
 (0)