Skip to content

Commit

Permalink
fix: remove corejs dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouvrette committed May 6, 2023
1 parent 57d595c commit b2c13cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
{
"targets": {
"browsers": ["> 0.25%", "not dead"]
},
"useBuiltIns": "usage",
"corejs": {
"version": 3,
"proposals": true
}
}
],
Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ export class PropertiesEditor extends Properties {
// Allow multiline comments.
const commentPrefix = `${options?.commentDelimiter || DEFAULT_COMMENT_DELIMITER} `
const newLines = `${commentPrefix}${comment}`
.replaceAll(/\r?\n/g, `\n${commentPrefix}`)
// eslint-disable-next-line unicorn/prefer-string-replace-all
.replace(/\r?\n/g, `\n${commentPrefix}`)
.split(/\n/)

if (referenceKey === undefined) {
Expand Down
4 changes: 3 additions & 1 deletion src/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ export class KeyCollisions {
* Get the number of the line from which the value will be used.
*/
public getApplicableLineNumber(): number | undefined {
return this.startingLineNumbers.at(-1)
// return this.startingLineNumbers.at(-1)
// eslint-disable-next-line unicorn/prefer-at
return this.startingLineNumbers.slice(-1)[0]
}
}

0 comments on commit b2c13cd

Please sign in to comment.