Giter Club home page Giter Club logo

Comments (8)

lrhn avatar lrhn commented on August 16, 2024 3

If we intend the file to be public, I'll recommend adding a version number to the format, so that we can change the format in the future, and told depending on the file can tell that they're not compatible with the new format.

If the file is not intended to be public, consider adding a notice, maybe:

{
  "_NOTICE:_": "This file is for internal use by the SDK. Format may change without notice.",
  "lints": ... current content ...
}

(Oh why does JSON not have comments!)

from sdk.

parlough avatar parlough commented on August 16, 2024 2

@parlough: do we have a copy of rules.json somewhere on dart.dev or am I mis-remembering?

Not directly hosted on the site, but it's mirrored at https://github.com/dart-lang/site-www/blob/main/src/_data/linter_rules.json and used to generate the the linter rule docs that are indexed at https://dart.dev/tools/linter-rules#rules.

I don't think we intend for it to be public

Originally it was. The impetus was a tool csells built. I expect it's no longer being maintained but it's possible there are others. Parker may know more...

Currently the machine/rules.json file has no versioning strategy and its current form will likely be retired soon as we introduce new documentation for choosing lints (dart-lang/site-www#4499, dart-lang/site-www#4498). So keeping that in mind, I'd say it's best to consider the current file as not public.

The final form of its replacement hasn't been decided yet, but I'll update here when it is ready and will keep in mind the use cases outlined here as well as any potential versioning concerns.

from sdk.

pq avatar pq commented on August 16, 2024 1

@parlough: do we have a copy of rules.json somewhere on dart.dev or am I mis-remembering?

I don't think we intend for it to be public

Originally it was. The impetus was a tool @csells built. I expect it's no longer being maintained but it's possible there are others. Parker may know more...

from sdk.

srawlins avatar srawlins commented on August 16, 2024 1

Oh very cool! In that case I like the versioning suggestion.

from sdk.

csells avatar csells commented on August 16, 2024 1

I believe this rules.json file is being used by @gaetschwartz to produce the all_lint_rules_community package. Does the Dart team produce an alternative? I absolutely love having all of the lint rules turned on by default, with some that I turn off. I catch so many problems in my code doing that.

from sdk.

pq avatar pq commented on August 16, 2024

/fyi @parlough

from sdk.

srawlins avatar srawlins commented on August 16, 2024

I don't think we intend for it to be public, or to have to consider versioning or consider any change to it a "breaking" change.

from sdk.

pq avatar pq commented on August 16, 2024

Thanks @parlough!

from sdk.

Related Issues (20)

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.