Skip to content

L2HYUNN/eslint-plugin-auto-js-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-auto-js-extension

An ESLint plugin for auto js extension

Installation

Prerequisites: ESLint v9.

npm install eslint eslint-plugin-auto-js-extension --save-dev

or

npm install eslint@8.57.0 eslint-plugin-auto-js-extension --save-dev

Usage

ESLint v9 uses a Flat config file format with filename eslint.config.*js by default. For instructions on using a deprecated eslintrc-type config file from previous ESLint versions, please refer to the below instructions.

To set up a flat configuration, add a file eslint.config.mjs to the root directory of your project and include the following instructions to import the available flat configurations using:

import eslintPluginAutoJsExtension from "eslint-plugin-auto-js-extension";

💼 Configurations enabled in.\

Name Description 💼
auto-js-extension Ensure all JavaScript files have a .js extension 💼

Usage examples

Flat config

// eslint.config.mjs
import eslintPluginAutoJsExtension from "eslint-plugin-auto-js-extension";

export default [
  {
    ignores: ["eslint.config.mjs"],
  },
  {
    plugins: { eslintPluginAutoJsExtension },
    rules: {
      "eslintPluginAutoJsExtension/auto-js-extension": "error",
    },
  },
];

Deprecated config

// .eslintrc.json
{
  "plugins": ["auto-js-extension"],
  "rules": {
    "auto-js-extension/auto-js-extension": "error"
  }
}

About

eslint plugin for auto js extension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published