JSPM

eslint-plugin-file-contains

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 186
  • Score
    100M100P100Q78410F
  • License MIT

ESLint rule for enforcing a string appears in multiple files as expected.

Package Exports

  • eslint-plugin-file-contains
  • eslint-plugin-file-contains/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-file-contains) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-plugin-file-contains

NPM Version NPM Downloads

ESLint rules for ensuring files have consistent usage of desired features. Allows you to enforce usage of imports across various file locations.

Installation

You'll first need to install ESLint:

npm install eslint --save-dev

Next, install eslint-plugin-file-contains:

npm install eslint-plugin-file-contains --save-dev

Usage

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

{
  "plugins": ["check-file"]
}

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

{
  "rules": {
    "file-contains/every-file-imports": [
      "error",
      {
        "**/*.test.{js,jsx,ts,tsx}": "jest-axe",
        "**/*.{jsx,tsx}": "react"
      }
    ]
  }
}

Supported Rules