Tiny UI library for Preact https://git.dany.dev/dsluijk/teenyui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

127 lines
4.5 KiB

  1. {
  2. "extends": [
  3. "eslint:recommended",
  4. "plugin:@typescript-eslint/eslint-recommended",
  5. "plugin:@typescript-eslint/recommended",
  6. "prettier/@typescript-eslint"
  7. ],
  8. "ignorePatterns": ["*.d.ts"],
  9. "parser": "@typescript-eslint/parser",
  10. "parserOptions": {
  11. "ecmaVersion": 6,
  12. "sourceType": "module",
  13. "project": ["./tsconfig.json", "./example/tsconfig.json"],
  14. "ecmaFeatures": {
  15. "jsx": true
  16. }
  17. },
  18. "plugins": ["@typescript-eslint"],
  19. "env": {
  20. "browser": true
  21. },
  22. "rules": {
  23. "complexity": ["error", 7],
  24. "eqeqeq": "error",
  25. "yoda": "error",
  26. "no-use-before-define": "off",
  27. "@typescript-eslint/no-use-before-define": ["error", { "enums": false }],
  28. "block-spacing": "error",
  29. "brace-style": "off",
  30. "@typescript-eslint/brace-style": "error",
  31. "camelcase": "error",
  32. "capitalized-comments": "error",
  33. "comma-dangle": ["error", "always-multiline"],
  34. "comma-spacing": "off",
  35. "@typescript-eslint/comma-spacing": "error",
  36. "comma-style": "error",
  37. "computed-property-spacing": "error",
  38. "func-call-spacing": "off",
  39. "@typescript-eslint/func-call-spacing": "error",
  40. "func-style": "error",
  41. "implicit-arrow-linebreak": "error",
  42. "indent": "off",
  43. "@typescript-eslint/indent": ["error", 2],
  44. "jsx-quotes": "error",
  45. "keyword-spacing": "error",
  46. "line-comment-position": "error",
  47. "lines-between-class-members": "error",
  48. "max-depth": ["error", 3],
  49. "max-lines-per-function": ["error", 50],
  50. "max-statements-per-line": "error",
  51. "multiline-comment-style": "error",
  52. "multiline-ternary": ["error", "always-multiline"],
  53. "no-multiple-empty-lines": ["error", { "max": 1 }],
  54. "no-nested-ternary": "error",
  55. "no-trailing-spaces": "error",
  56. "no-unneeded-ternary": "error",
  57. "no-whitespace-before-property": "error",
  58. "nonblock-statement-body-position": "error",
  59. "object-curly-newline": ["error"],
  60. "object-curly-spacing": ["error", "always"],
  61. "one-var-declaration-per-line": "error",
  62. "operator-linebreak": ["error"],
  63. "padded-blocks": ["error", "never"],
  64. "quotes": "off",
  65. "@typescript-eslint/quotes": "error",
  66. "semi": "off",
  67. "@typescript-eslint/semi": ["error", "always"],
  68. "semi-spacing": "error",
  69. "semi-style": "error",
  70. "space-before-blocks": "error",
  71. "space-in-parens": "error",
  72. "space-infix-ops": "error",
  73. "spaced-comment": "error",
  74. "switch-colon-spacing": "error",
  75. "arrow-body-style": "error",
  76. "arrow-parens": "error",
  77. "arrow-spacing": "error",
  78. "no-confusing-arrow": "error",
  79. "no-duplicate-imports": "error",
  80. "no-useless-constructor": "off",
  81. "@typescript-eslint/no-useless-constructor": "error",
  82. "no-var": "error",
  83. "prefer-arrow-callback": "error",
  84. "prefer-const": "error",
  85. "prefer-template": "error",
  86. "template-curly-spacing": "error",
  87. "@typescript-eslint/require-await": "error",
  88. "@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
  89. "@typescript-eslint/await-thenable": "error",
  90. "@typescript-eslint/ban-ts-comment": "error",
  91. "@typescript-eslint/class-literal-property-style": "error",
  92. "@typescript-eslint/consistent-type-definitions": ["error", "interface"],
  93. "@typescript-eslint/explicit-function-return-type": [
  94. "error",
  95. { "allowExpressions": true }
  96. ],
  97. "@typescript-eslint/explicit-member-accessibility": [
  98. "error",
  99. { "accessibility": "explicit" }
  100. ],
  101. "@typescript-eslint/member-delimiter-style": "error",
  102. "@typescript-eslint/member-ordering": "error",
  103. "@typescript-eslint/method-signature-style": "error",
  104. "@typescript-eslint/no-base-to-string": "error",
  105. "@typescript-eslint/no-explicit-any": "error",
  106. "@typescript-eslint/no-floating-promises": "error",
  107. "@typescript-eslint/no-for-in-array": "error",
  108. "@typescript-eslint/no-implied-eval": "error",
  109. "@typescript-eslint/no-throw-literal": "error",
  110. "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
  111. "@typescript-eslint/no-unused-vars": [
  112. "error",
  113. {
  114. "args": "after-used",
  115. "varsIgnorePattern": "^(h)$",
  116. "caughtErrors": "all"
  117. }
  118. ],
  119. "@typescript-eslint/prefer-for-of": "error",
  120. "@typescript-eslint/prefer-nullish-coalescing": "error",
  121. "@typescript-eslint/prefer-optional-chain": "error",
  122. "@typescript-eslint/prefer-readonly": "error",
  123. "@typescript-eslint/promise-function-async": "error",
  124. "@typescript-eslint/switch-exhaustiveness-check": "error"
  125. }
  126. }