.eslintrc 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. {
  2. "plugins": [],
  3. "parser": "@typescript-eslint/parser",
  4. "extends": [
  5. "plugin:react/recommended",
  6. "plugin:@typescript-eslint/recommended"
  7. ],
  8. "env": {
  9. "es6": true,
  10. "browser": true, //내장 객체 사용 여부
  11. "jquery": true,
  12. "node": true,
  13. "mocha": true
  14. },
  15. "parserOptions": {
  16. "ecmaVersion": 2017,
  17. "sourceType": "module",
  18. "ecmaFeatures": {
  19. "jsx": true,
  20. "experimentalObjectRestSpread": true
  21. }
  22. },
  23. "settings": {
  24. "react": {
  25. "version": "detect"
  26. }
  27. },
  28. "ignorePatterns": [
  29. "serviceWorker.js",
  30. "node_modules/",
  31. "build/",
  32. "LikeAnimationDataMobile.ts",
  33. "LikeAnimationDataPC.ts",
  34. "naverTvLivePlayerPC.min.js"
  35. ],
  36. "rules": {
  37. "prefer-const": "warn",
  38. "no-var": "warn",
  39. "eqeqeq": 0,
  40. "no-const-assign": "warn",
  41. "no-new-object": "warn",
  42. "object-shorthand": "warn",
  43. "no-prototype-builtins": "warn",
  44. "no-array-constructor": "warn",
  45. "no-useless-escape": "warn",
  46. "wrap-iife": [
  47. "warn",
  48. "inside"
  49. ],
  50. "no-loop-func": "warn",
  51. "no-new-func": "warn",
  52. "prefer-rest-params": "warn",
  53. "space-before-function-paren": [
  54. "warn",
  55. {
  56. "anonymous": "never",
  57. "named": "never",
  58. "asyncArrow": "always"
  59. }
  60. ],
  61. "prefer-arrow-callback": "warn",
  62. "template-curly-spacing": "warn",
  63. "no-param-reassign": [
  64. "warn",
  65. {
  66. "props": false
  67. }
  68. ],
  69. "prefer-spread": "warn",
  70. "arrow-spacing": "warn",
  71. "arrow-body-style": "off",
  72. "no-confusing-arrow": [
  73. "warn",
  74. {
  75. "allowParens": true
  76. }
  77. ],
  78. "no-useless-constructor": "warn",
  79. "no-dupe-class-members": "warn",
  80. "no-duplicate-imports": "warn",
  81. "dot-notation": "warn",
  82. "no-undef": [
  83. "warn",
  84. {
  85. "typeof": true
  86. }
  87. ],
  88. "one-var": [
  89. "warn",
  90. "never"
  91. ],
  92. "no-multi-assign": "warn",
  93. "no-case-declarations": "warn",
  94. "no-nested-ternary": "warn",
  95. "no-unneeded-ternary": "warn",
  96. "brace-style": "warn",
  97. "space-before-blocks": [
  98. "warn",
  99. {
  100. "functions": "always",
  101. "keywords": "always",
  102. "classes": "always"
  103. }
  104. ],
  105. "space-infix-ops": "warn",
  106. "eol-last": [
  107. "warn",
  108. "always"
  109. ],
  110. "no-whitespace-before-property": "warn",
  111. "padded-blocks": [
  112. "warn",
  113. "never"
  114. ],
  115. "space-in-parens": [
  116. "warn",
  117. "never"
  118. ],
  119. "array-bracket-spacing": [
  120. "warn",
  121. "never"
  122. ],
  123. "object-curly-spacing": [
  124. "warn",
  125. "always"
  126. ],
  127. "max-len": [
  128. "warn",
  129. {
  130. "code": 100
  131. }
  132. ],
  133. "comma-style": [
  134. "warn",
  135. "last"
  136. ],
  137. "semi": [
  138. "warn"
  139. ],
  140. "radix": "warn",
  141. "curly": "warn",
  142. "quotes": [
  143. "warn",
  144. "single",
  145. {
  146. "allowTemplateLiterals": true
  147. }
  148. ],
  149. "indent": [
  150. "warn",
  151. 2,
  152. {
  153. "SwitchCase": 1
  154. }
  155. ],
  156. "keyword-spacing": "warn",
  157. "@typescript-eslint/explicit-function-return-type": "off",
  158. "@typescript-eslint/interface-name-prefix": [
  159. "warn",
  160. {
  161. "prefixWithI": "always"
  162. }
  163. ],
  164. "@typescript-eslint/no-empty-interface": "off",
  165. "@typescript-eslint/no-unused-vars": "off",
  166. "@typescript-eslint/no-empty-function": "off",
  167. "@typescript-eslint/no-explicit-any": "off",
  168. "@typescript-eslint/no-use-before-define": "off",
  169. "@typescript-eslint/camelcase": "off",
  170. "@typescript-eslint/no-var-requires": "off",
  171. "react/prop-types": "off",
  172. "react/jsx-closing-bracket-location": [
  173. 1,
  174. "tag-aligned"
  175. ],
  176. "react/jsx-closing-tag-location": "warn",
  177. "react/jsx-max-props-per-line": [
  178. 2,
  179. {
  180. "maximum": 1,
  181. "when": "multiline"
  182. }
  183. ],
  184. "react/jsx-one-expression-per-line": "off",
  185. "react/jsx-indent": [
  186. "warn",
  187. 2,
  188. {
  189. "checkAttributes": true,
  190. "indentLogicalExpressions": true
  191. }
  192. ],
  193. }
  194. }