Giter Site home page Giter Site logo

Comments (10)

phosphore avatar phosphore commented on May 18, 2024 2

My bad, we use both Esprima and Babel, eslintrc is instead used for ESLintTraverser (for AST parsing). Babel's plugins should be set in:

parseBabel(content) {
let plugins = [
"jsx",
"objectRestSpread",
"classProperties",
"optionalCatchBinding",
"asyncGenerators",
"decorators-legacy",
"flow",
"dynamicImport",
"estree",
];

from electronegativity.

phosphore avatar phosphore commented on May 18, 2024 1

You may want to try to install the Babel's optionalChaining experimental plugin and add it to the Electronegativity's.eslintrc.json file. In Electronegativity, parsers are not that configurable per-se (I can only think about this .eslintrc.json file and maybe some options where they are instantiated), so I'm afraid that if the above doesn't work you'll need to actually edit Electronegativity's/Babel's plugin source to achieve that.

from electronegativity.

Nantris avatar Nantris commented on May 18, 2024 1

That's a huge help! Thanks so much!

I'll mark this as unread and when I get a chance to look into this further I'll report back.

from electronegativity.

robotickamote avatar robotickamote commented on May 18, 2024 1

Hi Guys, any news on this issue?

from electronegativity.

bchurchill avatar bchurchill commented on May 18, 2024 1

I'm thinking about adding a command line option to specify additional parser plugins. That way plugins can be specified at run time, or by using the programmatic interface.

from electronegativity.

tessro avatar tessro commented on May 18, 2024 1

We're eager to adopt electronegativity – are you planning to release a version with this feature?

from electronegativity.

Nantris avatar Nantris commented on May 18, 2024

Thanks for your reply @phosphore!

That's an interesting idea that I'll look into. Did you mean the .babelrc file though? Or does Electronegativity's parsing somehow rely on .eslintrc.json?

from electronegativity.

phosphore avatar phosphore commented on May 18, 2024

Sorry about the delay merging this! Now 2d2cc9b is in master!

from electronegativity.

phosphore avatar phosphore commented on May 18, 2024

I'll be working on the repository this incoming week and I'll release a new minor before EOW!

from electronegativity.

tessro avatar tessro commented on May 18, 2024

Amazing, thank you!!

from electronegativity.

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.