Skip to content

This is me trying to contribute back to the remix community, here you can find a very basic and simple eslint plugin for the remix framework.

Notifications You must be signed in to change notification settings

AlonGvili/eslint-plugin-remix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-remix

Very simple eslint plugin for Remix.run framework, this plugin check that you don't forget to export route functions like loader, action, meta, links

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @alongvili/eslint-plugin-remix:

npm install @alongvili/eslint-plugin-remix --save-dev

Usage

Add remix to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@alongvili/remix"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "@alongvili/remix/route-loader-exported": 2,
        "@alongvili/remix/route-action-exported": 2,
        "@alongvili/remix/route-links-exported": 2,
        "@alongvili/remix/route-meta-exported": 2,
    }
}

Supported Rules

route-loader-exported Check if a route has a loader function and it is exported

route-action-exported Check if a route has an action function and it is exported

route-links-exported Check if a route has a links function and it is exported

route-meta-exported Check if a route has a meta function and it is exported

About

This is me trying to contribute back to the remix community, here you can find a very basic and simple eslint plugin for the remix framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published