Tengo un problema con mi analizador ESLint. Uso el proyecto Sage de Roots.io. He estado buscando en Internet todo el día. Yo uso Webpack y mi terminal de impresión:
Module build failed: 19 : redirect_uri: redirectUri, 20 : }); 21 : 22 : 23 : async function getAsyncAuth() { ^ Unexpected token (23:6) You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.¡Estos comentarios como eslint-disable aún no funcionan!
Mi .eslintrc.js
'ecmaVersion': 2017, 'sourceType': 'module',Cambié ecmaVersion de '2016' a '2017', '2018' o 'latest' pero aún no funciona.
En package.json tengo en devDependencies:
"eslint": "~4.19.1", "eslint-loader": "^4.0.2", "eslint-plugin-import": "^2.14.0",Mi script donde uso async/await.
import axios from 'axios'; import oauth from 'axios-oauth-client'; var clientId = ''; var clientSecret = ''; var redirectUri = ''; const getAuthorizationCode = oauth.client(axios.create(), { url: 'https://api.getbase.com/oauth2/authorize', response_type: 'code', client_id: clientId, client_secret: clientSecret, redirect_uri: redirectUri, }); async function getAsyncAuth() { const auth = await getAuthorizationCode(); console.log(auth); return auth; } getAsyncAuth();¿Qué pasa? ¿Conoces la solución?