Redux: Stop using babel-eslint

Created on 30 Mar 2016  Â·  27Comments  Â·  Source: reduxjs/redux

It is not necessary anymore.
We should migrate our source and examples to not use it.

examples infrastructure

All 27 comments

Lol yeah, that’s the one.

@gaearon how come it is not needed anymore?

From https://twitter.com/geteslint/status/714642903482564608:

The ESLint default parser natively supports ES2016, JSX, and object rest/spread. You don't need babel-eslint for any of that.

Awesome!
thank you @gaearon

@gaearon would this require an update to the eslint-config-rackt dependency? I couldn't find the repository hosted anywhere on GitHub. Looking at the installed eslint-config-rackt package though, I do see "parser": "babel-eslint", in index.js.

I'm working on this one, updating the rackt config to airbnb as this was requested somewhere already anyway, and eslint-config-rackt is not mainatined

Yea.

@gaearon do you have any preference for customizing eslint-config-airbnb? or just follow it as is? I will push WIP soon

What about semicolons? I couldn't care less about whether we use them or not but I'm concerned about the amount of work it would take to convert docs back. On the other hand any changes to style would require tweaking docs anyway.

Can we just use eslint --fix and write a script to run Markdown embedded snippets through it as well?

what about stuff like: vars-on-top, no-param-reassign?

Ugh. I guess we'll have to use a custom config. vars-on-top doesn't make sense to me.

same here. I would just make both of those disabled then. also I used eslint --fix before and it fixed semicolons.

@gaearon these (https://gist.github.com/knowbody/6a59ddbc1bbff7bfa43c731ca531d1b3) are all after the --fix let me know which ones should we exclude

Thank goodness. What do you think about a script that --fixes docs? Could be useful to other libs too.

I can hack something

but have a look at this https://github.com/eslint/eslint-plugin-markdown
I'll check if that works once I get home, on my phone now

Apart from vars-on-top, these look sensible to me.
We should also switch to using const (with let where needed).

Cool will send the PR soon

Ideally we should merge some hanging PRs before merging that. I haven’t had time to do that yet.

@gaearon what about react/prefer-stateless-function? this specifically touches the examples.

Ideally we should merge some hanging PRs before merging that. I haven’t had time to do that yet.

that's totally fine, I will make a WIP PR and we can update it once you have whatever you need merged

I’m good with using stateless functional components where possible

I submitted a PR that updates most of the examples to use functional
components several days ago.

On Wednesday, March 30, 2016, Dan Abramov [email protected] wrote:

I’m good with using stateless functional components where possible

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/reactjs/redux/issues/1554#issuecomment-203700218

oh, shame I didn't have a look... just pushed that change to my PR. But it doesn't matter, as @gaearon said we will probably merge some PRs before merging mine. So yours should be merged, thanks for your work @nickuraltsev !

You are welcome!

What is the status of this issue? Any help needed?

Since we're using eslint-config-react-app, it requires it as a peer dependency. If they drop using it in the future, we can do so here. For now, we're "stuck" using it (which is fine).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markerikson picture markerikson  Â·  51Comments

erikras picture erikras  Â·  63Comments

5h1rU picture 5h1rU  Â·  115Comments

timdorr picture timdorr  Â·  56Comments

bvaughn picture bvaughn  Â·  106Comments