google / dart-scissors

sCiSSors: smarter resources for Angular(1,2) apps: CSS pruner & bidirectionalizer, Sass runner, image optimizer, locale permutations
https://pub.dartlang.org/packages/scissors
Apache License 2.0
33 stars 27 forks source link

Enable + address more lints #54

Open ochafik opened 8 years ago

ochafik commented 8 years ago

Example content for .analysis_options:

analyzer:
  strong-mode: true
  exclude:
    - test/**
linter:
  rules:
    - always_declare_return_types
    - always_specify_types
    - annotate_overrides
    - avoid_as
    - avoid_empty_else
    - avoid_init_to_null
    - avoid_return_types_on_setters
    - await_only_futures
    - camel_case_types
    - comment_references
    - constant_identifier_names
    - control_flow_in_finally
    - dont_compare_unrelated_types_for_equality
    - empty_constructor_bodies
    - hash_and_equals
    - implementation_imports
    - iterable_contains_unrelated_type
    - library_names
    - library_prefixes
    - non_constant_identifier_names
    - one_member_abstracts
    - overriden_field
    - package_api_docs
    - package_prefixed_library_names
    - prefer_is_not_empty
    - pub/package_names
    - public_member_api_docs
    - slash_for_doc_comments
    - sort_constructors_first
    - sort_unnamed_constructors_first
    - super_goes_last
    - test_types_in_equals
    - throw_in_finally
    - type_annotate_public_apis
    - type_init_formals
    - unawaited_futures
    - unnecessary_brace_in_string_interp
    - unnecessary_getters_setters
    - unrelated_type_equality_checks
ochafik commented 8 years ago

Note: for dart-linter, example .linter_options:

rules:
  style_guide:
    # no_implicit_dynamic: true # See https://github.com/dart-lang/linter/pull/262
    always_declare_return_types: true
    always_specify_types: true
    annotate_overrides: true
    avoid_as: true
    avoid_empty_else: true
    avoid_init_to_null: true
    avoid_return_types_on_setters: true
    await_only_futures: true
    camel_case_types: true
    comment_references: true
    constant_identifier_names: true
    control_flow_in_finally: true
    dont_compare_unrelated_types_for_equality: true
    empty_constructor_bodies: true
    hash_and_equals: true
    implementation_imports: true
    iterable_contains_unrelated_type: true
    library_names: true
    library_prefixes: true
    non_constant_identifier_names: true
    one_member_abstracts: true
    overriden_field: true
    package_api_docs: true
    package_prefixed_library_names: true
    prefer_is_not_empty: true
    pub/package_names: true
    public_member_api_docs: true
    slash_for_doc_comments: true
    sort_constructors_first: true
    sort_unnamed_constructors_first: true
    super_goes_last: true
    test_types_in_equals: true
    throw_in_finally: true
    type_annotate_public_apis: true
    type_init_formals: true
    unawaited_futures: true
    unnecessary_brace_in_string_interp: true
    unnecessary_getters_setters: true
    unrelated_type_equality_checks: true