Flet / SublimeLinter-contrib-standard

MIT License
71 stars 13 forks source link

Add settings to detect if standard is a project dependency #32

Closed danreeves closed 7 years ago

Flet commented 7 years ago

Is this all thats needed?

danreeves commented 7 years ago

afaict. It's not in the docs, but the NodeLinter isn't 🤷‍♀️

src: https://github.com/SublimeLinter/SublimeLinter3/blob/2cab34326b9b8bfe994e1b6d5faa30a6274eb804/lint/node_linter.py#L65-L75

I got it from looking at SublimeLinter-contrib-xo: https://github.com/sindresorhus/SublimeLinter-contrib-xo/pull/6

bcomnes commented 7 years ago

Cool wasn't aware of this part of the API

danreeves commented 7 years ago

FWIW the CI is failing because PEP rules D203 and D211 conflict; you'll have to disabled one.

e.g. https://github.com/PyCQA/pydocstyle/issues/141

Flet commented 7 years ago

Thanks @danreeves! Tagged as 3.1.2 should get picked up soon :)

Also invited as collaborator! 🎉

flyingswan3000 commented 7 years ago

Standard not lint after upgrade to 3.1.2

Because of disable_if_not_dependency: true, linter will be disabled all time, even cannot enable with Toggle Linter It is need to add disable_if_not_dependency: false to user setting or project setting to re-enable the linter.

due to https://github.com/SublimeLinter/SublimeLinter3/blob/366f602f397f14be84e920f5f0217bce0bce6c01/lint/node_linter.py#L79-L102

only project with package.json which dependent standard will enable linter.

Shouldn't disable_if_not_dependency be false by default?

cyberwombat commented 7 years ago

I prob missed it when my packages auto updated. Was mostly curious as to true being default. I like that it uses my local if I have one but seems odd imo to have the default to ignore global.

danreeves commented 7 years ago

Maybe we should flip the default setting for disable_if_not_dependency if this is tripping people up?

Flet commented 7 years ago

Yeah flipping the default may be less disruptive. It's your call @danreeves

louisl commented 7 years ago

Flip it please. This caught me out today!

danreeves commented 7 years ago

I made a new release today flipping the default to False. Sorry for any trouble!