.eslintrc.json 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * @Description: eslint 规则
  3. * @Author: James324
  4. * @Date: 2023-08-17 18:23:31
  5. * @LastEditors: James324
  6. * @LastEditTime: 2024-03-19 17:39:03
  7. */
  8. {
  9. "root": true,
  10. "env": {
  11. "es2021": true,
  12. "browser": true,
  13. "node": false
  14. },
  15. "globals": {
  16. "__dirname": true,
  17. "useTest": true,
  18. "useDialog": true,
  19. "MenuStyleType": true,
  20. "HandleOpen": true,
  21. "NodeListOf": true,
  22. "ValidConfig": true,
  23. "TransformedItem": true,
  24. "anyObj": true,
  25. "PageConfig": true,
  26. "StandardOptions": true,
  27. "ColumnCls": true,
  28. "ItemConfig": true,
  29. "SearchRef": true,
  30. "TableRef": true,
  31. "EditRef": true,
  32. "RouteRecordRaw": true,
  33. "SlotData": true,
  34. "FunctionVoid": true,
  35. "OtherConfig": true,
  36. "PickComponentsProps": true,
  37. "paramsStore": true
  38. },
  39. "parser": "vue-eslint-parser",
  40. "parserOptions": {
  41. "parser": "@typescript-eslint/parser",
  42. "ecmaVersion": "latest",
  43. "sourceType": "module",
  44. "ecmaFeatures": {
  45. "jsx": true
  46. }
  47. },
  48. "extends": [
  49. "eslint:recommended",
  50. "plugin:vue/vue3-essential",
  51. "plugin:@typescript-eslint/recommended",
  52. "prettier",
  53. "plugin:prettier/recommended",
  54. "./.eslintrc-auto-import.json"
  55. ],
  56. "plugins": ["vue"],
  57. "rules": {
  58. "eqeqeq": [2, "always", { "null": "ignore" }],
  59. "vue/multi-word-component-names": [0],
  60. "no-async-promise-executor": 0,
  61. "no-useless-escape": 0,
  62. "no-misleading-character-class": 0,
  63. "@typescript-eslint/no-explicit-any": ["off"],
  64. "vue/attributes-order": 2,
  65. "@typescript-eslint/ban-types": [
  66. "error",
  67. {
  68. "extendDefaults": true,
  69. "types": {
  70. "{}": false
  71. }
  72. }
  73. ]
  74. }
  75. }