Skip to content

ESLint plugin that provides a rule to enforce extensions on imports.

License

Notifications You must be signed in to change notification settings

skyrpex/cloudy-ts-eslint-plugin

Repository files navigation

@cloudy-ts/eslint-plugin

ESLint plugin that provides a rule to enforce explicit .js or .json extensions on imports.

NPM version NPM downloads Build status

Installation

yarn add @cloudy-ts/eslint-plugin -D

Usage

Extend from the recommended configuration in your ESLint configuration file (ie, in your package.json file):

{
  "name": "my-awesome-project",
  "eslintConfig": {
    "extends": "plugin:@cloudy-ts/recommended"
  }
}

Rules

Each rule has emojis denoting:

  • ✅ if it belongs to the recommended configuration
  • 🔧 if some problems reported by the rule are automatically fixable by the --fix command line option
  • 💡 if some problems reported by the rule are manually fixable by editor suggestions
Name                                         Description 🔧 💡
extensions Enforce import and export file extensions. 🔧 💡

Motivation