1.0.2 • Published 3 years ago

eslint-plugin-remove-test-urls v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

eslint-plugin-remove-test-urls

This plugin finds any test urls from your project and warns you about them.

Installation

npm i eslint-plugin-remove-test-urls

or

yarn add eslint-plugin-remove-test-urls

Usage

Add below changes to .eslintrc.js file

module.exports = {
  ...
  plugins: [
    ...
   'remove-test-urls'
  ],
  ...
  rules: {
    "remove-test-urls/remove-test-urls": [
      'warn',
      {
        domains: ['domain.com'],
        subdomains: ['dev', 'staging', 'test'], // if you want to add subdomains add elements here, otherwise keep empty array
        exceptFileNameContains: ['test', 'mock'], // exclude files that contains these items in their names
      }
    ],
    ...
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT