module.exports = {
  rules: {
    'no-restricted-globals': [
      'error',
      {
        name: 'localStorage',
        message:
          '\n已禁止直接使用 localStorage' +
          '\n请从 @/common/services/storage-service 导入 xmLocalStorage\n',
      },
      {
        name: 'sessionStorage',
        message:
          '\n已禁止直接使用 sessionStorage' +
          '\n请从 @/common/services/storage-service 导入 xmSessionStorage\n',
      },
    ],
    'no-restricted-imports': [
      'warn',
      {
        paths: [
          {
            name: '@/common/services/storage-service',
            importNames: ['sdLocalStorage', 'sdSessionStorage'],
            message: '\n项目定制代码请使用xmLocalStorage、xmSessionStorage\n',
          },
          {
            name: 'axios',
            message: '\n已禁止直接导入axios\n请从 @/common/services/axios-instance 导入\n',
          },
        ],
      },
    ],
    'filenames/match-regex': [2, '^(?!sd-)[a-z0-9-]+$', false],
    'vue/no-static-inline-styles': 0,
  },
}
