Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Support custom rules #65

Closed
skalidindi opened this issue Mar 17, 2016 · 3 comments
Closed

Support custom rules #65

skalidindi opened this issue Mar 17, 2016 · 3 comments
Labels

Comments

@skalidindi
Copy link

Atom seems to be throwing errors when using custom rules from https://www.npmjs.com/package/ng2lint in tslint.json.

@arusakov
Copy link
Member

@skalidindi Thank you!
Can you provide some more info (maybe stack trace)? I cannot reproduce error.

@denis-sokolov
Copy link

My traceback:

Error: Could not find the following rules specified in the configuration:
my-custom-rule
    at Object.loadRules (my-project/node_modules/tslint/lib/ruleLoader.js:29:15)
    at Linter.lint (my-project/node_modules/tslint/lib/tslint.js:24:44)
    at ~/.atom/packages/linter-tslint/lib/init.coffee:87:31

My rule is added in tslint.json that looks like this:

{
  "rulesDirectory": "custom-tslint-rules",
  "rules": {
    "class-name": true,
    "my-custom-rule": true
  }
}

If I run tslint on the command line as tslint, it respects the rulesDirectory and successfully runs my rule.

I run linter-tslint 0.8.3, linter 1.11.3, Atom 1.7.0-beta0.

@arusakov
Copy link
Member

@skalidindi @denis-sokolov
Try to use linter-tslint@0.9.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants