xxxxxxxxxx
// eslint-disable-next-line (paste the eslint error here)
// Example:
// eslint-disable-next-line react-hooks/exhaustive-deps
xxxxxxxxxx
alert('foo'); // eslint-disable-line
// eslint-disable-next-line
alert('foo');
/* eslint-disable-next-line */
alert('foo');
alert('foo'); /* eslint-disable-line */
xxxxxxxxxx
alert('foo'); // eslint-disable-line
// eslint-disable-next-line
alert('foo');
xxxxxxxxxx
console.log('disabled current'); // eslint-disable-line
// eslint-disable-next-line
console.log('disabled this one');
xxxxxxxxxx
// eslint-disable-next-line no-return-assign, no-param-reassign
console.log("How to disable 2 ESLint rules in a single line");
xxxxxxxxxx
You can add optional comments to an eslint comment directive
using the -- and some text after that:
// eslint-disable-next-line -- Some comment here
/* eslint-disable-next-line -- Some comment here */
xxxxxxxxxx
console.log('eslint is disabled for the current line'); // eslint-disable-line
xxxxxxxxxx
module.exports = {
// Remove the extends property to remove default ESLint configurations
// extends: '...',
// Remove or disable specific rules that you want to ignore
rules: {
// ...
},
};
xxxxxxxxxx
`${this.baseUrl}/stock-projections-list/location-id/${locationId}/product-id/${productId}/sale-enddate/${saleEndDate}/required-field/${requiredField}`