
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
eslint-plugin-remix-react-routes
Advanced tools
Validate routes referenced by <Link> and friends in a Remix app
Validate routes referenced by <Link>
and friends in a Remix app.
Remix apps generally have ESLint pre-configured, but if not you'll want to set it up:
npm i eslint --save-dev
Next, install eslint-plugin-remix-react-routes
:
npm install eslint-plugin-remix-react-routes --save-dev
If your app uses TypeScript, you're encouraged to also configure typed linting (and set up typescript-eslint
while you're at it!). This allows the plugin to fully leverage the type system when evaluating route expressions. To enable typed linting:
npm install @typescript-eslint/parser --save-dev
And add something along these lines to your .eslintrc.js
:
module.exports = {
// ...
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
};
Most apps should extend from one of the following configurations:
recommended
: Recommended route rules that you can drop in to a Remix project.strict
: Like recommended
, but more strict and opinionated.Add something like this to your .eslintrc.js
:
module.exports = {
// ...
extends: [
// ...
"plugin:remix-react-routes/recommended",
],
};
You can also override any config rules to meet your needs:
module.exports = {
// ...
rules: {
// ...
"remix-react-routes/no-relative-paths": [
// downgrade to a warning
"warn",
// enable this check in route components
{ enforceInRouteComponents: true },
],
},
};
<Link to>
rather than <a href>
<Link>
and friends point to actual routes in the app<Link>
and friends use absolute paths<Link>
and friends use paths rather than URLsFAQs
Validate routes referenced by <Link> and friends in a Remix app
The npm package eslint-plugin-remix-react-routes receives a total of 4,504 weekly downloads. As such, eslint-plugin-remix-react-routes popularity was classified as popular.
We found that eslint-plugin-remix-react-routes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.