.eslintrc.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {
  2. "env": {
  3. "browser": true,
  4. "es6": true
  5. },
  6. "globals": {},
  7. "overrides": [
  8. {
  9. "files": [
  10. "*.ts"
  11. ],
  12. "extends": [
  13. "openlayers",
  14. "plugin:@typescript-eslint/eslint-recommended",
  15. "plugin:@typescript-eslint/recommended",
  16. "plugin:@angular-eslint/recommended",
  17. "plugin:@angular-eslint/recommended--extra"
  18. ],
  19. "plugins": [
  20. "@typescript-eslint",
  21. "@angular-eslint",
  22. "eslint-plugin-tsdoc"
  23. ],
  24. "parser": "@typescript-eslint/parser",
  25. "parserOptions": {
  26. "ecmaVersion": 2018
  27. },
  28. "rules": {
  29. "@angular-eslint/directive-selector": [
  30. "error",
  31. {
  32. "type": "attribute",
  33. "prefix": "fc",
  34. "style": "camelCase"
  35. }
  36. ],
  37. "@angular-eslint/component-selector": [
  38. "error",
  39. {
  40. "type": "element",
  41. "prefix": ["fc", "fieldcalc", ""],
  42. "style": "kebab-case"
  43. }
  44. ],
  45. "brace-style": "warn",
  46. "no-console": "warn",
  47. "object-curly-spacing": "warn",
  48. "prefer-arrow-callback": "warn",
  49. "space-before-function-paren": "off",
  50. "import/extensions": [
  51. "error",
  52. "ignorePackages",
  53. {
  54. "js": "never",
  55. "ts": "never"
  56. }
  57. ],
  58. "@typescript-eslint/no-empty-function": [
  59. "error",
  60. {
  61. "allow": [
  62. "constructors"
  63. ]
  64. }
  65. ],
  66. "valid-jsdoc": "off",
  67. "tsdoc/syntax": "warn"
  68. },
  69. "settings": {
  70. "jsdoc": {
  71. "tagNamePreference": {
  72. "returns": "returns"
  73. },
  74. "require-returns-type": "off"
  75. }
  76. }
  77. },
  78. {
  79. "files": [
  80. "*.html"
  81. ],
  82. "parser": "@angular-eslint/template-parser",
  83. "extends": [
  84. "plugin:@angular-eslint/template/recommended"
  85. ],
  86. "plugins": [
  87. "@angular-eslint/template"
  88. ],
  89. "rules": {}
  90. },
  91. {
  92. "files": [
  93. "**/*.spec.ts"
  94. ],
  95. "env": {
  96. "jasmine": true
  97. }
  98. }
  99. ],
  100. "settings": {
  101. "import/resolver": {
  102. "node": {
  103. "extensions": [
  104. ".js",
  105. ".ts"
  106. ]
  107. }
  108. }
  109. }
  110. }