Giter Club home page Giter Club logo

Comments (6)

lee-dohm avatar lee-dohm commented on June 11, 2024 2
  1. Create separate linting apps for different kinds of linting, ie standard-lint, eslint-lint, etc.

This is actually how the Atom community has solved it with the @AtomLinter org.

The @AtomLinter org contains a bunch of plugins for the https://atom.io/packages/linter Atom package. It works like this:

  1. The main linter package provides an API for plugins to conform to
  2. A plugin interfaces with a command-line tool which it runs when instructed, parses the output and returns the information through the API to the main package
  3. The main package visualizes the information it gets back from the plugin

What this means though is that each command-line tool has to be configured to run on the machine. This would be very daunting for something that you want to run on Heroku or Now if you want to support more than just JavaScript or Node. Using something like tree-sitter would solve that problem, but all that gives you is the general parsing framework and, over time, parsers for various languages. You would have to create the rules for each yourself.

from linter.

bkeepers avatar bkeepers commented on June 11, 2024

cc @lee-dohm because @AtomLinter and your experience with that community, and @maxbrunsfeld because @tree-sitter

I think since we're now supporting the use of standard for all plugins, this should at least have a standard option.

This app actually already uses standard because I assumed we'd switch to it eventually.t 😁

3. Create separate linting apps for different kinds of linting, ie standard-lint, eslint-lint, etc.

This is actually how the Atom community has solved it with the @AtomLinter org. I looked into ways of just reusing those Atom packages when I started working on this app, but they are very tightly coupled to Atom, and they all have lots of dependencies, which makes turning this into a service rather challenging.

Whats the best way to accomplish this?

Long term, I think the only sane way to do this without a lot of infrastructure and docker containers is to build a linter that is implemented entirely in one language (like JavaScript) that has a standardized way of declaring syntax rules for each language. tree-sitter is an ideal tool to build it with. This would be a huge effort.

from linter.

hiimbex avatar hiimbex commented on June 11, 2024

This app actually already uses standard...

Wow I did like several hours of development on this app, and I definitely knew it used standard given I used the standard docs as a basis for my implementation 😆

Still relevant the idea of supporting other linters lol

from linter.

bkeepers avatar bkeepers commented on June 11, 2024

You would have to create the rules for each yourself

And/or adapters for the linter it's emulating (like the yml config for rubocop).

from linter.

 avatar commented on June 11, 2024

I'm quite interested in this...but I wonder if something like LSP support would be needed for general usage.

from linter.

macklinu avatar macklinu commented on June 11, 2024

👋 I would love to help figure out how this Probot app can support multiple linters, as I would like to be able to use ESLint for linting a pull request.

from linter.

Related Issues (12)

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.