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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

126 lines
4.4 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-statements-per-line": "error",
  50. "multiline-comment-style": "error",
  51. "multiline-ternary": ["error", "always-multiline"],
  52. "no-multiple-empty-lines": ["error", { "max": 1 }],
  53. "no-nested-ternary": "error",
  54. "no-trailing-spaces": "error",
  55. "no-unneeded-ternary": "error",
  56. "no-whitespace-before-property": "error",
  57. "nonblock-statement-body-position": "error",
  58. "object-curly-newline": ["error"],
  59. "object-curly-spacing": ["error", "always"],
  60. "one-var-declaration-per-line": "error",
  61. "operator-linebreak": ["error"],
  62. "padded-blocks": ["error", "never"],
  63. "quotes": "off",
  64. "@typescript-eslint/quotes": "error",
  65. "semi": "off",
  66. "@typescript-eslint/semi": ["error", "always"],
  67. "semi-spacing": "error",
  68. "semi-style": "error",
  69. "space-before-blocks": "error",
  70. "space-in-parens": "error",
  71. "space-infix-ops": "error",
  72. "spaced-comment": "error",
  73. "switch-colon-spacing": "error",
  74. "arrow-body-style": "error",
  75. "arrow-parens": "error",
  76. "arrow-spacing": "error",
  77. "no-confusing-arrow": "error",
  78. "no-duplicate-imports": "error",
  79. "no-useless-constructor": "off",
  80. "@typescript-eslint/no-useless-constructor": "error",
  81. "no-var": "error",
  82. "prefer-arrow-callback": "error",
  83. "prefer-const": "error",
  84. "prefer-template": "error",
  85. "template-curly-spacing": "error",
  86. "@typescript-eslint/require-await": "error",
  87. "@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
  88. "@typescript-eslint/await-thenable": "error",
  89. "@typescript-eslint/ban-ts-comment": "error",
  90. "@typescript-eslint/class-literal-property-style": "error",
  91. "@typescript-eslint/consistent-type-definitions": ["error", "interface"],
  92. "@typescript-eslint/explicit-function-return-type": [
  93. "error",
  94. { "allowExpressions": true }
  95. ],
  96. "@typescript-eslint/explicit-member-accessibility": [
  97. "error",
  98. { "accessibility": "explicit" }
  99. ],
  100. "@typescript-eslint/member-delimiter-style": "error",
  101. "@typescript-eslint/member-ordering": "error",
  102. "@typescript-eslint/method-signature-style": "error",
  103. "@typescript-eslint/no-base-to-string": "error",
  104. "@typescript-eslint/no-explicit-any": "error",
  105. "@typescript-eslint/no-floating-promises": "error",
  106. "@typescript-eslint/no-for-in-array": "error",
  107. "@typescript-eslint/no-implied-eval": "error",
  108. "@typescript-eslint/no-throw-literal": "error",
  109. "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
  110. "@typescript-eslint/no-unused-vars": [
  111. "error",
  112. {
  113. "args": "after-used",
  114. "varsIgnorePattern": "^(h)$",
  115. "caughtErrors": "all"
  116. }
  117. ],
  118. "@typescript-eslint/prefer-for-of": "error",
  119. "@typescript-eslint/prefer-nullish-coalescing": "error",
  120. "@typescript-eslint/prefer-optional-chain": "error",
  121. "@typescript-eslint/prefer-readonly": "error",
  122. "@typescript-eslint/promise-function-async": "error",
  123. "@typescript-eslint/switch-exhaustiveness-check": "error"
  124. }
  125. }