ESlint Error

I am getting an error from ESlint in the following code:
const channel = client.channel.cache.get(...) as TextChannel;
const channel = client.channel.cache.get(...) as TextChannel;
And when I do channel.toString(), I get this error from eslint: channel will be evaluated to [object Object] when stringified How to fix this?
3 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Deleted User
Deleted User9mo ago
ESling config:
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
},
plugins: ['@typescript-eslint'],
root: true,
};
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
},
plugins: ['@typescript-eslint'],
root: true,
};
chewie 🌈
chewie 🌈9mo ago
ignore it toString() returns a string in the mention format not an object @sicklinebro