Closed reginna-chao closed 6 months ago
globals: {
TweenMax: 'readonly',
TimelineLite: 'readonly'
}
PS: there is an NPM module for GSAP
Yes, I know that. I want to use GSAP CDN, and I import it use global setting in nuxt.config.js head.script.
When I use plugin in every *.vue file, I use comment to resolve error, like this:
// eslint-disable-next-line no-undef
const tl1 = new TimelineLite()
// eslint-disable-next-line no-undef
TweenMax.to(...)
It is not convenient.
Any updates on this issue?
I believe this is not an issue of Nuxt's config, but more like a ESLint config question - and solution is already answered in https://github.com/nuxt/eslint/issues/90#issuecomment-618463677
I want to set Specifying Globals in .eslintrc.js file, but it is not working. Specifying Globals - ESLint document: https://eslint.org/docs/user-guide/configuring#specifying-globals
This is my setting:
When I use them in .vue file, example:
And always show error:
How should I do?
Package version: nuxt: 2.11.0 @nuxtjs/eslint-config: 1.1.2 @nuxtjs/eslint-module: 1.1.0