1.0.5 • Published 9 months ago

eslint-plugin-no-scrollbar v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

eslint-plugin-no-scrollbar

An ESLint plugin that detects the use of '::webkit-scrollbar' and suggests using 'data-no-scrollbar' instead.

Installation

To use this ESLint plugin, you need to have ESLint already installed. If not, you can install it using:

npm install eslint --save-dev

Next, you can install the eslint-plugin-no-scrollbar plugin:

npm install eslint-plugin-no-scrollbar --save-dev

Configuration

In your ESLint configuration (.eslintrc.js), add the plugin and enable the rule:

module.exports = {
  plugins: ["eslint-plugin-no-scrollbar"],
  rules: {
    "no-scrollbar": "error",
  },
};

Rules

no-scrollbar

This rule detects the use of '::webkit-scrollbar' and suggests using '[data-no-scrollbar]' instead.

Examples of valid code:

const useStyles = () => ({
  content: {},
});

Examples of invalid code:

const useStyles = () => ({
  "::-webkit-scrollbar": {},
});

Testing

To run the tests for this plugin, make sure you have Node.js and npm installed, then run:

npm test

The tests use Jest to validate the correctness of the ESLint rule implementation.

Contributing

Contributions are welcome! Feel free to open issues or pull requests.

License

This project is licensed under the MIT License - see the LICENSE file

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago