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
In jshint and eslint you can configure exported variables with inline comments. in the XO linter the exported configuration that is described here: http://eslint.org/docs/rules/no-unused-vars.html doesnt seem to work. the /* globals */ configuration works fine however so it doesnt seem to be an issue of inline configurations in general.
/* exported Model */
var Model = 13;
linting it from the terminal with xo file.js thorws the error:
3:5 error "Model" is defined but never used no-unused-vars
i tried to lint the same file with the current eslint linter. that one worked fine. it threw an error without the /* exported Model */, and worked when i plugged it back in.
The text was updated successfully, but these errors were encountered:
Per eslint/eslint@6c04d51, this has no effect when the env is node/commonjs and when modules: true, of which, both are the case in XO. You can override this yourself, though.
I know this issue is closed, but I can't seem to override sourceType to script I tried with parserOptions inside the xo property in package.json and in the eslintConfig. But nothing seems to work?
In jshint and eslint you can configure exported variables with inline comments. in the XO linter the exported configuration that is described here: http://eslint.org/docs/rules/no-unused-vars.html doesnt seem to work. the /* globals */ configuration works fine however so it doesnt seem to be an issue of inline configurations in general.
/* exported Model */
var Model = 13;
linting it from the terminal with xo file.js thorws the error:
3:5 error "Model" is defined but never used no-unused-vars
i tried to lint the same file with the current eslint linter. that one worked fine. it threw an error without the /* exported Model */, and worked when i plugged it back in.
The text was updated successfully, but these errors were encountered: