Eslint Error while working with Trails js
Asked Answered
D

1

6

I am using Eslint to lint the code of my Trails.js project before testing it. Tails.js comes with existing pre-configurations eslint-config-trails. However, when I am testing my code eslint throws a Definition for rule 'no-global-assign' was not found error, for every .js file in my codebase.

Manually adding the rule:

"rules": {
  "no-global-assign": ["error", {"exceptions": ["Object"]}]
}

Doesn't fix the error. Setting the rule to "warn" makes me at least run the tests, but outputs a warning for every .js file.

Doenitz answered 8/11, 2017 at 10:25 Comment(5)
i think u are using an older version of eslintJusten
I am using version 2.13.1Doenitz
upgrade to 3.0 dsJusten
Version 3.0 didn't work. I updated to the latest (v4.10.0). It is working with this version now. Thank you!Doenitz
no problem :)p goodJusten
A
0

The no-global-assign rule was added in ESLint 3.3.0.

You need to use that version or later, if you want to use that rule.

Abessive answered 11/5, 2018 at 0:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.