Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upVim plugin #31
Comments
This comment has been minimized.
This comment has been minimized.
mikesherov
commented
Feb 6, 2015
|
JSCS will not be patching itself to recognize standard. The correct way to do this would be to make standard a jscs plugin and an eslint plugin, rather than something that uses both of those tools. |
This comment has been minimized.
This comment has been minimized.
|
@mikesherov and @nzakas, Thank you for commenting. Perhaps JSCS and ESLint can be patched to recognize to look for something other than an rcfile in the current directory? Are you open for that? I'm thinking perhaps a property in {
"name": "my-package",
"rcfiles": ["node_modules/standard/rc"]
}In Standard, I'm looking for the least amount of actions for setting it up. Editing Perhaps addition of |
This comment has been minimized.
This comment has been minimized.
mikesherov
commented
Feb 6, 2015
|
You can already run jscs with an file using the |
This comment has been minimized.
This comment has been minimized.
nzakas
commented
Feb 6, 2015
|
Ditto ESLint using the |
This comment has been minimized.
This comment has been minimized.
|
I'm looking for a way that will not require anyway to alter the way that ESLint & JSCS are called. For example, ESLint is called automatically from my VIM plugin. The current existing way of providing rules is the presence of rcfiles. But that is not flexible enough for my purpose because that requires Standard to put such files in place in the repo where it is used and that is not such a great possibility, as you can imagine. The little addition of a property to If only ESLint and JSCS will follow such a property, it will be one possible solution. Are you open to anything like this? |
This comment has been minimized.
This comment has been minimized.
nzakas
commented
Feb 6, 2015
|
ESLint already allows you to have configuration in package.json: http://eslint.org/docs/configuring/ |
This comment has been minimized.
This comment has been minimized.
|
A better approach might be to create a vim plugin specifically for It looks like someone opened an issue for it already: vim-syntastic/syntastic/issues/1314 |
This comment has been minimized.
This comment has been minimized.
|
The correct approach is to create a vim plugin for @Flet already wrote a Sublime Text plugin. It's quite easy to do, since the output is easily parseable. You can see the regex to use here. Ideally, a dedicated vim user would step up and write this plugin! I use vim as my secondary editor (only when I'm ssh'd into a server, and usually without syntax highlighting). |
This comment has been minimized.
This comment has been minimized.
|
I'll use VIM so I'll benefit. But what about all the other editors? @nzakas it allows configuration in package.json but it doesn't allow a directive/rule that allows us to provide a path to an rcfile, right? An include rule would be perfect. Would you be open to an include rule? |
This comment has been minimized.
This comment has been minimized.
|
If we do this at the lower, ESLint&JSCS level, we don't need any editors to recognize Standard. |
This comment has been minimized.
This comment has been minimized.
|
@mightyiam Please take your feature request directly to the jscs or eslint issue trackers. Let's use this issue to track progress on a vim plugin. If someone writes this, let me know and we can link it from the README. |
feross
changed the title
A way for editors to work with Standard
Vim plugin
Feb 9, 2015
This comment has been minimized.
This comment has been minimized.
lcd047
commented
Feb 11, 2015
feross
added a commit
that referenced
this issue
Feb 11, 2015
This comment has been minimized.
This comment has been minimized.
|
@lcd047 Hey, fixed the issue in 2.6.1. Care to give it a try? |
This comment has been minimized.
This comment has been minimized.
lcd047
commented
Feb 11, 2015
|
@feross Excellent! It works now, and I added a syntastic checker for it in c1a2098. Unrelated however, error highlighting in syntastic seem to imply column numbers for |
mightyiam commentedFeb 6, 2015
My VIM doesn't recognize that a project is Standard.
Is the presence of
standardinpackage.json'sdevDependenciesenough to flag that the package is Standard?Perhaps both ESLint and JSCS should be patched to recognize the presence of Standard and then automatically look for the RC files in the right place?
Then, when used from within the editor, it just happens automagically—well, at least with some editors, who rely on external tools like that.