GithubHelp home page GithubHelp logo

Consider adding meta.schema about stylelint HOT 7 OPEN

MrHBS avatar MrHBS commented on June 18, 2024
Consider adding meta.schema

from stylelint.

Comments (7)

MrHBS avatar MrHBS commented on June 18, 2024 1

Sure. Here is an example of the schema of the accessor-pairs rule:

https://github.com/eslint/eslint/blob/1cbe1f6d38272784307c260f2375ab30e68716e8/lib/rules/accessor-pairs.js#L148-L165

And you can see here how ESLint validates the rule based on its schema.

Finally, an example of tools that utilize this schema: eslint-doc-generator and eslint-typegen.

from stylelint.

ybiquitous avatar ybiquitous commented on June 18, 2024

Sounds good 👍🏼

Maybe one downside is increasing a dependency that processes the JSON schema, right?

from stylelint.

MrHBS avatar MrHBS commented on June 18, 2024

Yeah, I believe ESLint uses Ajv JSON schema validator for this.

from stylelint.

ybiquitous avatar ybiquitous commented on June 18, 2024

Great. ajv is already included in our runtime dependency tree (stylelint depends on table).

$ npm ls ajv
[email protected] /Users/masafumi.koba/git/stylelint/stylelint
├─┬ [email protected]
│ ├─┬ @eslint/[email protected]
│ │ └── [email protected] deduped
│ └── [email protected]
└─┬ [email protected]
  └── [email protected]

from stylelint.

ybiquitous avatar ybiquitous commented on June 18, 2024

@MrHBS If you're interested, could you please show more specific idea to implement this feature so that others could image it easily?

from stylelint.

ybiquitous avatar ybiquitous commented on June 18, 2024

@MrHBS Thanks for the helpful info.

@ota-meshi Do you have any ideas to bring this feature from ESLint?

from stylelint.

Mouvedia avatar Mouvedia commented on June 18, 2024

Here's another use case for autocompletion: knowing the message arguments' names and positions.

from stylelint.

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.