Giter VIP home page Giter VIP logo

Comments (10)

zimme avatar zimme commented on May 17, 2024 2

I'm thinking we should just be able to read the eslint config from prettier-eslint-cli and forward that to prettier-eslint to make sure this package doesn't try and read the options from the config file.

So this wasn't as easy as I thought as eslint seem to only have an api to get the config for a file, and we're accepting globs in prettier-eslint-cli. Memoizing seems like the most viable option.

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 17, 2024 1

Sounds fine

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 17, 2024

We could probably memoize the function (using fast-memoize) or lodash.memoize) on a per-directory basis. That could speed things up significantly...

from prettier-eslint.

zimme avatar zimme commented on May 17, 2024

I'm thinking we should just be able to read the eslint config from prettier-eslint-cli and forward that to prettier-eslint to make sure this package doesn't try and read the options from the config file. Thoughts?

For editors using this package, they should also be able to read settings from config file if present and forward that to this package to make sure this package doesn't try and read from the config file.

from prettier-eslint.

zimme avatar zimme commented on May 17, 2024

I'm looking into a different way of doing config resolving and merging which will involve the consumers of our api a bit more in the config decision process.

With this, I'm hoping that I can just use the given configs and only try and resolve configs when configs aren't provided in the api calls.

from prettier-eslint.

joaomilho avatar joaomilho commented on May 17, 2024

FYI, here's some stats from a project I'm running:

Rule                         | Time (ms) | Relative
:----------------------------|----------:|--------:
prettier/prettier            | 12538.062 |    59.6%
import/no-duplicates         |  3026.915 |    14.4%
no-unused-vars               |  1163.364 |     5.5%
react/prop-types             |   601.383 |     2.9%
react/no-unused-prop-types   |   452.671 |     2.2%
no-unmodified-loop-condition |   313.946 |     1.5%
camelcase                    |   258.667 |     1.2%
no-useless-return            |   165.710 |     0.8%
no-regex-spaces              |   159.656 |     0.8%
no-implied-eval              |   145.517 |     0.7%

Any improvement to prettier would give substantial gains. LMK how can I help.

from prettier-eslint.

zimme avatar zimme commented on May 17, 2024

I recently added functionality to filter out all rules that aren't marked as fixable before I hand eslint the rules. We should probably filter out prettier/prettier here too, as we have already run prettier before eslint, or will run prettier after eslint depending on prettierLast.

from prettier-eslint.

zimme avatar zimme commented on May 17, 2024

I've made the change and it will be out in 8.7.0, could you try again with the latest version @joaomilho?

from prettier-eslint.

github-actions avatar github-actions commented on May 17, 2024

Stale issue

from prettier-eslint.

osdiab avatar osdiab commented on May 17, 2024

Right now prettier is taking a lot of time on my builds - related issue in prettier-eslint-cli as well. Don't close please!

prettier/prettier-eslint-cli#89

from prettier-eslint.

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.