.eslintrc.json 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "root": true,
  3. "extends": [
  4. "eslint:recommended",
  5. "plugin:@typescript-eslint/eslint-recommended",
  6. "plugin:@typescript-eslint/recommended",
  7. "prettier",
  8. "plugin:react/recommended",
  9. "plugin:react-hooks/recommended"
  10. ],
  11. "rules": {
  12. "react/prop-types": "off",
  13. "func-style": "error",
  14. "@typescript-eslint/interface-name-prefix": [
  15. "error",
  16. { "prefixWithI": "always" }
  17. ],
  18. "@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }],
  19. "@typescript-eslint/no-use-before-define": "off",
  20. "@typescript-eslint/camelcase": "off",
  21. "@typescript-eslint/no-explicit-any": "off",
  22. "@typescript-eslint/no-non-null-assertion": "off",
  23. "@typescript-eslint/no-namespace": "off",
  24. "header/header": [
  25. 2,
  26. "block",
  27. [
  28. "",
  29. " * Copyright 2018-2022 Elyra Authors",
  30. " *",
  31. " * Licensed under the Apache License, Version 2.0 (the \"License\");",
  32. " * you may not use this file except in compliance with the License.",
  33. " * You may obtain a copy of the License at",
  34. " *",
  35. " * http://www.apache.org/licenses/LICENSE-2.0",
  36. " *",
  37. " * Unless required by applicable law or agreed to in writing, software",
  38. " * distributed under the License is distributed on an \"AS IS\" BASIS,",
  39. " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
  40. " * See the License for the specific language governing permissions and",
  41. " * limitations under the License.",
  42. " "
  43. ]
  44. ],
  45. "import/order": [
  46. "error",
  47. {
  48. "alphabetize": { "order": "asc", "caseInsensitive": true },
  49. "newlines-between": "always-and-inside-groups"
  50. }
  51. ],
  52. "eqeqeq": ["warn", "always"]
  53. },
  54. "overrides": [
  55. {
  56. "files": ["*.js", "*.jsx"],
  57. "rules": {
  58. "@typescript-eslint/explicit-function-return-type": "off",
  59. "@typescript-eslint/no-var-requires": "off"
  60. }
  61. }
  62. ],
  63. "parser": "@typescript-eslint/parser",
  64. "plugins": ["@typescript-eslint", "header", "import"],
  65. "settings": {
  66. "react": {
  67. "version": "detect"
  68. }
  69. }
  70. }