{"id":13554050,"url":"https://github.com/passsy/dart-lint","last_synced_at":"2025-05-15T06:04:26.918Z","repository":{"id":43147964,"uuid":"208786943","full_name":"passsy/dart-lint","owner":"passsy","description":"An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter","archived":false,"fork":false,"pushed_at":"2025-02-24T02:17:53.000Z","size":505,"stargazers_count":276,"open_issues_count":15,"forks_count":82,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T10:09:58.757Z","etag":null,"topics":["dart","flutter","hacktoberfest","lint","lint-rule"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/passsy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["passsy"]}},"created_at":"2019-09-16T11:50:30.000Z","updated_at":"2025-02-24T02:17:57.000Z","dependencies_parsed_at":"2024-01-07T01:18:29.861Z","dependency_job_id":"eba04721-43a9-47b4-9b39-679e3a50b536","html_url":"https://github.com/passsy/dart-lint","commit_stats":{"total_commits":157,"total_committers":8,"mean_commits":19.625,"dds":0.0573248407643312,"last_synced_commit":"f457981ab60e432eb71e54c7eb5a8ba07d1ee556"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passsy%2Fdart-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passsy%2Fdart-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passsy%2Fdart-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passsy%2Fdart-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passsy","download_url":"https://codeload.github.com/passsy/dart-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254283337,"owners_count":22045140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","hacktoberfest","lint","lint-rule"],"created_at":"2024-08-01T12:02:38.687Z","updated_at":"2025-05-15T06:04:26.900Z","avatar_url":"https://github.com/passsy.png","language":null,"funding_links":["https://github.com/sponsors/passsy"],"categories":["Utilities","Others","Programming Languages"],"sub_categories":["Code analyzers"],"readme":"[![Pub](https://img.shields.io/pub/v/lint.svg)](https://pub.dartlang.org/packages/lint) \n[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)\n\n# Lint for Dart/Flutter\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/1096485/66209493-bc0ec900-e6b7-11e9-80c6-222e778f0c8d.png\"\u003e\n\u003c/p\u003e\n\n`lint` is a hand-picked, open-source, community-driven collection of lint rules for Dart and Flutter projects.\nThe set of rules follows the [Effective Dart: Style Guide](https://dart.dev/guides/language/effective-dart/style).\n\nThis package can be used as a replacement for [`package:lints`](https://pub.dev/packages/lints) or the discontinued [`package:pedantic`](https://github.com/dart-lang/pedantic) for those who prefer stricter rules.\n\n`lint` supports 3 different set of rules:\n- `strict`: tries to be strict but not annoying. Perfect for production app code\n- `casual`: great when prototyping, to be used in code samples, any non-production code\n- `package`: like `strict` but for dart packages, that have a public API \n\n## Install\n\nAdd `lint` as dependency to your `pubspec.yaml`. Version `^1.0.0` means you're automatically getting the latest version for `lint` when running `pub upgrade`\n```yaml\ndev_dependencies:\n  lint: ^2.0.0\n```\n\nCreate an `analysis_options.yaml` file in the root of your project with the following content:\n\n```yaml\n# This file configures the analyzer to use the lint rule set from `package:lint`\n\ninclude: package:lint/strict.yaml # For production apps\n# include: package:lint/casual.yaml # For code samples, hackathons and other non-production code\n# include: package:lint/package.yaml # Use this for packages with public API\n\n\n# You might want to exclude auto-generated files from dart analysis\nanalyzer:\n  exclude:\n    #- '**.freezed.dart'\n    #- '**.g.dart'\n\n# You can customize the lint rules set to your own liking. A list of all rules\n# can be found at https://dart.dev/tools/linter-rules\nlinter:\n  rules:\n    # Util classes are awesome!\n    # avoid_classes_with_only_static_members: false\n    \n    # Make constructors the first thing in every class\n    # sort_constructors_first: true\n\n    # Choose wisely, but you don't have to\n    # prefer_double_quotes: true\n    # prefer_single_quotes: true\n```\n\n## Lint badge\n\nYou're using lint in your open-source project? \nAdd the badge to your `README.md` show that you honor strict lint rules\n\n\n[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)\n```md\n[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)\n```\n\n## Comparison with other lint packages\n\nA detailed comparison of all linting packages for dart can be found at https://rydmike.com/blog_flutter_linting.html\n\n`lint` is among the strictest but not the strictest. It tires to find the right balance between useful and annoying.\n\n## Which version to use?\n\nGenerally, you can just put `lint: ^2.0.0` in your `pubspec.yaml` and pub get the latest version compatible with your Dart version.\n\n| Dart Version | Lint Version                                                        |\n|--------------|---------------------------------------------------------------------|\n| `3.7`        | [`2.8.0`](https://pub.dev/packages/lint/versions/2.8.0/changelog)   |\n| `3.6`        | [`2.7.0`](https://pub.dev/packages/lint/versions/2.7.0/changelog)   |\n| `3.5`        | [`2.6.1`](https://pub.dev/packages/lint/versions/2.6.1/changelog)   |\n| `3.4`        | [`2.5.0`](https://pub.dev/packages/lint/versions/2.5.0/changelog)   |\n| `3.3`        | [`2.4.0`](https://pub.dev/packages/lint/versions/2.4.0/changelog)   |\n| `3.2`        | [`2.3.0`](https://pub.dev/packages/lint/versions/2.3.0/changelog)   |\n| `3.1`        | [`2.2.0`](https://pub.dev/packages/lint/versions/2.2.0/changelog)   |\n| `3.0`        | [`2.1.0`](https://pub.dev/packages/lint/versions/2.1.0/changelog)   |\n| `2.18`       | [`2.0.0`](https://pub.dev/packages/lint/versions/2.0.0/changelog)   |\n| `2.17`       | [`1.10.0`](https://pub.dev/packages/lint/versions/1.10.0/changelog) |\n| `2.16`       | [`1.9.0`](https://pub.dev/packages/lint/versions/1.9.0/changelog)   |\n| `2.15`       | [`1.8.0`](https://pub.dev/packages/lint/versions/1.8.0/changelog)   |\n| `2.14`       | [`1.7.0`](https://pub.dev/packages/lint/versions/1.7.0/changelog)   |\n| `2.13`       | [`1.6.0`](https://pub.dev/packages/lint/versions/1.6.0/changelog)   |\n| `2.12`       | [`1.5.0`](https://pub.dev/packages/lint/versions/1.5.0/changelog)   |\n    \n\n## Comparison to discontinued package:pedantic\n\nGoogle publicly shares their internal rules as `package:pedantic` in open-source.\nIt represents what Google is enforcing internally throughout all Dart code.\nFor a lint rule to be added to pedantic, Google has to change all code which doesn't follow the style.\n\nThis strict practice results in only 27/150+ rules to be enabled.\nWhile some are contradictory to each other and can not enabled together, a big chunk of rules isn't enabled because it requires too much work to update all of Googles existing code.\n\nFor developers outside Google, it is the norm to have separate lint rules per project.\nOne project might enable more rules then others.\n\n`lint` enables a majority of lint rules, leaving out contradictory and very opinionated rules.\n \n## License\n\n```\nCopyright 2022 Pascal Welsch\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasssy%2Fdart-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasssy%2Fdart-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasssy%2Fdart-lint/lists"}