module.exports = {
  root: true,
  env: {
    node: true
  },
  extends: [
    'eslint:recommended',
    'plugin:vue/vue3-recommended'
  ],
  globals: {
    // Vue3 API（uni-app 已内置）
    ref: 'readonly',
    reactive: 'readonly',
    computed: 'readonly',
    watch: 'readonly',
    watchEffect: 'readonly',
    onMounted: 'readonly',
    onUnmounted: 'readonly',
    nextTick: 'readonly',
    getCurrentInstance: 'readonly',

    // Vue3 SFC 宏（无需 import）
    defineProps: 'readonly',
    defineEmits: 'readonly',
    defineExpose: 'readonly',
    withDefaults: 'readonly',

    // uni-app API
    uni: 'readonly',

    // uni-app 页面生命周期
    onLoad: 'readonly',
    onShow: 'readonly',
    onHide: 'readonly',
    onReady: 'readonly',
    onUnload: 'readonly',
    onPullDownRefresh: 'readonly',
    onReachBottom: 'readonly',
    onShareAppMessage: 'readonly'
  },
  rules: {
    // 可按需要添加规则
    "quotes": ["error", "double"]
  }
}
