eslint.config.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import pluginVue from 'eslint-plugin-vue';
  2. import vueTsEslintConfig from '@vue/eslint-config-typescript';
  3. import prettier from 'eslint-plugin-prettier';
  4. import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
  5. export default [
  6. {
  7. name: 'app/files-to-lint',
  8. files: ['**/*.{ts,mts,tsx,vue}'],
  9. },
  10. {
  11. name: 'app/files-to-ignore',
  12. ignores: [
  13. '**/dist/**',
  14. '**/dist-ssr/**',
  15. '**/coverage/**',
  16. '**/packages/**',
  17. '**/build/**',
  18. ],
  19. },
  20. ...pluginVue.configs['flat/recommended'],
  21. ...vueTsEslintConfig(),
  22. skipFormatting,
  23. {
  24. languageOptions: {
  25. parserOptions: {
  26. ecmaVersion: 2020,
  27. ecmaFeatures: {
  28. jsx: true,
  29. },
  30. },
  31. },
  32. rules: {
  33. '@typescript-eslint/ban-ts-ignore': 'off',
  34. '@typescript-eslint/explicit-function-return-type': 'off',
  35. '@typescript-eslint/no-explicit-any': 'off',
  36. '@typescript-eslint/no-var-requires': 'off',
  37. '@typescript-eslint/no-empty-function': 'off',
  38. '@typescript-eslint/no-use-before-define': 'off',
  39. '@typescript-eslint/ban-ts-comment': 'off',
  40. '@typescript-eslint/ban-types': 'off',
  41. '@typescript-eslint/no-non-null-assertion': 'off',
  42. '@typescript-eslint/explicit-module-boundary-types': 'off',
  43. '@typescript-eslint/no-namespace': 'off',
  44. '@typescript-eslint/no-unused-vars': 'off',
  45. '@typescript-eslint/no-empty-object-type': 'off',
  46. 'space-before-function-paren': 'off',
  47. 'no-unused-vars': 'off',
  48. 'no-use-before-define': 'off',
  49. 'no-self-assign': 'off',
  50. 'vue/no-mutating-props': 'off',
  51. 'vue/no-template-shadow': 'off',
  52. 'vue/no-v-html': 'off',
  53. 'vue/component-name-in-template-casing': ['error', 'kebab-case'],
  54. 'vue/component-definition-name-casing': ['error', 'kebab-case'],
  55. 'vue/attributes-order': 'off',
  56. 'vue/one-component-per-file': 'off',
  57. 'vue/html-closing-bracket-newline': 'off',
  58. 'vue/max-attributes-per-line': 'off',
  59. 'vue/multiline-html-element-content-newline': 'off',
  60. 'vue/multi-word-component-names': 'off',
  61. 'vue/singleline-html-element-content-newline': 'off',
  62. 'vue/attribute-hyphenation': 'off',
  63. 'vue/html-self-closing': 'off',
  64. 'vue/require-default-prop': 'off',
  65. 'vue/v-on-event-hyphenation': 'off',
  66. 'vue/block-lang': 'off',
  67. },
  68. },
  69. ];