Jonas Jenwald
f012fc5e70
[ESM] Convert the "cmaps"-task to use import()
syntax
2023-07-08 18:52:58 +02:00
Jonas Jenwald
dcd55a7164
Enable unicorn/prefer-at
unconditionally (PR 15014 follow-up)
...
Now that Node.js version 18 is required, we should be able to use `Array.prototype.at()` everywhere in the code-base.
2023-05-07 13:43:19 +02:00
Jonas Jenwald
1fc09f0235
Enable the unicorn/prefer-string-replace-all
ESLint plugin rule
...
Note that the `replaceAll` method still requires that a *global* regular expression is used, however by using this method it's immediately obvious when looking at the code that all occurrences will be replaced; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll#parameters
Please find additional details at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
2023-03-23 12:57:10 +01:00
Jonas Jenwald
37ebc28756
Use more for...of
loops in the code-base
...
Note that these cases, which are all in older code, were found using the [`unicorn/no-for-loop`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md ) ESLint plugin rule.
However, note that I've opted not to enable this rule by default since there's still *some* cases where I do think that it makes sense to allow "regular" for-loops.
2022-07-17 16:18:54 +02:00
Tim van der Meij
0d84f57cfa
Fix inefficient regular expressions in external/cmapscompress/parse.js
...
The only purpose, according to the README and existing files, is to
parse an integer from those lines, so (\d+) is sufficient for that. This
avoids potential exponential backtracking as flagged by CodeQL. I have
compared the output of the script with and without these changes and the
resulting files are the same.
2021-08-01 12:12:42 +02:00
Jonas Jenwald
819be0e78b
Fix the remaining ESLint operator-assignment
errors
2021-07-04 15:23:56 +02:00
Jonas Jenwald
901b24e8af
Enable the ESLint operator-assignment
rule
...
This patch was generated automatically, using the `gulp lint --fix` command.
Please find additional details about the ESLint rule at https://eslint.org/docs/rules/operator-assignment
2021-07-04 12:57:45 +02:00
Jonas Jenwald
8943bcd3c3
Account for formatting changes in Prettier version 2.3.0
...
With the exception of one tweaked `eslint-disable` comment, in `web/generic_scripting.js`, this patch was generated automatically using `gulp lint --fix`.
Please find additional information at:
- https://github.com/prettier/prettier/releases/tag/2.3.0
- https://prettier.io/blog/2021/05/09/2.3.0.html
2021-05-16 11:44:05 +02:00
Jonas Jenwald
96d2a2f795
Enable the ESLint no-var
rule in the external/
folder
...
These changes were done automatically, by using the `gulp lint --fix` command.
2021-03-14 11:43:25 +01:00
Jonas Jenwald
98e658ddf0
Enable linting of the external/cmapscompress/
folder
...
Given that this our "own" code, there's no good reason as far as I'm concerned to not lint it.
2021-03-13 19:32:58 +01:00
Jonas Jenwald
b9f4d89254
Fix *most* linting/formatting issues in the external/cmapscompress/
folder
...
These changes were done automatically, by using the `gulp lint --fix` command, in preparation for the next patch.
2021-03-13 19:24:23 +01:00
Jonas Jenwald
842e9206c0
Replace String.prototype.substr()
occurrences with String.prototype.substring()
...
As outlined in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr , which refers to the ECMA-262 specification, using the `substr` function is advised against.
Hence this PR, which replaces all remaining `substr` occurrences with `substring` instead. Please refer to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr#Syntax respectively https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring#Syntax for the differences between the two functions.
Note that in most cases in the code-base there's only one argument passed to `substr`, and those require no other changes except replacing "substr" with "substring". For the other cases, the `substr(start, length)` calls are changed to `substring(start, start + length)` instead.
2018-09-28 11:41:07 +02:00
Wojciech Maj
ea2850e9a7
Fix typos
2018-04-01 23:20:41 +02:00
Yury Delendik
1d8f6cf0e7
Updates make.js for cmaps and make binary cmaps by default
2014-03-17 13:30:43 -05:00
Yury Delendik
3e8ea958ae
Quick notes about the format
2014-03-14 16:59:40 -05:00
Yury Delendik
69efd9cb96
CMaps binary packing
2014-03-14 16:46:35 -05:00