Skip to content

Commit 5268019

Browse files
committed
feature: @putout/cli-ruler: move out stringify
1 parent 0721d57 commit 5268019

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/cli-ruler/lib/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ import * as ruleProcessor from './rule-processor.js';
66
const cwd = process.cwd();
77

88
const {parse, stringify} = JSON;
9+
const defaultData = stringify({
10+
rules: {},
11+
});
912

1013
export async function ruler(places, {disable, disableAll, enable, enableAll, readFile, writeFile}) {
1114
const name = join(cwd, '.putout.json');
1215

13-
const defaultData = stringify({
14-
rules: {},
15-
});
16-
1716
const [, data = defaultData] = await tryToCatch(readFile, name, 'utf8');
1817
const object = parse(data);
1918

0 commit comments

Comments
 (0)