clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.17k stars 172 forks source link

Support JSX #619

Open renchap opened 6 years ago

renchap commented 6 years ago

JSX is now supported in CS2: http://coffeescript.org/#jsx

It would be awesome to have the syntax supported in coffeelint (it is currently reporting errors).

swang commented 6 years ago

what exactly do you want linted?

renchap commented 6 years ago

Currently with a simple CS2 file with JSX I am getting lint errors:

# content-text.coffee
import React from 'react'

export default class ContentText extends React.Component
  render: ->
    <div className="td-content-text">
      Content Text
    </div>
$ coffeelint --version
2.0.5
$ coffeelint content_text.coffee
  ✗ content_text.coffee
     ✗ #5: Colon assignment without proper spacing. Incorrect spacing around column 18.
     ✗ #5: a space is required after commas.
     ✗ #5: a space is required after commas.

✗ Lint! » 3 errors and 0 warnings in 1 file

The only JSX specific rule that I have in mind would be for the quotes style (simple/double).