N
Nuxt6mo ago
scrongly

@nuxt/eslint randomly marking newly added util functions as undefined when auto-imported in .js file

Experiencing some very odd behavior with @nuxt/eslint and autoimports. I have a pinia .js store file that calls auto-imported util functions in its actions. All of them are absolutely fine, except for the functions I added today. To test if it was me, I added a noOp function to the util file, called it in the pinia store file, and sure enough it's undefined.... But the other functions are defined and the code runs exactly as it should. I haven't changed my eslint config, or my vscode config. Anyone else dealt with this? It's madenning. here's my config, for reference:
import withNuxt from './.nuxt/eslint.config.mjs'
import eslintConfigPrettier from 'eslint-config-prettier'

export default withNuxt(eslintConfigPrettier, {
rules: {
'no-console': 'off',
'vue/multi-word-component-names': 'off',
'no-unused-vars': 'off', // should be turned on once codebase refactored
'unused-imports/no-unused-vars': 'off', // should be turned on once codebase refactored
'vue/require-default-prop': 'off', // should be turned on once codebase refactored
'vue/no-v-html': 'off', // should be turned on once codebase refactored
},
})
import withNuxt from './.nuxt/eslint.config.mjs'
import eslintConfigPrettier from 'eslint-config-prettier'

export default withNuxt(eslintConfigPrettier, {
rules: {
'no-console': 'off',
'vue/multi-word-component-names': 'off',
'no-unused-vars': 'off', // should be turned on once codebase refactored
'unused-imports/no-unused-vars': 'off', // should be turned on once codebase refactored
'vue/require-default-prop': 'off', // should be turned on once codebase refactored
'vue/no-v-html': 'off', // should be turned on once codebase refactored
},
})
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server