Coder Social home page Coder Social logo

bartlomieju / rslint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rslint/rslint

0.0 1.0 0.0 2.36 MB

A (WIP) Extremely fast JavaScript linter and Rust crate

Home Page: http://rslint.org

License: MIT License

Rust 98.44% JavaScript 0.71% Python 0.62% TypeScript 0.23%

rslint's Introduction

RSLint

A (WIP) JavaScript linter written in Rust designed to be as fast as possible, customizable, and easy to use.

User Documentation | Dev Documentation | Rustdoc Documentation | Website

Docs and Installation

Please see the website for installation instructions and documentation.

Currently known big issues

  • Optional chaining is not parsed correctly
  • Empty template literals panic
  • A lot of error recoveries do not work and result in infinite recursion

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Sponsors

Support this project with your organization. Your logo will show up here with a link to your website. [Become a sponsor]

Differences from other linters

Implemented

  • Unbeatably fast
  • Highly parallelized (files linted in parallel, rules run in parallel, nodes could be traversed in parallel in the future)
  • Rich, cross-platform, colored diagnostics with secondary labels, primary labels, and notes
  • Lossless untyped node and token driven linting allowing easy traversal of the syntax tree from any node
  • Automatic docgen for rule documentation removing the need for writing rustdoc docs and user facing docs
  • Distinctly grouped rules
  • Rule examples generated from tests
  • Easy macros for generating rule declarations and config fields
  • No need for dealing with script/module or ecma versions, linter deduces source type and assumes latest syntax
  • No need for a configuration file
  • Completely error tolerant and fast parser
  • Lossless tree used for stylistic linting
  • TOML config (json will be allowed too), (TOML implemented, json not yet)
  • Incremental reparsing and native file watching support (WIP, see #16)

Planned

  • Global config
  • SSR-like templates for node matching and autofix
  • Autofix without requiring reruns of all rules
  • WASM builds

Speed

RSLint is designed to be the fastest JavaScript linter ever made, it accomplishes this in various ways:

  • Using a custom fast parser which retains whitespace
  • Using a lookup table and trie based lexer for parsing
  • Using separate distinct threads for splitting up IO bound tasks such as loading files
  • Linting each file in parallel
  • Running each rule from every group in parallel over the concrete syntax tree
  • (WIP) linting each untyped node in parallel
  • (WIP) Incrementaly reparsing and relinting files
  • (WIP) Having native file watching support using incremental parsing

Roadmap

RSLint's goal is to provide extremely fast and user friendly linting for the whole js ecosystem. There are tons of things to do to bring it up to par with existing linters. This is a list of planned features and things to do ranked in order of highest to lowest priority (this is by no definition final, things will change):

  • Scope analysis (WIP)
  • Tests for parser, including test262
  • Implementation of ESLint reccomended rules
  • Benchmarks
  • Markdown support
  • Config files (partially done)
  • Rule options
  • Prebuilt binary generation
  • Npm package (needs a build script to pull a prebuilt binary)
  • JSX Support
  • TS Support
  • Autofix (#45)
  • JS Plugins
  • WASM Plugins
  • Documentation website

License

This project is Licensed under the MIT license.

rslint's People

Contributors

kixiron avatar magurotuna avatar nicholas-baron avatar rdambrosio016 avatar sburris0 avatar silvanshade avatar stupremee avatar tatekennington avatar

Watchers

 avatar

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.