.eslintrc.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright 2022 Pnoker All Rights Reserved
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * https://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. module.exports = {
  17. root: true,
  18. env: {
  19. browser: true,
  20. es2021: true,
  21. node: true,
  22. },
  23. parser: 'vue-eslint-parser',
  24. parserOptions: {
  25. parser: '@typescript-eslint/parser',
  26. sourceType: 'module',
  27. },
  28. extends: ['plugin:vue/vue3-recommended', '@vue/typescript/recommended', 'eslint:recommended', 'plugin:prettier/recommended'],
  29. plugins: ['vue', '@typescript-eslint'],
  30. overrides: [
  31. {
  32. files: ['*.ts', '*.tsx', '*.vue'],
  33. rules: {
  34. 'no-undef': 'off',
  35. },
  36. },
  37. ],
  38. rules: {
  39. '@typescript-eslint/ban-ts-ignore': 'off',
  40. '@typescript-eslint/explicit-function-return-type': 'off',
  41. '@typescript-eslint/no-explicit-any': 'off',
  42. '@typescript-eslint/no-var-requires': 'off',
  43. '@typescript-eslint/no-empty-function': 'off',
  44. '@typescript-eslint/no-use-before-define': 'off',
  45. '@typescript-eslint/ban-ts-comment': 'off',
  46. '@typescript-eslint/ban-types': 'off',
  47. '@typescript-eslint/no-non-null-assertion': 'off',
  48. '@typescript-eslint/explicit-module-boundary-types': 'off',
  49. '@typescript-eslint/no-redeclare': 'error',
  50. '@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
  51. '@typescript-eslint/no-unused-vars': [2],
  52. 'vue/custom-event-name-casing': 'off',
  53. 'vue/attributes-order': 'off',
  54. 'vue/one-component-per-file': 'off',
  55. 'vue/html-closing-bracket-newline': 'off',
  56. 'vue/max-attributes-per-line': 'off',
  57. 'vue/multiline-html-element-content-newline': 'off',
  58. 'vue/singleline-html-element-content-newline': 'off',
  59. 'vue/attribute-hyphenation': 'off',
  60. 'vue/html-self-closing': 'off',
  61. 'vue/no-multiple-template-root': 'off',
  62. 'vue/require-default-prop': 'off',
  63. 'vue/no-v-model-argument': 'off',
  64. 'vue/no-arrow-functions-in-watch': 'off',
  65. 'vue/no-template-key': 'off',
  66. 'vue/no-v-html': 'off',
  67. 'vue/comment-directive': 'off',
  68. 'vue/no-parsing-error': 'off',
  69. 'vue/no-deprecated-v-on-native-modifier': 'off',
  70. 'vue/multi-word-component-names': 'off',
  71. 'no-useless-escape': 'off',
  72. 'no-sparse-arrays': 'off',
  73. 'no-prototype-builtins': 'off',
  74. 'no-constant-condition': 'off',
  75. 'no-use-before-define': 'off',
  76. 'no-restricted-globals': 'off',
  77. 'no-restricted-syntax': 'off',
  78. 'generator-star-spacing': 'off',
  79. 'no-unreachable': 'off',
  80. 'no-multiple-template-root': 'off',
  81. 'no-unused-vars': 'error',
  82. 'no-v-model-argument': 'off',
  83. 'no-case-declarations': 'off',
  84. 'eol-last': 'off',
  85. 'no-console': 'off',
  86. 'no-redeclare': 'off',
  87. },
  88. }