Skip to content

Docs: Add section for troubleshooting "Definition for rule x was not found" when doing Local Linking #8587

Closed
@skondrashov

Description

@skondrashov

Suggested Changes

After performing the local linking steps, I am getting: Definition for rule '@typescript-eslint/no-unused-vars' was not found when running npx eslint .

It feels like the page might lack information on what the minimum requirements for a repository made to test a rule are, but if the steps on the page are in fact the only ones, they don't seem to work for me. I ran:

~/typescript-eslint (main)
$ for package in ./packages/*; do
    cd $package
    npm link
    cd ../..
done

which succeeded after adding a bunch of packages, then:

~/playground (main)
$ npm link @typescript-eslint/eslint-plugin @typescript-eslint/parser

added 2 packages, changed 1 package, and audited 386 packages in 4m

and then:

 ~/playground (main)
$ npx eslint .

  1:1  error  Definition for rule '@typescript-eslint/no-unused-vars' was not found  @typescript-eslint/no-unused-vars

My .eslintrc.json looks like this:

{
	"rules": {
		"@typescript-eslint/no-unused-vars": "error"
	}
}

and I'm pretty confident that's a real rule

Affected URL(s)

https://typescript-eslint.io/contributing/local-development/local-linking

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatingenhancementNew feature or requestlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions