Git Product home page Git Product logo

Comments (12)

Boshen avatar Boshen commented on May 18, 2024 1

Seems like bad-string-regex-arg not exist in Deepscan, is it bad-regexp-literal-in-string?

Oops, I combined these two:

since they are the same thing

from oxc.

Boshen avatar Boshen commented on May 18, 2024 1

@mysteryven You can also implement any deepscan rule that interest you 😁

from oxc.

mysteryven avatar mysteryven commented on May 18, 2024 1

@mysteryven thanks but, for example, I am not seeing deprecated rules like no-catch-shadow which are still supported by ESLint; It's probably a WIP/incomplete list.

Aha, the deprecated rules are folded, search the "Deprecated rules" and click the right arrow :)

CleanShot 2024-03-20 at 20 37 57@2x

from oxc.

jason89521 avatar jason89521 commented on May 18, 2024

May I pick some rules to implement?

from oxc.

Boshen avatar Boshen commented on May 18, 2024

Some interesting rules:

  • no-irregular-whitespace - we can use the lexer to store these inside trivias
  • no-unused-labels - build this inside the semantic analyzer
  • require-yield - inside the semantic analyzer, keep track of functions and then mark the function node with a NodeFlag::HasYield when we see a yield
  • bad-xxx - these are the rules from deepscan, you can find their descriptions here: https://deepscan.io/docs/rules/

from oxc.

YangchenYe323 avatar YangchenYe323 commented on May 18, 2024
  • require-yield - inside the semantic analyzer, keep track of functions and then mark the function node with a NodeFlag::HasYield when we see a yield

I just realized that if we have

var a = 1;
function *a() { return; }

The symbol table only stores the first var a = 1 declaration? Then it's not guaranteed we can check all the functions by just looking at the symbols.

from oxc.

Boshen avatar Boshen commented on May 18, 2024

The symbol table only stores

You visit the functions inside the linter, and then lookup the symbol via the node. But we need #225

Or we figure out all the edge cases for symbol declaration, which is really nasty ... I tried to follow TypeScript a while back, and I couldn't follow all the cases 😢

from oxc.

mysteryven avatar mysteryven commented on May 18, 2024

Seems like bad-string-regex-arg not exist in Deepscan, is it bad-regexp-literal-in-string?

from oxc.

Boshen avatar Boshen commented on May 18, 2024

I'm going to create another list for this.

from oxc.

Mouvedia avatar Mouvedia commented on May 18, 2024

Is there a list compiled of all the unimplemented ESLint rules?
Do I have compare the core rules with https://github.com/oxc-project/oxc/blob/main/crates/oxc_linter/src/rules.rs#L39?

from oxc.

mysteryven avatar mysteryven commented on May 18, 2024

Is there a list compiled of all the unimplemented ESLint rules? Do I have compare the core rules with main/crates/oxc_linter/src/rules.rs#L39?

This issue is a list of rule's implementation status : #479

from oxc.

Mouvedia avatar Mouvedia commented on May 18, 2024

@mysteryven thanks but, for example, I am not seeing deprecated rules like no-catch-shadow which are still supported by ESLint; It's probably a WIP/incomplete list.

from oxc.

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.