.eslintrc.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. "root": true,
  3. "env": {
  4. "node": true
  5. },
  6. "extends": [
  7. "plugin:vue/recommended",
  8. "eslint:recommended",
  9. "plugin:node/recommended",
  10. "plugin:import/warnings",
  11. "prettier/vue",
  12. "plugin:prettier/recommended"
  13. ],
  14. "parserOptions": {
  15. "parser": "babel-eslint",
  16. "sourceType": "module",
  17. "allowImportExportEverywhere": true
  18. },
  19. "plugins": [
  20. "node",
  21. "prettier",
  22. "promise",
  23. "vue",
  24. "import"
  25. ],
  26. "settings": {
  27. "import/resolver": {
  28. "node": {
  29. "extensions": [
  30. ".js",
  31. ".vue"
  32. ]
  33. }
  34. }
  35. },
  36. "globals": {
  37. "$nuxt": true
  38. },
  39. "rules": {
  40. "vue/component-name-in-template-casing": [
  41. "error",
  42. "PascalCase"
  43. ],
  44. "prettier/prettier": "error",
  45. "max-len": [
  46. "error",
  47. {
  48. "code": 110,
  49. "ignoreComments": true,
  50. "ignoreTrailingComments": true,
  51. "ignoreUrls": true,
  52. "ignoreStrings": true,
  53. "ignoreTemplateLiterals": true,
  54. "ignoreRegExpLiterals": true
  55. }
  56. ],
  57. "block-scoped-var": "error",
  58. "eqeqeq": "error",
  59. "no-warning-comments": "off",
  60. "no-console": "off",
  61. "node/no-missing-require": "off",
  62. "node/no-unpublished-require": "off",
  63. "node/no-unsupported-features/es-syntax": "off",
  64. "node/no-extraneous-import": "off",
  65. "prefer-arrow-callback": "error",
  66. "no-throw-literal": "warn",
  67. "require-await": "off",
  68. "promise/prefer-await-to-then": "warn",
  69. "promise/no-nesting": "warn",
  70. "prefer-destructuring": [
  71. "warn",
  72. {
  73. "object": true,
  74. "array": false
  75. }
  76. ],
  77. "no-unused-vars": [
  78. "warn",
  79. {
  80. "vars": "all",
  81. "args": "after-used"
  82. }
  83. ],
  84. "func-style": [
  85. "error",
  86. "expression",
  87. {
  88. "allowArrowFunctions": true
  89. }
  90. ]
  91. }
  92. }