Using with xo instead of eslint
See original GitHub issueI’m trying to get this working with xo which is a wrapper around eslint. If I remove the vue plugin everything works fine.
Tell us about your environment
- XO Version: 0.18.2
- ESLint Version: 4.9.0
- eslint-plugin-vue Version: 4.2.2
- Node Version: v9.5.0
Please show your full configuration:
{
"xo": {
"extends": [
"plugin:vue/base"
],
"settings": {
"import/core-modules": [
"vue"
]
},
"semicolon": true,
"space": "2",
"overrides": [{
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2017,
"sourceType": "module"
}
}]
}
}
What did you do? Please include the actual source code causing the issue.
return new Promise(async (resolve, reject) => {
try {
const res = await this.$http.post('/', {
body: {
...creds
}
});
localStorage.setItem('token', res.body.token);
commit(LOGIN_SUCCESS);
resolve();
} catch (err) {
reject(err);
}
});
What did you expect to happen?
➜ slim git:(master) ✗ xo store/index.js
store/index.js:15:25
✖ 15:25 localStorage is not defined. no-undef
✖ 42:11 localStorage is not defined. no-undef
✖ 51:7 localStorage is not defined. no-undef
3 errors
What actually happened? Please include the actual, raw output from ESLint.
➜ slim git:(master) ✗ xo store/index.js
store/index.js:35:50
✖ 35:50 Parsing error: Unexpected token =>
1 error
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
xojs/xo: ❤️ JavaScript/TypeScript linter (ESLint ... - GitHub
Opinionated but configurable ESLint wrapper with lots of goodies included. Enforces strict and readable code. Never discuss code style on a pull request ......
Read more >eslint-config-xo-react | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >eslint-config-xo-react - npm Package Health Analysis - Snyk
The npm package eslint-config-xo-react was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >Find and fix problems in your JavaScript code - ESLint ...
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Eslint-config-xo - npm.io
XO is an ESLint wrapper with great defaults. Here are some reason why you should use the XO CLI instead of this config:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If the
overrides
is ESLint’soverrides
, maybe you have to writefiles
property to specify that the override entry affects what files.For anyone finding this you need to add the
files
property. This works perfectly. Thank you.