Hey, I want to create a rule about if new files are created make sure they are in TS. How would I go about doing that?
I am facing this issue because my codebase is half in JS and half in TS and we aren't looking to migrating everything just yet. We just want to make sure new files are created in TS.
Hi Devjyoti! The first thing I would do is to create a rule that throws a warning for every .js file in the repo.
The next thing is to find out if there is a way to create a rule that:
takes a number as an argument which represents the cap of .js files in the project.
counts the total number of .js files and compares it with the argument. If it is greater than the argument, throw an error.
Another possible solution is to use the first rule I mentioned paired with the eslint.org/docs/user-guide/command... option and allow warnings until it reaches the .js file number cap
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey, I want to create a rule about if new files are created make sure they are in TS. How would I go about doing that?
I am facing this issue because my codebase is half in JS and half in TS and we aren't looking to migrating everything just yet. We just want to make sure new files are created in TS.
Hi Devjyoti! The first thing I would do is to create a rule that throws a warning for every .js file in the repo.
The next thing is to find out if there is a way to create a rule that:
.jsfiles in the project..jsfiles and compares it with the argument. If it is greater than the argument, throw an error.Another possible solution is to use the first rule I mentioned paired with the eslint.org/docs/user-guide/command... option and allow warnings until it reaches the
.jsfile number cap