From 579afed5d3041a3a7288ed322597d472ef9006c1 Mon Sep 17 00:00:00 2001 From: Kristian Dupont Date: Wed, 8 Dec 2021 03:53:44 +0000 Subject: [PATCH] Fix linter errors --- src/rules/nameInflection.js | 2 +- src/rules/types.test.js | 1 + test/helpers.js | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rules/nameInflection.js b/src/rules/nameInflection.js index 11cfbe54..8ea15744 100644 --- a/src/rules/nameInflection.js +++ b/src/rules/nameInflection.js @@ -3,7 +3,7 @@ const irregularPlurals = require('irregular-plurals/irregular-plurals.json'); const singulars = R.keys(irregularPlurals); const plurals = R.values(irregularPlurals); -const trimSeparators = (s) => s.replace(/^(\-|_)+|(\-|_)+$/g, ''); +const trimSeparators = (s) => s.replace(/^(-|_)+|(-|_)+$/g, ''); const detectInflection = (word) => { const words = word diff --git a/src/rules/types.test.js b/src/rules/types.test.js index a551d8aa..fe07eae6 100644 --- a/src/rules/types.test.js +++ b/src/rules/types.test.js @@ -1,3 +1,4 @@ +/* global assertJSONBReport, assertTextReport, assertIdentityReport */ import * as types from './types'; describe('types', () => { diff --git a/test/helpers.js b/test/helpers.js index fde6e24e..d8ef09e5 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ + global.assertReport = ( mockReporter, expectedRule,