vojtajina / grunt-coffeelint Goto Github PK
View Code? Open in Web Editor NEWLint your CoffeeScript using grunt.js and coffeelint.
License: MIT License
Lint your CoffeeScript using grunt.js and coffeelint.
License: MIT License
I've read #11, but do you have any suggestions for a simple way to get coffeelint warnings to create growl notifications? I haven't really looked into it substantially yet, but why not behave the same way the jshint plugin does?
NPMv3 dropped support for peerDependencies
, so projects using grunt-coffeelint
breaks when upgrading.
Workaround is to add the dependency on grunt
and coffeelint
in the parent project.
I have just moved back to version 0.0.7 of grunt-coffeelint to double check. As of version 0.0.10 grunt-coffeelint does not support require'ing a .litcoffee file from inside a .coffee file. Please can this be addressed?
EmailConfirmed.get(email: value).$then(
(response) ->
result = response.data.api.result
if result
deferred.resolve result
else
deferred.reject()
->
deferred.reject()
Coffelint is throwing an "arrow_spacing" error even though there should not be.
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
Hello,
I'm using coffeelint
along with grunt watch
for my code. The watch
command also has several other tasks, such as compiling coffee to js, and concatenating the js into one file, etc.
When I add coffeelint
to the grunt watch's tasklist, only coffeelint runs. And even after running successfully (all files lint free), other tasks are not executing.
Here is my config:
coffeelint:
app: ['src/apps/**/*.coffee']
options:
force: true
max_line_length:
value: 80
level: 'warn'
indentation:
value: 2
level: 'warn'
watch:
common:
files: ['src/apps/*', 'src/apps/common/**/*']
tasks: ['requirejs:common']
options:
nospawn: true
angular:
files: ['src/apps/client/**/*']
tasks: ['requirejs:angular']
options:
nospawn: true
css:
files: ['src/sass/**/*']
tasks: ['compass:dev']
options:
nospawn: true
lint:
files: ['src/apps/**/*.coffee']
tasks: ['coffeelint']
options:
nospawn: true
Here, nothing else executes after coffeelint
if I make changes and save coffee files.
Newer versions of coffee lint has some new feature/bug that causes my build to be broken. See this issue for details:
clutchski/coffeelint#504
I believe this is due to the liberal upgrade policy in the devDependencies section of package.json:
"devDependencies": {
"grunt": "~0.4",
"grunt-bump": "~0.0.7",
"grunt-npm": "~0.0.2",
"grunt-auto-release": "0.0.6",
"coffeelint": "^1"
},
My suggestion is to specify the dependency versions without auto upgrade so that transient dependencies won't brake the dependants of this package.
I see no real reason to reformat the ouptut created by coffeelint official.
I would like to see the output the way coffeelint creates it:
✗ ./Gruntfile.coffee
✗ #85: Line exceeds maximum allowed length. Length is 86, max is 80.
This looks much more readable than:
[error] Gruntfile.coffee:11 Line exceeds maximum allowed length (max_line_length)
Currently the commands npm test
and grunt test
do not work correctly since there is no grunt task called test
.
In the current implementation this is not possible. I opened the issue with coffelint, hoping that there would be a way to ask for reporter output via options.. but apparently this is not how the tooling is implemented.
So the solution then is to fork and pass cmd line params, instead of calling coffeelint.lint
clutchski/coffeelint#51 (comment)
Thoughts?
Please support external conf file like .jshintrc
of grunt-contrib-jshint
Perhaps adding an option to choose what file is used to lint is good, so that I could share the conf file between grunt-contrib-jshint
and grun-coffeelint
CoffeeLint apparently added a --jslint
reporter in 0.5.0. Is it possible to use that in conjuction with this task somehow?
I would like to run grunt-coffeelint as the task of regarde. If grunt-coffeelint throws an error when it detects a problem, it'll stop grunt and I have to restart the watch manually. Is there a way to globally set everything to the "warning" instead of "error" log level? If not, would you be amenable to a PR enabling it?
Now that coffeelint has bumped its major version, it will no longer match the semver range of ^1
in your dependencies
.
Consider following input
moo = 'meow'
foo = ' :D'
console.log "The cow says #{if moo then "#{moo}!" else ''}#{foo}"
with the coffeelint.json
pasted here and no special magic in Gruntfile.coffee
and this output
.../bug.coffee
✖ line 3 Operators must be spaced properly +
I see that there's some freaky string interpolation going on, but this error message is misleading.
I don't have the time to investigate where this issue is rooted. I report here because grunt-coffelint
is the thing I'm importing.
We're trying to get some additional dev feedback with Growl (like we have with Testacular) for the things we care about most. One of those things is coffee linting.
One way to do this is with hooker.hook
over the grunt.fail
API.
['warn', 'fatal'].forEach(function(level) {
grunt.util.hooker.hook(grunt.fail, level, function(opt) {
var target = grunt.option('target') || 'dev';
if (target !== 'dev') { return; }
// https://github.com/theabraham/growly#growlynotifytext-opts-callback
growly.notify(opt.name, { title: opt.message, sticky: true });
});
});
However, this won't help us with grunt-coffeelint
since you're not using that API. I could try and hook grunt.log.error
, but you're not using that either.
I'm wondering your thoughts on a PR to either
grunt.log.writeln
grunt.event.on
class MyClass
constructor: ->
@foo = 'foo'
getFoo: ->
console.log @foo
callback: (cb) ->
cb()
class YourClass extends MyClass
constructor: ->
super
getFoo: ->
@callback ->
super
obj = new YourClass
obj.getFoo() #outputs undefined
The above code will correctly output 'undefined' because @foo
is indeed undefined in this context. This is solved by using the fat arrow in the function passed to @callback
, but grunt-coffeelint flags this with a no_unnecessary_fat_arrows warning.
in my coffeelint grunt-task i'd like to setup custom rules. so far, i have found no way to make this happen unfortunately :(
v0.0.11 was released a couple of months ago, but the npm package index still shows v0.0.10 as the latest version:
#44 Updates to include CoffeeLint ~1.1, which in turn supports CoffeeScript 1.7.
The version on npm runs an older version of CoffeeLint (1.0.8), which only supports CoffeeScript 1.6
Can the latest version please be released to npm so we can easily lint CS1.7 in our projects
Thanks
This project is missing a licence which prevents us from using it. Please add one (http://opensource.org/licenses/MIT for example).
Thanks for your wonderful plugin! I really like it.
Unfortunately it does not respect CoffeeLint's ignore
level. From the CoffeeLint Options:
To enable an option, set its level to "error", and to disable an option, set its level to "ignore".
I have the following configuration in my coffeelint.json
:
"max_line_length": {
"name": "max_line_length",
"value": 120,
"level": "ignore",
"limitComments": false
}
But this causes "grunt-coffeelint" to take a default max line length of "80", so it still shows a warning instead of skipping the "max_line_length" check completly.
The version currently published to npm is 0.0.4, while there is no version 0.0.4 in the entire repository (0.0.2, 0.0.3 that is all there is) and the sha referenced in the package.json isn't available on github: c6b9f005dd51a253ea998c16b11e4acdc338f801
Also the version published on npm still isn't grunt 0.4.0 compatible.
Please fix the confusing versioning and publish the latest version to npm, thanks!
Currently Travis fails not because of test fails but because of some setup errors.
Using grunt 0.4.0rc7 and grunt-cli 0.1.6, I get this error when trying to run the coffelint task. Task defined as
cofeelint: {
app: ['src/*.coffee')
}
I removed a right paren from a line and ran coffeelint on it.
It reports the missing paren as a warning, but doesn't tell me which file is missing it.
In my case I can guess because I only have one .coffee file, but this would be an issue if there were many files being evaluated.
It would be nice if there was some information in the project about what's changed from one version to another. For example I'd like to know what's new in 0.0.7.
When trying to install grunt-coffeelint via bower, I receive "ENOTFOUND Package grunt-coffeelint not found". Would be useful to have this accessible via bower.
It's been 5 months since the last activity in this repo. CoffeeLint is now at a stable v1.0 version, but grunt-coffeelint is still stuck at v0.5.
I volunteer to help maintain this project if you don't mind adding me as a contributor to the repo. There are probably others who would also be willing to help keep the project healthy as well.
Hate to sound like a broken record here, but would anyone please consider completing a new release that depends on coffeelint@^2
?
@mwittig once started branch coffeelint2-dev
in response to #69 but somehow never got round to getting it done...
It's been 2 months since anything happened here. Could you please possibly make a new a release ? I was wondering why force: true
option doesn't work. NPM is not updated with it yet.
Hi, 4 months ago, 0.5.4 of coffeelint was released, can you pumb dependencies up?
Hello,
I'm packaging atom [1] for debian [2].
Your software is there included.
I found some issues in your software:
Regards,
Jörg Frings-Fürst
[1] http://atom.io
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747824
[3]
// Copyright 20xx-20xx your name
// License: [your license eg. MIT / GPL-2 ....]
Hi there,
I've tried several different ways, and I can't see how to configure the colon_assignment_spacing
rule (http://www.coffeelint.org/#usage), specifically changing spacing.left
. Do you know if this value type is supported by the grunt plugin?
Thanks,
Evan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.