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

Add a rulesDirectory property #36

Closed
buzinas opened this issue Nov 13, 2015 · 6 comments
Closed

Add a rulesDirectory property #36

buzinas opened this issue Nov 13, 2015 · 6 comments

Comments

@buzinas
Copy link
Contributor

buzinas commented Nov 13, 2015

Today, we call the TSLint's Linter construction as follows:

linter = new Linter(filePath, text, {
  formatter: 'json',
  configuration: configuration
});

But there is also a rulesDirectory property for custom rules created by users.

Could you please add a parameter to the plugin, so we can set this parameter?

@Arcanemagus
Copy link
Member

Do you want to submit a PR for this? I don't believe this package has an active maintainer and I don't use it myself...

@buzinas
Copy link
Contributor Author

buzinas commented Nov 13, 2015

I would like to submit it, but unfortunately I have never coded with CoffeeScript, and never used Atom API either.

Can you give me some advices/orientation?

@Arcanemagus
Copy link
Member

I'm guessing you will want a configuration option to specify the rules directory, an example can be found for specifying options here, with how to properly observe() the settings here. The documentation can be found here.

You would then want to build the path to the rules directory somehow, either have the user specify the entire path and just use that, or let them make it relative to the current file in which case you would need to build the path on the fly. The first is much easier, but I don't know the common practice as to whether that would work better here.

If you have any questions you can ask in the #linter channel on Atom's Slack, or keep commenting here 😉.

@buzinas
Copy link
Contributor Author

buzinas commented Nov 13, 2015

Ok @Arcanemagus, thanks very much, I'll give it a try.

Any idea how to test it?

@Arcanemagus
Copy link
Member

Not a clue, see my earlier comment about not actually using this linter 😛.

@buzinas
Copy link
Contributor Author

buzinas commented Nov 13, 2015

@Arcanemagus Created the pull request #37.

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

No branches or pull requests

2 participants