.eslintrc.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. module.exports = {
  2. extends: [
  3. 'proste/typescript',
  4. 'proste/vue',
  5. ],
  6. globals: {
  7. suite: true,
  8. test: true,
  9. describe: true,
  10. it: true,
  11. expect: true,
  12. assert: true,
  13. vitest: true,
  14. vi: true,
  15. beforeAll: true,
  16. afterAll: true,
  17. beforeEach: true,
  18. afterEach: true,
  19. },
  20. parser: 'vue-eslint-parser',
  21. parserOptions: {
  22. parser: '@typescript-eslint/parser',
  23. project: './tsconfig.json',
  24. tsconfigRootDir: '.',
  25. warnOnUnsupportedTypeScriptVersion: true,
  26. extraFileExtensions: ['.vue'],
  27. },
  28. rules: {
  29. curly: [1, 'multi-or-nest', 'consistent'],
  30. '@typescript-eslint/indent': 0,
  31. indent: [
  32. 2,
  33. 2,
  34. {
  35. SwitchCase: 1,
  36. VariableDeclarator: {
  37. var: 2,
  38. let: 2,
  39. const: 3,
  40. },
  41. ArrayExpression: 1,
  42. ObjectExpression: 1,
  43. ImportDeclaration: 1,
  44. flatTernaryExpressions: false,
  45. },
  46. ],
  47. },
  48. overrides: [
  49. {
  50. files: ['cypress/**', 'cypress.config.ts'],
  51. plugins: ['cypress'],
  52. parserOptions: {
  53. project: './cypress/tsconfig.json',
  54. tsconfigRootDir: __dirname,
  55. warnOnUnsupportedTypeScriptVersion: true,
  56. },
  57. env: {
  58. 'cypress/globals': true,
  59. },
  60. },
  61. ],
  62. };