eslint-plugin-tss-unused-makestyles

0.0.1 • Public • Published

Detect unused tss-react makestyles

This eslint plugin lets you detect unused tss-react makestyles:

Usage

  1. Add the dependency:
yarn add --dev eslint-plugin-tss-unused-makestyles
  1. Enable it in you ESLint config

Case 1: You are in a create-react-app project:
Edit your package.json:

{
  //...
  "eslintConfig": {
    "plugins": [
      //...
      "tss-unused-makestyles"
    ],
    "rules": {
      "tss-unused-makestyles/unused-makestyles": "warn"
    }
  }
  //...
}

Example projet

Case 2: You have installed ESLint manually:
Edit your .eslintrc.js file:

module.exports = {
  // ...
  plugins: [
    // ...
    "tss-unused-makestyles",
  ],
  rules: {
    // ...
    "tss-unused-makestyles/unused-makestyles": "warn",
  },
};

Disabling warnings

In case of false positive, disabling the warning:

  • For a line: // eslint-disable-next-line tss-unused-makestyles/unused-makestyles
  • For the entire file: // eslint-disable-next-line tss-unused-makestyles/unused-makestyles

Package Sidebar

Install

npm i eslint-plugin-tss-unused-makestyles

Weekly Downloads

6

Version

0.0.1

License

MIT

Unpacked Size

9.56 kB

Total Files

7

Last publish

Collaborators

  • rodeyseijkens