Code Monkey home page Code Monkey logo

effective_dart's Introduction

effective_dart

pub package License: MIT style: effective dart

Be consistent. Be brief.

This package provides linter rules corresponding to the guidelines in Effective Dart. You can easily see all enabled rules on the Supported Lint Rules site.

Note: This package is inspired by the pedantic package, which contains lints internally used at Google.

Using the Lints

To use the lints add a dev dependency in your pubspec.yaml:

dev_dependencies:
  effective_dart: ^1.2.0

Then add an include in your analysis_options.yaml file:

include: package:effective_dart/analysis_options.yaml

Or, if you using e.g. continuous builds, they will likely fail whenever a new version of package:effective_dart is released. To avoid this, specify a version of analysis_options.yaml:

include: package:effective_dart/analysis_options.1.2.0.yaml

Consider Lints

Consider guidelines are practices that you might or might not want to follow, depending on circumstances, precedents, and your own preference.

Following lints are not enforced by this package:

Unused Lints

Following lints have been considered and will not be enforced by this package:

Suppressing Lints

There are situations when you want to suppress a specific lint rule. You can suppress lints alone in your project on multiple levels. We will go through examples of how to suppress public_member_api_docs lint rule.

Note: this package provides linter rules corresponding to the guidelines in Effective Dart. That means we generally do not want to disable a rule in this package if it works properly. Yet, if you think some rule should be disabled by this package, open an issue.

Line Level

To suppress a specific lint rule on a line of code, you can put an ignore comment above the line of code:

// ignore: public_member_api_docs
class MyClass {}

File Level

To suppress a specific lint rule on a file, you can put an ignore_for_file comment to the file:

// ignore_for_file: public_member_api_docs

class MyClass {}

class MySecondClass {}

Project Level

To suppress a specific lint rule on a project, you can modify your analysis_options.yaml file:

include: package:effective_dart/analysis_options.yaml

linter:
  rules:
    public_member_api_docs: false

Badge

Show the world you're following Effective Dart โ†’ style: effective dart

[![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

License

Licensed under the MIT License.

effective_dart's People

Contributors

daniel-bd avatar leoafarias avatar tenhobi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.