What is the proper way to get Cloud9 to read lint config files (.jshintrc or .eslintrc)? - cloud9-ide

I am a new Cloud9 (c9.io) user and I spent the morning searching the web, but cant seem to find an answer on what needs to be done for Cloud9 to recognize me lint config files. They are currently in my workspace/project root, but none of the rules (like, 80 character line max, etc...) are being enforced by the editor. It seems to do some basic linting that I have limited control over... but for javascript development I really need more for my team.
Thanks,
Eric

Currently the Cloud9 IDE uses ESLint for linting purposes within the editor, but doesn't read configuration from .eslintrc files within the project yet.

There should be .eslintrc parsing support by now in c9 given this patch: https://github.com/c9/c9.ide.language.javascript.eslint/commit/c77d2241d140512b9f807d597e0ccca70bbd8a20

On Cloud9 hosted workspaces, .jslintrc is working. I have just added my own rules after reading this post and it was working well.
It seems to be sufficient to set the rules, that should be changed from the default linting configuration in c9.

Wanted to make a comment to answer above, but too low on reputation :(
Seems like eslint config in package.json files (using eslintConfig field) is not handled (yet).

Related

VSCode Asciidoctor snippet and word suggestions not working despite being enabled

Dear Fellow Asciidoc/VSCode users!
I've recently switched to Windows from Linux. It is true I have not updated my Linux VSCode or any extensions for a few years now, because it worked as I wanted and didn't want any new features to brick anything. So, my issue might not be os-release-related, but rather version-related.
In .adoc files, I cannot seem to be able to enable word/snippet suggestions. Some code suggestions work, but not my snippets and simple text suggestions from one or more currently opened files. This worked on my old setup.
Enabling suggestions with editor.wordBasedSuggestions, editor.suggest.showWords: true, editor.snippetSuggestions, or the other related settings options I was able to find does nothing, even after reloading the editor.
Suggestions work normally in .txt and .py files for example.
While I didn't find anything online on how to enable suggestions, I did find a lot of posts where people wanted to disable word suggesting and also failing to do so using the above-noted settings options.
I must be missing something. Could it be a language-configuration issue? I couldn't find any relevant settings here: Language Configuration Guide.
Could it be related to something else in the AsciiDoc language extension?
Any ideas? Thanks a lot.

Prevent Visual Studio JSX behaviour with React component

I'm using Visual Studio to build a React Native app. I also installed Prettier to improve the syntax.
But every time I add a component with several property it goes to the next line. How could I prevent that and keep my component inline?
PS: I already tried to increase the "print width" in Prettier and it doesn't work
You should check jsx-max-props-per-line eslint rule.
You can only set that rule using ESlint, prettier doesn't give you that option.
So, what you need to do is use eslint with prettier and prettier will format looking at your eslint rules.
Go to File => Preferences => Settings and in the Prettier extension, mark Eslint Integration.
You will need to npm i -D for babel-eslint, eslint and eslint-plugin-react (wich have the rule you want).
And add the rule of jsx-max-props-per-line with the number of props you want to be inline.
If you have problem configuring ESlint, just google how to add ESlint with React Native, there is alot of tutorials and it's a very important and usefull thing to learn.

sass-lint in Atom throws 'Unexpected Parse Error'

I have several simple .scss (SAAS) files and for each one I get a sass-lint error.
Unexpected Parse Error
To the best of my knowledge, I have the most current sass-lint plugin for Atom. It doesn't seem to affect anything and is more of a annoyance, however I would also love to know if I am doing something incorrectly.
Example code that generates the error:
$primaryFont: 'Lora';
$secondaryFont: 'Roboto';
$primaryHeader: 'Montserrat';
Don't worry it's not you it's sass-lint!
It is because you are indenting with spaces, there is a bug in one of sass-lint's dependencies that causes Unexpected parse error in file to be logged when you indent with tabs rather than spaces. It looks like they are planning to have it resolved in the next release, at which point the maintainer of the Atom plugin will need to update the dependencies of the Atom Package and publish a new version.
I figured this out by taking a look at the package.json for sass-lint and specifically at the dependencies on line 21, there is a direct dependency upon the sass-lint NPM package. From there you can go back to the GitHub Repository which has all of the issues including #560 which describes the exact issue you are experiencing.
I have created GitHub Issue on the sass-lint Atom Package for this, it is externally blocked by Issue #62 on sasstools/sass-lint, i.e. the NPM package, which was updated a couple of days ago by Dan Purdy who stated:
We're at a bit of a crossroads at the moment, while running through our tests on all platforms we've found the latest version of the AST fixes a lot of our issues but also breaks a few things. Specifically Sass format on windows mainly. There's also some pretty annoying windows bugs left over so we're currently debating and looking into what our best course of action is. I hope to have 1.6 out soon though... I just can't say when.
You can always try validating your .sass-lint.yml here online YAML lint tool

How to enable collaboration on local Cloud9 install?

Me and a friend are collaborating on a project using a Cloud9 SSH project, but we're not happy with the latency. We have tried installing Cloud9 directly on the server, but the collaboration option disappeared.
Is collaboration possible to enable on a custom Cloud9 installation? If so, how?
I imagine it's a plugin with some configuration required, so it's left out by default. I can't find anything when Googling though.
Edit: I found the collab plugin repo: https://github.com/c9/c9.ide.collab
Doesn't have a README file though, so I'm still just as stuck.
You can add the --collab flag while launching the server.js
Example:
nodejs server.js --collab

WebStorm and PHP syntax highlighting in WebStorm

I have WebStorm and really like it. I don't use PHP very often, but I'm working on a project that uses it...
So, I'm trying to get basic syntax highlighting in WebStorm.
I've tried using this plugin already (incompatible):
http://plugins.jetbrains.com/plugin/6610
And I've followed the steps in these threads:
Webstorm: how to extend to handle PHP files or even just higlight code correctly?
Is it possible to get Ruby syntax highlighting in PHPStorm?
I am using this textmate bundle:
https://github.com/textmate/php.tmbundle
It's being recognized by WebStorm, and the proper files are being associated with TextMate bundles, yet I still have no syntax highlighting.
At this point, I've just written all the stuff without the highlighting, but it seems a bit ridicules that I cannot get it to work.
I sent an email to technical support, and they just pointed me back to those resources and then suggested that I buy PHPStorm. And the IDE keeps suggesting that I buy IntelliJ IDEA Ultimate.
Has anybody else run into this problem?
https://github.com/textmate/php.tmbundle bundle uses non-documented 'injection' - feature that's not currently supported - thus no highlighting is actually recognized. See RUBY-14273

Resources