- Fixed lgtm comments

This commit is contained in:
Ferdi Koomen 2021-03-19 14:32:41 +01:00
parent 3185b1bd14
commit e1de003704
3 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ const getPlugins = () => {
return plugins;
}
return [...plugins, terser()];
}
};
module.exports = {
input: './src/index.ts',

View File

@ -3,7 +3,7 @@ import type { Enum } from '../../../client/interfaces/Enum';
export function getEnumFromDescription(description: string): Enum[] {
// Check if we can find this special format string:
// None=0,Something=1,AnotherThing=2
if (/^(\w+=[0-9]+,?)+$/g.test(description)) {
if (/^(\w+=[0-9]+)/g.test(description)) {
const matches = description.match(/(\w+=[0-9]+,?)/g);
if (matches) {
// Grab the values from the description

View File

@ -3,7 +3,7 @@ import type { Enum } from '../../../client/interfaces/Enum';
export function getEnumFromDescription(description: string): Enum[] {
// Check if we can find this special format string:
// None=0,Something=1,AnotherThing=2
if (/^(\w+=[0-9]+,?)+$/g.test(description)) {
if (/^(\w+=[0-9]+)/g.test(description)) {
const matches = description.match(/(\w+=[0-9]+,?)/g);
if (matches) {
// Grab the values from the description