-
Notifications
You must be signed in to change notification settings - Fork 94
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
add tslint block #92
add tslint block #92
Conversation
Awesome! :) I am on a train right now and writing from my iPhone, but if I should forget to write a main contributors list please tell me. You are definitely on it 😉 |
Feel free to add the block to the list in the main README as well :) |
I applied two minor changes. Added an npm version badge (which will work as soon as it's published) and I replaced the |
Is the options plugin also working for webpack 1? Maybe I should add an e2e test |
I was going to write this just now 😉 Could you please use the And of course, the But that reminds me of something... I wanted to add the webpack version to the |
if we have the version we dont need to split, becaude then the object is dumped in the webpack config |
But for webpack 1.x we will need to add the tslint config directly to the webpack config object, for webpack 2 we need to use the |
the block yes, but thats simple |
I can do this when #96 is merged |
Sure, that would be the easiest solution :) We just have to add a peer dependency |
0853f18
to
a5e265a
Compare
I rebased on #96, but the tslint-loader does not complain even if it should (mixed semicolon style in app.ts). Works in both webpack version now |
c147e85
to
e684abd
Compare
The block is now completely working, you can test it by adding a semicolon in the app.ts of the end2end test. It will break the build |
b8d093e
to
09f5183
Compare
@andywer this should be finished now, can you take another look? |
I think this feature branch is quite broken... There are still some remains of code that is not part of the Have a look at the changes of |
You are right, one wrong commit sneaked in. I deleted it. |
loaders: [ 'tslint-loader' ] | ||
}) | ||
|
||
const module = context => (context.webpackVersion.major === 1 ? { |
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.
standard
usually requires you to put a single parameter of an arrow function into parenthesis. Maybe the linting of this code does not work? 🤔
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 remember putting a semicolon there, and it was cought. Can check later
const module = context => (context.webpackVersion.major === 1 ? { | ||
preLoaders: [ loader(context) ] | ||
} : { | ||
loaders: [ Object.assign({}, loader(context), { |
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.
Might be easier readable as loaders: [ loader(context, { enforce: 'pre' }) ]
. What do you think?
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.
(2nd param for loader()
, will be merged into the loader object using Object.assign()
)
I tested it, standard is indeed run on the index.js file. Adding a semicolon throws an error. |
Cool 👍 And I just recognized they relaxed the arrow-function-must-have-parenthesis rule in |
Just changed a line in favor of more consistent code style. We should stick to one style (single-param arrow functions have parenthesis or they don't) at least within the same file 😉 |
Ok |
Off-topic: Since you live in Munich... Do you know https://twitter.com/munichjs? :) |
No, but it looks very interesting, especially this meetup at the google office |
Yeah, the people attending it seemed quite interesting as well. Just stumbled across and thought you might have already been there. |
Published! |
yay 🎉 🎉 🎉 |
for all typescript linting needs :)