eslint-plugin-remix
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

eslint-plugin-remix

An ESLint plugin for Remix

Installing

  1. Firstly, install the dependency with Yarn yarn add eslint-plugin-remix --dev or with npm npm install eslint-plugin-remix --save-dev.
  2. Add remix to your plugins array in your eslint configuration file.
  3. Enable rules by writing "remix/<rule-name>": "error" in your eslint configuration file.

Rules:

node-server-imports:

Ensures that all imports for known node builtins are only ever used in .server.ts files.

use-loader-data-types:

When using TypeScript, this rule ensures that useLoaderData is passed a generic type of the loader function to explicitly declare what it returns. It is recommended you use this with eslint-plugin-react-hooks.

export const loader = ...;

export default function Home() {
  // Ensures that `<typeof loader>` exists here
  const data = useLoaderData<typeof loader>();
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    754
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    754
  • 1.1.0
    0
  • 1.0.1
    25
  • 1.0.0
    0

Package Sidebar

Install

npm i eslint-plugin-remix

Weekly Downloads

644

Version

1.1.1

License

MIT

Unpacked Size

12.9 kB

Total Files

5

Last publish

Collaborators

  • aabbccsmith