Skip to content

Commit

Permalink
chore: drop Node 12 from engines
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Node 12 is soon entering EOL.

Also:
- perf: remove regextra library to reduce dependencies (#865)
- chore: drop Node 12 and add Node 17 to Travis

Co-authored-by: Brett Zamir <brettz9@yahoo.com>
  • Loading branch information
ChrisDryden and brettz9 committed Apr 8, 2022
1 parent e2dbad5 commit be3af9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,9 +2,9 @@ os: linux
dist: xenial
language: node_js
node_js:
- "12.22.0"
- "14.17.0"
- "16"
- "17"
install:
- npm install --legacy-peer-deps
before_script: >
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -10,7 +10,6 @@
"debug": "^4.3.4",
"escape-string-regexp": "^4.0.0",
"esquery": "^1.4.0",
"regextras": "^0.8.0",
"semver": "^7.3.6",
"spdx-expression-parse": "^3.0.1"
},
Expand Down Expand Up @@ -48,7 +47,7 @@
"typescript": "^4.6.3"
},
"engines": {
"node": "^12 || ^14 || ^16 || ^17"
"node": "^14 || ^16 || ^17"
},
"keywords": [
"eslint",
Expand Down
10 changes: 2 additions & 8 deletions src/rules/requireDescriptionCompleteSentence.js
@@ -1,7 +1,4 @@
import escapeStringRegexp from 'escape-string-regexp';
import {
RegExtras,
} from 'regextras/dist/main-umd';
import iterateJsdoc from '../iterateJsdoc';

const otherDescriptiveTags = new Set([
Expand All @@ -25,12 +22,9 @@ const extractSentences = (text, abbreviationsRegex) => {
// Remove custom abbreviations
.replace(abbreviationsRegex, '');

const sentenceEndGrouping = /([.?!])(?:\s+|$)/u;
const sentenceEndGrouping = /([.?!])(?:\s+|$)/ug;

// eslint-disable-next-line unicorn/no-array-method-this-argument
const puncts = new RegExtras(sentenceEndGrouping).map(txt, (punct) => {
return punct;
});
const puncts = txt.matchAll(sentenceEndGrouping);

return txt

Expand Down

0 comments on commit be3af9d

Please sign in to comment.