-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support typescript configs using ts-node
#320
feat: support typescript configs using ts-node
#320
Conversation
For happy-path test I'd like to see new integration test. These tests create new configuration file and run production build using Currently each integration test creates new configuration file: eslint-remote-tester/test/utils.ts Line 73 in 1653eba
eslint-remote-tester/test/utils.ts Line 37 in 1653eba
These files are Javascript CommonJS modules: eslint-remote-tester/test/utils.ts Line 61 in 1653eba
I think we could pass a flag from + if(someOptionIndicatingTS) {
+ fs.writeFileSync(`${name}.ts`, `export default ${configText}`, 'utf8');
+ } else {
- fs.writeFileSync(name, `module.exports=${configText}`, 'utf8');
+ fs.writeFileSync(`${name}.js`, `module.exports=${configText}`, 'utf8');
+ } For error case testing I think the |
Thanks, looks good! I'll do some more manual testing later before merging this. Also some documentation updates to I just realized we'll need some changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll switch it to https://github.com/antfu/importx instead. |
@AriPerkkio it should be doable though I've not done it myself - |
Good point, install size of Looks like ESLint itself has chosen |
This should be all that's required to support typescript configs. This handles supporting explicit configs - I'll do a follow-up PR to allow the default config to be picked up if in TS.
@AriPerkkio could you give me some pointers on how you'd like to test this?
Closes #318