Skip to content

Commit

Permalink
update rules
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Nov 9, 2024
1 parent 3d545f7 commit f1b0722
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/rules.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export const noopTest = { exec: () => null } as unknown as RegExp;
const noopTest = { exec: () => null } as unknown as RegExp;

export function edit(regex: string | RegExp, opt?: string) {
function edit(regex: string | RegExp, opt = '') {
let source = typeof regex === 'string' ? regex : regex.source;
opt = opt || '';
const obj = {
replace: (name: string | RegExp, val: string | RegExp) => {
let valSource = typeof val === 'string' ? val : val.source;
Expand All @@ -16,9 +15,6 @@ export function edit(regex: string | RegExp, opt?: string) {
};
return obj;
}
/**
* Other Rules
*/

export const other = {
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
Expand Down

0 comments on commit f1b0722

Please sign in to comment.