scotch / angular-brunch-seed

AngularJS + Brunch
Other
228 stars 78 forks source link

How do I set coffeelint options #38

Closed gduquesnay closed 11 years ago

gduquesnay commented 11 years ago

I'd like to change some of the coffeelint options but not sure how. I found node_modules/coffeelint-brunch/node_modules/coffeelint/examples/coffeelint.json but I don't know where to put it for brunch to pick it up.

kylefinley commented 11 years ago

Does adding adding a coffeelintattribute to the config object work? E.g.

config.coffee

export.config =
  # ... previous config
  coffeelint:
    pattern: /^app\/.*\.coffee$/
    options:
      no_trailing_semicolons:
        level: "ignore"
gduquesnay commented 11 years ago

Thanks. That works. It was actually one of the things I tried except that I was setting level to "warn". I probably just didn't notice that the error message changes slightly to say:

09 Jan 10:13:25 - error: Linting of 'app/scripts/oauth_config.coffee' failed. warn: max_line_length at line 47. (emphasis mine)

I am trying to change it so that max_line_length errors doen't stop the build. But it seems that "warn"ings still cause brunch to stop.

 coffeelint:    pattern: /^app\/.*\.coffee$/
    options:
      max_line_length:
        value: 80
        level: "warn"

Any ideas? Maybe this question belongs in a separate issue. Please advise.

kylefinley commented 11 years ago

If you don't care about the max line length, maybe you could set level: "ignore". Or you could setting it to a high number E.g. value: 1000

kylefinley commented 11 years ago

I"m going to close this for now. Feel free to reopen if you still have questions

aleks-sidorenko commented 10 years ago

Could anyone help me with coffeelint? I am using this seed, I have added "coffeelint-brunch": "~1.5.0" to package.json and done npm install (package installed). But when I run brunch build it doesn't errors/warn me on anything in any case. What have I missed? It would be nice to add coffeelint to this seed to have it out of the box! Thanks