Coder Social home page Coder Social logo

Comments (8)

gandm avatar gandm commented on May 18, 2024

The plugin only runs when js files are in the Babel Source Path directory within a project directory. Isn't this good enough? If I do this then I have to traverse all the paths from source back to root looking for .babelrc files on every save.

from language-babel.

louisremi avatar louisremi commented on May 18, 2024

I'm not sure how other plugin creators have optimized their plugin to avoid frequent lookups. But having to modify settings to ignore or include all my present and future project isn't manageable.
.babelrc detection is much more convenient.

from language-babel.

gandm avatar gandm commented on May 18, 2024

Well I can't cache it as the editor may be open for long periods. I could easily put this in but I have to think about it.

You can add ignore/only regex or globs to .babelrc and this would do it. It is also standard babel practice. Any good?

What linters check for .babelrc?

from language-babel.

louisremi avatar louisremi commented on May 18, 2024

Creating a .babelrc in a project where I don't use es6 just so that the plugins ignore everything isn't convenient either.
Here's what linter-eslint package is doing: https://github.com/AtomLinter/linter-eslint/blob/master/lib/linter-eslint.coffee#L52

from language-babel.

gandm avatar gandm commented on May 18, 2024

Ok. They don't seem to check for babelrc, only the linter config file. I have meant to put a language-babel JSON config file that would be read from the project root that overrides the global language Babel settings. This would help. E.g. transpile on save could be overridden per project but the grammar is still active.

My other concern is js files that use Babel register and provide transpile options there.

Maybe I'll put a flag in that checks for babelrc as well as providing a project JSON file for project config settings.

from language-babel.

gandm avatar gandm commented on May 18, 2024

Just published 0.9.0. which has a new flag that suppresses transpile if no .babelrc is in any directory along source path.

from language-babel.

louisremi avatar louisremi commented on May 18, 2024

\o/ Yay you!

from language-babel.

gandm avatar gandm commented on May 18, 2024

Yeah but I just screwed the deprecation of some unused configs. Will have to pub another release!

from language-babel.

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.