abbreviations.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. /* eslint sort-keys: ["error", "asc", {"caseSensitive": false}] */
  2. 'use strict';
  3. module.exports.defaultReplacements = {
  4. acc: {
  5. accumulator: true,
  6. },
  7. arg: {
  8. argument: true,
  9. },
  10. args: {
  11. arguments: true,
  12. },
  13. arr: {
  14. array: true,
  15. },
  16. attr: {
  17. attribute: true,
  18. },
  19. attrs: {
  20. attributes: true,
  21. },
  22. btn: {
  23. button: true,
  24. },
  25. cb: {
  26. callback: true,
  27. },
  28. conf: {
  29. config: true,
  30. },
  31. ctx: {
  32. context: true,
  33. },
  34. cur: {
  35. current: true,
  36. },
  37. curr: {
  38. current: true,
  39. },
  40. db: {
  41. database: true,
  42. },
  43. def: {
  44. defer: true,
  45. deferred: true,
  46. define: true,
  47. definition: true,
  48. },
  49. dest: {
  50. destination: true,
  51. },
  52. dev: {
  53. development: true,
  54. },
  55. dir: {
  56. direction: true,
  57. directory: true,
  58. },
  59. dirs: {
  60. directories: true,
  61. },
  62. dist: {
  63. distribution: true,
  64. },
  65. doc: {
  66. document: true,
  67. },
  68. docs: {
  69. documentation: true,
  70. documents: true,
  71. },
  72. dst: {
  73. daylightSavingTime: true,
  74. destination: true,
  75. distribution: true,
  76. },
  77. e: {
  78. error: true,
  79. event: true,
  80. },
  81. el: {
  82. element: true,
  83. },
  84. elem: {
  85. element: true,
  86. },
  87. env: {
  88. environment: true,
  89. },
  90. envs: {
  91. environments: true,
  92. },
  93. err: {
  94. error: true,
  95. },
  96. ev: {
  97. event: true,
  98. },
  99. evt: {
  100. event: true,
  101. },
  102. ext: {
  103. extension: true,
  104. },
  105. exts: {
  106. extensions: true,
  107. },
  108. fn: {
  109. function: true,
  110. },
  111. func: {
  112. function: true,
  113. },
  114. i: {
  115. index: true,
  116. },
  117. idx: {
  118. index: true,
  119. },
  120. j: {
  121. index: true,
  122. },
  123. len: {
  124. length: true,
  125. },
  126. lib: {
  127. library: true,
  128. },
  129. mod: {
  130. module: true,
  131. },
  132. msg: {
  133. message: true,
  134. },
  135. num: {
  136. number: true,
  137. },
  138. obj: {
  139. object: true,
  140. },
  141. opts: {
  142. options: true,
  143. },
  144. param: {
  145. parameter: true,
  146. },
  147. params: {
  148. parameters: true,
  149. },
  150. pkg: {
  151. package: true,
  152. },
  153. prev: {
  154. previous: true,
  155. },
  156. prod: {
  157. production: true,
  158. },
  159. prop: {
  160. property: true,
  161. },
  162. props: {
  163. properties: true,
  164. },
  165. ref: {
  166. reference: true,
  167. },
  168. refs: {
  169. references: true,
  170. },
  171. rel: {
  172. related: true,
  173. relationship: true,
  174. relative: true,
  175. },
  176. req: {
  177. request: true,
  178. },
  179. res: {
  180. response: true,
  181. result: true,
  182. },
  183. ret: {
  184. returnValue: true,
  185. },
  186. retval: {
  187. returnValue: true,
  188. },
  189. sep: {
  190. separator: true,
  191. },
  192. src: {
  193. source: true,
  194. },
  195. stdDev: {
  196. standardDeviation: true,
  197. },
  198. str: {
  199. string: true,
  200. },
  201. tbl: {
  202. table: true,
  203. },
  204. temp: {
  205. temporary: true,
  206. },
  207. tit: {
  208. title: true,
  209. },
  210. tmp: {
  211. temporary: true,
  212. },
  213. val: {
  214. value: true,
  215. },
  216. var: {
  217. variable: true,
  218. },
  219. vars: {
  220. variables: true,
  221. },
  222. ver: {
  223. version: true,
  224. },
  225. };
  226. module.exports.defaultAllowList = {
  227. // React.Component Class property
  228. // https://reactjs.org/docs/react-component.html#defaultprops
  229. defaultProps: true,
  230. // `package.json` field
  231. // https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
  232. devDependencies: true,
  233. // Ember class name
  234. // https://api.emberjs.com/ember/3.10/classes/Ember.EmberENV/properties
  235. EmberENV: true,
  236. // React.Component static method
  237. // https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops
  238. getDerivedStateFromProps: true,
  239. // Next.js function
  240. // https://nextjs.org/learn/basics/fetching-data-for-pages
  241. getInitialProps: true,
  242. getServerSideProps: true,
  243. getStaticProps: true,
  244. // React PropTypes
  245. // https://reactjs.org/docs/typechecking-with-proptypes.html
  246. propTypes: true,
  247. // Jest configuration
  248. // https://jestjs.io/docs/en/configuration#setupfilesafterenv-array
  249. setupFilesAfterEnv: true,
  250. };
  251. module.exports.defaultIgnore = [
  252. // Internationalization and localization
  253. // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1188
  254. 'i18n',
  255. 'l10n',
  256. ];