73rhodes / Sublime-JSLint

JSLint for Sublime Text 2 and 3.
80 stars 14 forks source link

JsLint complains on ES6 syntax #53

Open oleksiidrobiazko opened 8 years ago

oleksiidrobiazko commented 8 years ago

Appreciate you guys. Great job. But I run into some troubles with checking ES6 syntax.

cookieActions.js

import { EU_COOKIE_UPDATE, SET_PRISMIC_PREVIEW_COOKIE } from '../constants/constants';

export const updateEUCookie = result => (
  { type: EU_COOKIE_UPDATE, result }
);

export const setPrismicPreviewCookie = result => (
  { type: SET_PRISMIC_PREVIEW_COOKIE, result }
);

Complaints:

app/actions/cookieActions.js
 #1 Expected an identifier and instead saw '{'.
    import { EU_COOKIE_UPDATE, SET_PRISMIC_PREVIEW_COOKIE } from '../constants/constants'; // Line 1, Pos 8
[Finished in 0.1s]

.eslintrc

{
  "env": {
    "es6": true,
    "mocha": true,
    "node": true
  },
  "extends": "airbnb",
  "parser": "babel-eslint",
  "rules": {
    "comma-dangle": [
      2,
      "never"
    ],
    "no-case-declarations": 0,
    "func-names": 0,
    "guard-for-in": 0,
    "key-spacing": 0,
    "react/sort-comp": 0,
    "new-cap": 0,
    "react/react-in-jsx-scope": 0,
    "react/no-did-mount-set-state": 0,
    "react/jsx-no-bind": 0,
    "no-unused-expressions": 0,
    "semi": [
      2,
      "always"
    ],
    "max-len": [
      2,
      {
        "code": 180,
        "tabWidth": 2,
        "ignoreUrls": true
      }
    ],
    "space-infix-ops": [
      0
    ]
  },
  "globals": {
    "Generator",
    "expect": false,
    "shallow": false,
    "spy": false,
    "stub": false,
    "injectr": false,
    "google": false
  }
}
rastalamm commented 7 years ago

Did you get JSLint to not throw errors for es6?