eslint-plugin-import-css-path

A lightweight fork of eslint-plugin-require-path-exists that only checks CSS files.

Usage no npm install needed!

<script type="module">
  import eslintPluginImportCssPath from 'https://cdn.skypack.dev/eslint-plugin-import-css-path';
</script>

README

eslint-plugin-import-css-path

A lightweight fork of eslint-plugin-require-path-exists that only checks CSS files.

  • Only checks CSS files
  • Import path must include file extension
  • Zero dependencies

Usage

  1. Install eslint-plugin-require-path-exists as a dev-dependency:
npm install --save-dev eslint-plugin-import-css-path
  1. Enable the plugin by adding it to the plugins and start from default (recommended) configuration in extends in .eslintrc:
{
  "extends": [
    "plugin:import-css-path/recommended"
  ]
}

Rules

Name Description Default Configuration
import-css-path/exists You should only import CSS paths that exist [ "error" ]

License

MIT