@nitra/eslint-config 3.6.6 → 3.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +82 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -255,6 +255,86 @@ const vueVite = [
|
|
|
255
255
|
}
|
|
256
256
|
]
|
|
257
257
|
|
|
258
|
+
/**
|
|
259
|
+
* Глобалі для типового Vite + auto-import: Composition API, vue-router, Quasar, пакет vue-apollo-composable.
|
|
260
|
+
* У пакеті `globals` ключ `vue` містить лише макроси `<script setup>` (`defineProps` тощо), без `onMounted` /
|
|
261
|
+
* `createApp` / `useRouter` — без цього списку `no-undef` хибно спрацьовує у `.vue` і `.js` під директоріями Vue.
|
|
262
|
+
*/
|
|
263
|
+
const VUE_VITE_AUTO_IMPORT_GLOBALS = Object.fromEntries(
|
|
264
|
+
[
|
|
265
|
+
'cloneVNode',
|
|
266
|
+
'computed',
|
|
267
|
+
'createApp',
|
|
268
|
+
'customRef',
|
|
269
|
+
'defineAsyncComponent',
|
|
270
|
+
'defineComponent',
|
|
271
|
+
'effectScope',
|
|
272
|
+
'getCurrentInstance',
|
|
273
|
+
'getCurrentScope',
|
|
274
|
+
'h',
|
|
275
|
+
'inject',
|
|
276
|
+
'isProxy',
|
|
277
|
+
'isReactive',
|
|
278
|
+
'isReadonly',
|
|
279
|
+
'isRef',
|
|
280
|
+
'isVNode',
|
|
281
|
+
'markRaw',
|
|
282
|
+
'mergeProps',
|
|
283
|
+
'nextTick',
|
|
284
|
+
'onActivated',
|
|
285
|
+
'onBeforeMount',
|
|
286
|
+
'onBeforeRouteLeave',
|
|
287
|
+
'onBeforeRouteUpdate',
|
|
288
|
+
'onBeforeUnmount',
|
|
289
|
+
'onBeforeUpdate',
|
|
290
|
+
'onDeactivated',
|
|
291
|
+
'onErrorCaptured',
|
|
292
|
+
'onMounted',
|
|
293
|
+
'onRenderTracked',
|
|
294
|
+
'onRenderTriggered',
|
|
295
|
+
'onScopeDispose',
|
|
296
|
+
'onServerPrefetch',
|
|
297
|
+
'onUnmounted',
|
|
298
|
+
'onUpdated',
|
|
299
|
+
'provide',
|
|
300
|
+
'reactive',
|
|
301
|
+
'readonly',
|
|
302
|
+
'ref',
|
|
303
|
+
'resolveComponent',
|
|
304
|
+
'resolveDirective',
|
|
305
|
+
'shallowReactive',
|
|
306
|
+
'shallowReadonly',
|
|
307
|
+
'shallowRef',
|
|
308
|
+
'toRef',
|
|
309
|
+
'toRefs',
|
|
310
|
+
'toValue',
|
|
311
|
+
'triggerRef',
|
|
312
|
+
'unref',
|
|
313
|
+
'useApolloClient',
|
|
314
|
+
'useAttrs',
|
|
315
|
+
'useCssModule',
|
|
316
|
+
'useCssVars',
|
|
317
|
+
'useId',
|
|
318
|
+
'useLazyQuery',
|
|
319
|
+
'useLink',
|
|
320
|
+
'useModel',
|
|
321
|
+
'useMutation',
|
|
322
|
+
'useQuasar',
|
|
323
|
+
'useQuery',
|
|
324
|
+
'useRoute',
|
|
325
|
+
'useRouter',
|
|
326
|
+
'useSlots',
|
|
327
|
+
'useSubscription',
|
|
328
|
+
'useTemplateRef',
|
|
329
|
+
'watch',
|
|
330
|
+
'watchEffect',
|
|
331
|
+
'watchPostEffect',
|
|
332
|
+
'watchSyncEffect',
|
|
333
|
+
'withDirectives',
|
|
334
|
+
'withModifiers'
|
|
335
|
+
].map(name => [name, 'readonly'])
|
|
336
|
+
)
|
|
337
|
+
|
|
258
338
|
// Для усіх файлів Vue проектів
|
|
259
339
|
// files: ['**/*.js', '**/*.vue']
|
|
260
340
|
const vueAllVite = [
|
|
@@ -267,12 +347,9 @@ const vueAllVite = [
|
|
|
267
347
|
gql: 'readonly',
|
|
268
348
|
$ref: 'readonly',
|
|
269
349
|
$computed: 'readonly',
|
|
270
|
-
|
|
271
|
-
useQuery: 'readonly',
|
|
272
|
-
watch: 'readonly',
|
|
273
|
-
computed: 'readonly',
|
|
350
|
+
...VUE_VITE_AUTO_IMPORT_GLOBALS,
|
|
274
351
|
|
|
275
|
-
// Макроси `<script setup>` (
|
|
352
|
+
// Макроси `<script setup>` (у пакеті `globals` — лише `globals.vue`).
|
|
276
353
|
...globals.vue
|
|
277
354
|
}
|
|
278
355
|
}
|