Closed nikmartin closed 9 years ago
{
"semistandard": {
"globals": [ "__base" ] // the key is `globals`, not `global`
}
}
Restart Atom for changes to have effect.
OK, I couldn't find any docs, so I went to the source, lib/style-settings.js: 66 and found this:
styleSettings.global = styleSettings.global || styleSettings.globals
So I just took the first option global
and used it.
Also, That didn't have any effect:
"semistandard": {
"globals": [
"__base"
]
}
I don't know why it's not honoring the setting then, I have tried it both as:
"semistandard": {
"globals": [
"__base"
]
}
and
"semistandard": {
"global": [
"__base"
]
}
Restarting each time, and the warnings never go away.
Hey guys, thanks for your help @sandnuggah.
Hmm that's awkward, let me take a look.
If you need me to debug anything, let me know.
Can you do something for me? cd /to/the/directory/where/is/your/file
and run semistandard yourFilename.js
and tell me if it shows the same warning on the terminal.
In a file with only a single 'not defined' warning I get no warnings running semistandard on the command line. In a file with a 'not defined' + other warnings, I only get the other warnings.
What settings you have ticked on linter-js-standard
plugin settings?
None are selected at the moment:
"linter-js-standard":
style: "semi-standard"
Well if you want your style settings to be honoured you need to tick the Honor Style Settings
So did it worked?
I checked Honor Style Settings and it is working now. I took the README literally, and since it says:
Current style settings supported:
- `ignore`
- `parser`
I didn't think it applied to globals. Should I add some documentation about it and submit a pull request? I didn't even know how to add support for globals until I read the source code and the standard lib's readme.
Sure @nikmartin I would appreciate that :)
I added this to the package.json file in the root of my node.js app:
and in hundreds of files in the project, I have this:
But still continually get this message: