-
Notifications
You must be signed in to change notification settings - Fork 6
Add support for TSLint #13
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
Comments
Thanks for the kind words! I've enjoyed using this project in a lot of the work I do. I like your idea, I think something like this would be good: const {
rewireWebpack: rewireTypescript,
rewireJest: rewireTypescriptJest,
rewireTSLint
} = require("react-app-rewire-typescript-babel-preset");
module.exports = {
webpack: function(config, env) {
let rewiredConfig = config;
rewiredConfig = rewireTypescript(rewiredConfig);
rewiredConfig = rewireTSLint(rewiredConfig, ...); // accept an optional second options parameter here to pass along to tslint-loader
return rewiredConfig;
},
jest: function(config) {
return rewireTypescriptJest(config);
}
}; The What do you think? If you get this working, I'll be happy to merge it in! |
I was thinking along those lines! We have at least 2 good options here: Use
|
My current work flow is this:
For the I think the value we would be adding with this would be integration with the Webpack error page. If the user isn't interested in having the errors displayed in the browser during development, they can instead invoke TSLint through a script or integrate tslint into a If you pass along the I think the only scenario that requires changes on the part of the rewire is the one where we add tslint-loader support. Because we'll be offering it as a separate rewire, the behavior will be opt-in. |
Pardon the close/reopen, fat fingered on mobile. :p |
Uh oh!
There was an error while loading. Please reload this page.
I wanted to start the conversation to see if there's interest in supporting TSLint within this package. With the addition of TSLint I think this package would be a great solution for the majority of users whom want to use CRA, but wish to have TypeScript support, without having to use a forked version of CRA such as https://github.com/wmonk/create-react-app-typescript/.
Alternatively I could publish the TSLint support as separate package that would work nicely with this one.
I'd be happy to help contribute if there's interest!
The text was updated successfully, but these errors were encountered: