pugjs / pug-lint

An unopinionated and configurable linter and style checker for Pug
ISC License
228 stars 51 forks source link

Adds schema for better IDE completion, docs, and Intellisense #121

Closed cspotcode closed 7 years ago

cspotcode commented 7 years ago

This PR adds a JSON schema for pug-lintrc files. The goal is to enable great code-completion and documentation within an editor or IDE. Here's an example of this in Visual Studio Code:

screen shot 2016-11-18 at 2 22 10 am screen shot 2016-11-18 at 2 21 49 am

This is using a version of VSCode's puglint extension that's been modified to declare this JSON schema should be used for .pug-lint.json files. It's a 4-line declaration in package.json. After that, the schema and VSCode do all the work. Other editors probably support something similar.

Let me know if you have any questions!

mrmlnc commented 7 years ago

I think that the scheme should be and here: https://github.com/schemastore/schemastore/ 😃

codecov-io commented 7 years ago

Current coverage is 100% (diff: 100%)

Merging #121 into master will not change coverage

@@           master   #121   diff @@
====================================
  Files          49     49          
  Lines         915    915          
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
  Hits          915    915          
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update eb60b36...263c97c

cspotcode commented 7 years ago

The schema can be listed there, yes, but I think it should be generated here. Otherwise it won't be kept in sync with new rules and updated documentation.

schemastore.org can reference schemas that are hosted elsewhere. (for example)

mrmlnc commented 7 years ago

🏓 to @benedfit @TimothyGu 😄