You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
I created a local plugin and included it in the .eslintrc file. See below.
When I run Eslintrb.lint(source, :eslintrc) i get
{"ruleId"=>"pattern/return-object-only",
"severity"=>2, "message"=>"Definition for rule 'pattern/return-object-only' was not found",
"line"=>1,
"column"=>1, "nodeType"=>"Program", "source"=>"'use strict';"}
I finally just wrote my own version, which just called eslint directly from ruby and it worked. This assumed Eslint is globally defined which is the recommended way.
I just commented on #5#5. The reason is similar. Eslint is a npm package. What it normally would do is require('eslint-config-airbnb'), which you probably have installed using npm.
However, this is some 'standalone' version of eslint running in the ruby environment, which doesn't know about node_modules and all of that.
I created a local plugin and included it in the .eslintrc file. See below.
When I run
Eslintrb.lint(source, :eslintrc)
i get{"ruleId"=>"pattern/return-object-only",
"severity"=>2,
"message"=>"Definition for rule 'pattern/return-object-only' was not found",
"line"=>1,
"column"=>1, "nodeType"=>"Program", "source"=>"'use strict';"}
{ "extends": [ "eslint:recommended" ], "plugins": [ "pattern" ], "env": { "browser": true, "node": true }, "globals": { "angular": true, "$": true }, "rules": { "pattern/return-object-only" : 2, "comma-dangle": [ "error", "never" ], "no-console": "off", "no-unused-vars": ["error", { "vars": "all", "args": "none" }], "quote-props": ["error", "as-needed"], "quotes": [ 2, "single", {"avoidEscape": true, "allowTemplateLiterals": true} ], "semi": [ "error", "always" ] } }
The text was updated successfully, but these errors were encountered: