Skip to content

Commit f163302

Browse files
committed
Format with prettier
1 parent 502aee5 commit f163302

14 files changed

Lines changed: 46 additions & 21 deletions

‎.lintstagedrc.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
'*{.js,*.ts}':
22
- eslint --fix
3+
- prettier --write
4+
5+
'*.{json,yml,yaml,md}':
6+
- prettier --write

‎.prettierignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

‎.prettierrc.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
singleQuote: true
2+
printWidth: 100
3+
semi: true
4+
tabWidth: 2
5+
trailingComma: all
6+
useTabs: false

‎dist/main.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/main.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎eslint.config.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export default pegasus.tsConfig(
88
languageOptions: {
99
parserOptions: {
1010
projectService: true,
11-
}
12-
}
11+
},
12+
},
1313
},
1414
{
15-
ignores: ['dist/', 'lib/']
16-
}
17-
)
15+
ignores: ['dist/', 'lib/'],
16+
},
17+
);

‎package-lock.json‎

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"husky": "^9.1.7",
4444
"is-ci": "^4.1.0",
4545
"lint-staged": "^16.1.2",
46+
"prettier": "^3.6.2",
4647
"tsdown": "^0.12.9",
4748
"typescript": "^5.8.3"
4849
}

‎src/eslint.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,10 @@ export const runEslint = async (): Promise<void> => {
3131
return;
3232
}
3333

34-
const eslintArgs = getEslintArgs();
3534
const { command, args } = getExecutionCommand();
35+
const eslintArgs = getEslintArgs();
3636

37-
const execArgs = [
38-
...args,
39-
...files,
40-
...eslintArgs,
41-
].filter(Boolean);
37+
const execArgs = [...args, ...files, ...eslintArgs].filter(Boolean);
4238
const execOptions = { cwd: inputs.workingDirectory };
4339

4440
await exec(command, execArgs, execOptions);

‎src/inputs.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const inputs: Inputs = {
77
annotations: getBooleanInput('annotations'),
88
eslintArgs: getInput('eslint-args').split(' '),
99
workingDirectory: getInput('working-directory'),
10-
extensions: getInput('extensions').split(',').map((ext) => ext.trim()),
10+
extensions: getInput('extensions')
11+
.split(',')
12+
.map((ext) => ext.trim()),
1113
ignorePath: getInput('ignore-path'),
1214
ignorePatterns: getMultilineInput('ignore-patterns'),
1315
allFiles: getBooleanInput('all-files'),

0 commit comments

Comments
 (0)