Category "typescript-eslint"

@nrwl/nx + VS Code + ESLint - Errors highlighting doesn't work

Linting shows errors in terminal but won't highlight the code in VS Code. ESLint extension is installed. Running nx lint: yarn run v1.22.10 $ nx lint > nx r

How to throw "expressive" / console friendly exceptions in JavaScript?

JavaScript noob here... I'm exploring various options for throwing exceptions. Throwing a string / primitive value This seems to be bad practice for several rea

How to make ESLint understand that function is used in vue pug template?

I have following vue component. <template lang="pug"> button(@click="onLogout") Logout </template> <script setup lang="ts"> function onLogout

Ordering member for async and method in Typescript-ESLint

Is there a way for ordering async / sync method member ? example # ❌ Incorrect function myFunction() { // something code } async function myAsyncFunct

What "plugins" property in .eslintrc does?

module.exports = { root: true, parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], extends: [ 'eslint:recommended', 'plugin:@t

@typescript-eslint/naming-convention workaround for Vue components

We have this rule enabled: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md#allowed-selec

ESLint: 8.0.0 Failed to load plugin '@typescript-eslint'

Could you help me, I've got this error when I try building a project? Oops! Something went wrong! :( ESLint: 8.0.0 TypeError: Failed to load plugin '@types

Resolve Error: typescript with invalid interface loaded as resolver ESLint

I'm having ESLint in my project and getting an error Resolve Error: typescript with invalid interface loaded as resolver : import-no-restricted-paths when I ad

Lint rule "no-restricted-imports" throw error when patterns group specified

I configured .eslintrc.json in Nx/nrwl monorepo for React project. When I add group to pattern attribute to no-restricted-import "rules": { "no-restricted-i

no-use-before-define typescript interfaces

I have 2 typescript interfaces that have a member that is of the type of the other interface (circular reference). My linter complains that I cannot use an inte