This plugin finds any test urls from your project and warns you about them.
npm i eslint-plugin-remove-test-urls
or
yarn add eslint-plugin-remove-test-urls
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
}
],
...
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.