abbreviations.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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. doc: {
  63. document: true,
  64. },
  65. docs: {
  66. documentation: true,
  67. documents: true,
  68. },
  69. e: {
  70. error: true,
  71. event: true,
  72. },
  73. el: {
  74. element: true,
  75. },
  76. elem: {
  77. element: true,
  78. },
  79. env: {
  80. environment: true,
  81. },
  82. envs: {
  83. environments: true,
  84. },
  85. err: {
  86. error: true,
  87. },
  88. ev: {
  89. event: true,
  90. },
  91. evt: {
  92. event: true,
  93. },
  94. ext: {
  95. extension: true,
  96. },
  97. exts: {
  98. extensions: true,
  99. },
  100. fn: {
  101. function: true,
  102. },
  103. func: {
  104. function: true,
  105. },
  106. i: {
  107. index: true,
  108. },
  109. idx: {
  110. index: true,
  111. },
  112. j: {
  113. index: true,
  114. },
  115. len: {
  116. length: true,
  117. },
  118. lib: {
  119. library: true,
  120. },
  121. mod: {
  122. module: true,
  123. },
  124. msg: {
  125. message: true,
  126. },
  127. num: {
  128. number: true,
  129. },
  130. obj: {
  131. object: true,
  132. },
  133. opts: {
  134. options: true,
  135. },
  136. param: {
  137. parameter: true,
  138. },
  139. params: {
  140. parameters: true,
  141. },
  142. pkg: {
  143. package: true,
  144. },
  145. prev: {
  146. previous: true,
  147. },
  148. prod: {
  149. production: true,
  150. },
  151. prop: {
  152. property: true,
  153. },
  154. props: {
  155. properties: true,
  156. },
  157. ref: {
  158. reference: true,
  159. },
  160. refs: {
  161. references: true,
  162. },
  163. rel: {
  164. related: true,
  165. relationship: true,
  166. relative: true,
  167. },
  168. req: {
  169. request: true,
  170. },
  171. res: {
  172. response: true,
  173. result: true,
  174. },
  175. ret: {
  176. returnValue: true,
  177. },
  178. retval: {
  179. returnValue: true,
  180. },
  181. sep: {
  182. separator: true,
  183. },
  184. src: {
  185. source: true,
  186. },
  187. stdDev: {
  188. standardDeviation: true,
  189. },
  190. str: {
  191. string: true,
  192. },
  193. tbl: {
  194. table: true,
  195. },
  196. temp: {
  197. temporary: true,
  198. },
  199. tit: {
  200. title: true,
  201. },
  202. tmp: {
  203. temporary: true,
  204. },
  205. val: {
  206. value: true,
  207. },
  208. var: {
  209. variable: true,
  210. },
  211. vars: {
  212. variables: true,
  213. },
  214. ver: {
  215. version: true,
  216. },
  217. };
  218. module.exports.defaultAllowList = {
  219. // React.Component Class property
  220. // https://reactjs.org/docs/react-component.html#defaultprops
  221. defaultProps: true,
  222. // `package.json` field
  223. // https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
  224. devDependencies: true,
  225. // Ember class name
  226. // https://api.emberjs.com/ember/3.10/classes/Ember.EmberENV/properties
  227. EmberENV: true,
  228. // React.Component static method
  229. // https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops
  230. getDerivedStateFromProps: true,
  231. // Next.js function
  232. // https://nextjs.org/learn/basics/fetching-data-for-pages
  233. getInitialProps: true,
  234. // React PropTypes
  235. // https://reactjs.org/docs/typechecking-with-proptypes.html
  236. propTypes: true,
  237. // Jest configuration
  238. // https://jestjs.io/docs/en/configuration#setupfilesafterenv-array
  239. setupFilesAfterEnv: true,
  240. };
  241. module.exports.defaultIgnore = [
  242. // Internationalization and localization
  243. // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1188
  244. 'i18n',
  245. 'l10n',
  246. ];