feat: Introduce @remix-run/eslint-config package#357
Conversation
| TransitionRedirect | ||
| TransitionRedirect, | ||
| IDLE_FETCHER, | ||
| IDLE_TRANSITION |
There was a problem hiding this comment.
Consolidating duplicate import statements. Caught by using these new rules!
|
This is for remix source code or for remix apps? |
|
@ryanflorence Apps, though I used it for our source config as well mostly as a way to quickly test that everything works as expected. At the moment it's pretty limited in scope. What I envision is creating an additional package |
ab9dac4 to
172ecc9
Compare
| remixContext | ||
| ) { | ||
| let markup = renderToString( | ||
| const markup = renderToString( |
There was a problem hiding this comment.
Note: Automatic fix via eslint --fix
|
|
||
| // https://remix.run/api/app#links | ||
| export let links = () => { | ||
| export const links = () => { |
There was a problem hiding this comment.
Note: Automatic fix via eslint --fix
| // https://remix.run/api/conventions#catchboundary | ||
| export function CatchBoundary() { | ||
| let caught = useCatch(); | ||
| const caught = useCatch(); |
There was a problem hiding this comment.
Note: Automatic fix via eslint --fix
| import stylesUrl from "~/styles/demos/about.css"; | ||
|
|
||
| export let meta = () => { | ||
| export const meta = () => { |
There was a problem hiding this comment.
Note: Automatic fix via eslint --fix
| let formData = await request.formData(); | ||
| let answer = formData.get("answer"); | ||
| export const action = async ({ request }) => { | ||
| const formData = await request.formData(); |
There was a problem hiding this comment.
Note: Automatic fix via eslint --fix
| // passed to your loaders so you can look up data. | ||
| // - https://remix.run/api/conventions#loader-params | ||
| export let loader = async ({ params }) => { | ||
| export const loader = async ({ params }) => { |
There was a problem hiding this comment.
Note: Automatic fix via eslint --fix
This PR creates a new package for providing simple ESLint support for new Remix projects. The goal is to be as unopinionated as possible while enabling rules that either deal with bugs or optimization. Like the rules for
create-react-app, I also included an optional config for projects that use Jest.In general, these rules are even less opinionated than the
react-appconfig; we enable a subset of the rules they use and leave the rest up to users. Eventually I'd also like to create our own ESLint plugin that catches issues specific to Remix.I have not updated
create-remixto include this package/config by default, but would like to do that in a follow-up PR once this is merged.