eslint-plugin-check-import-naming
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

eslint-plugin-check-import-naming

What's this?

This is an package with eslint plugin that allows keep logical block in component in defined order. Triggers when useEffect expression exist.

How to use

Add this code into your eslint config in rules section:

{
  "plugins": [
    "check-import-naming"
  ],
  "rules": {
    "check-import-naming/import-naming": [
      "error",
      {
        "startsWith": "Icon",
        "endsWith": ".svg",
      }
    ]
  }
}

Example

With "startWith" === "Icon" and "endsWith" === ".svg"

Valid code:

import IconLogin from 'assets/login.svg'

Invalid code:

import Login from 'assets/login.svg'

Why invalid?

Cause 'Login' missed 'Icon', so 'IconLogin' is valid

Package Sidebar

Install

npm i eslint-plugin-check-import-naming

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

10.3 kB

Total Files

18

Last publish

Collaborators

  • kugichka