jenseng / eslint-plugin-remix-react-routes

Validate routes referenced by <Link> and friends in a Remix app
ISC License
36 stars 4 forks source link

Installation issues #13

Closed ryanflorence closed 1 year ago

ryanflorence commented 1 year ago

Not sure what I'm doing wrong but I did this:

npm install eslint-plugin-remix-react-routes --save-dev

And then edited my .eslintrc.js file created by the "just the basic" npx create-remix.

/** @type {import('eslint').Linter.Config} */
module.exports = {
  extends: [
    "@remix-run/eslint-config",
    "@remix-run/eslint-config/node",
    "plugin:remix-react-routes",
  ],
};

And I get this from eslint:

❯ eslint app

Oops! Something went wrong! :(

ESLint: 8.30.0

ESLint couldn't find the config "plugin:remix-react-routes/recommended" to extend from. Please check that the name of the config is correct.

The config "plugin:remix-react-routes/recommended" was referenced from the config file in "/Users/.../{project}/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

If remove the /recommended I get this:

Oops! Something went wrong! :(

ESLint: 8.30.0

"plugin:remix-react-routes" is invalid syntax for a config specifier.

* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "plugin:remix-react-routes/myConfig".
* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "remix-react-routes".

"plugin:remix-react-routes" was referenced from the config file in "/Users/.../{project}/.eslintrc.js".

Any idea what I'm doing wrong?

jenseng commented 1 year ago

I added the config and updated the readme the other day, but didn’t actually publish a new version 🤦‍♂️ … stand by 🤞

ryanflorence commented 1 year ago

haha, that's weird, normally it goes the other way!

jenseng commented 1 year ago

Alright give v1.0.5 a spin 🤞

jenseng commented 1 year ago

Note that it does need to be the name of the config, not just the plugin name, e.g. plugin:remix-react-routes/recommended e.g. as in this test