Coder Social home page Coder Social logo

Comments (7)

ljosberinn avatar ljosberinn commented on June 9, 2024 1

ah I believe that actually just needs an additional flag, let me introduce that

from eslint-config-galex.

ljosberinn avatar ljosberinn commented on June 9, 2024 1

should be fixed with enableJavaScriptSpecificRulesInTypeScriptProject in the next release I hope :) docs included https://github.com/ljosberinn/eslint-config-galex#features

from eslint-config-galex.

ljosberinn avatar ljosberinn commented on June 9, 2024

great idea, yeah!

would need to extract:

  • createPossibleErrorRules -> typescript
  • createBestPractices -> typescript
  • createVariableRules -> typescript
  • createStylisticIssuesRules -> typescript, CRA, Next
  • createES6Rules -> typescript

from eslint-config-galex.

ljosberinn avatar ljosberinn commented on June 9, 2024

should be fixed with the next release, lmk :)

from eslint-config-galex.

axelboc avatar axelboc commented on June 9, 2024

Hmm, it seems that the new behaviour is not quite what I expected since my JS files are still not fully linted. They do get fully linted if I enable checkJs, but as mentioned, this is not doable in my project.

The error is mine: checkJs has nothing to do with the issue at hand. Obviously, ESLint only cares about the *.ts glob! It doesn't magically apply the TS override to JS files when checkJs is enabled... Silly me! 😓

So I think the solution is for the new override that disables rules with TS equivalents to only ever apply to TS files -- never to JS files, regardless of checkJs.

If this leads to too many errors in a legacy project, then this is a good use case for your incrementalAdoption feature (which I haven't had time to look into yet but sounds very promising).

from eslint-config-galex.

axelboc avatar axelboc commented on June 9, 2024

I've just upgraded, and it works great, thanks a lot! 🎉

from eslint-config-galex.

axelboc avatar axelboc commented on June 9, 2024

As a side benefit, it now also fully lints all the .eslintrc.js, vite.config.js and other jest.config.js files in my monorepo 😄

from eslint-config-galex.

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.