You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the code in this repository is written in JavaScript and TypeScript. I think it would be a good idea to convert the code to TypeScript completely. This would make the code more maintainable and easier to understand.
In addition, if the type definition of the configuration object, to be defined in the .schemalintrc.js file,
is exported as a part of the npm package, users can use it via JSDoc import types when writing their own config file in JavaScript.
If this proposal is acceptable, I would like to work on it.
Related issues
I found some past issues that tried to convert the JavaScript to TypeScript, but they seem to have been abandoned.
Since the code written in JavaScript is well-structured, it should be easy to convert it to TypeScript. My only concern is that the test cases written in JavaScript (nameCasing.test.js and nameInflection.test.js) use test.each function that takes a template string table as an argument, which leads to many anys when converted to TypeScript. Let me confirm, is there any problem with converting the template string table into an array of objects?
The text was updated successfully, but these errors were encountered:
Yes, this would be nice. It would also be nice to allow people writing rules and configuration in TS (people have requested that for Kanel as well), but that's a bit of a bigger step. Feel free to make this conversion if you please!
@kristiandupont Thank you for the response. Yes, it would be nice to allow users to write rules and configuration in TypeScript. However, even if it remains in JavaScript, I believe that by providing type information, users can develop efficiently with editors that support TypeScript.
An example usage of the type information is as follows:
Motivation
Currently, the code in this repository is written in JavaScript and TypeScript. I think it would be a good idea to convert the code to TypeScript completely. This would make the code more maintainable and easier to understand.
In addition, if the type definition of the configuration object, to be defined in the
.schemalintrc.js
file,is exported as a part of the npm package, users can use it via JSDoc import types when writing their own config file in JavaScript.
If this proposal is acceptable, I would like to work on it.
Related issues
I found some past issues that tried to convert the JavaScript to TypeScript, but they seem to have been abandoned.
Concern
Since the code written in JavaScript is well-structured, it should be easy to convert it to TypeScript. My only concern is that the test cases written in JavaScript (nameCasing.test.js and nameInflection.test.js) use
test.each
function that takes a template string table as an argument, which leads to manyany
s when converted to TypeScript. Let me confirm, is there any problem with converting the template string table into an array of objects?The text was updated successfully, but these errors were encountered: