Skip to content

ESLint Plugin to prevent extensions of filenames while requiring local modules

License

Notifications You must be signed in to change notification settings

rchougule/eslint-plugin-avoid-explicit-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-avoid-explicit-extension

Prevention of explicit mention of extensions while requiring files.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-avoid-explicit-extension:

$ npm install eslint-plugin-avoid-explicit-extension --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-avoid-explicit-extension globally.

Usage

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

{
    "plugins": [
        "avoid-explicit-extension"
    ]
}

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

{
    "rules": {
        "avoid-explicit-extension/no-js-ext": "error"
    }
}

Supported Rules

About

ESLint Plugin to prevent extensions of filenames while requiring local modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published