Skip to content

Commit

Permalink
fix: upgrade repolinter
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Aug 27, 2020
1 parent 9abdd9a commit 8a028c3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ describe('main', () => {
await lint(
'.',
undefined,
true,
JSON.parse(await fs.promises.readFile(configPath, 'utf8'))
JSON.parse(await fs.promises.readFile(configPath, 'utf8')),
true
),
true
)
Expand Down Expand Up @@ -258,8 +258,8 @@ describe('main', () => {
await lint(
'.',
undefined,
true,
JSON.parse(await fs.promises.readFile(configPath, 'utf8'))
JSON.parse(await fs.promises.readFile(configPath, 'utf8')),
true
),
true
)
Expand Down Expand Up @@ -309,8 +309,8 @@ describe('main', () => {
await lint(
'.',
undefined,
true,
JSON.parse(await fs.promises.readFile(configPath, 'utf8'))
JSON.parse(await fs.promises.readFile(configPath, 'utf8')),
true
),
true
)
Expand Down Expand Up @@ -347,8 +347,8 @@ describe('main', () => {
await lint(
'.',
undefined,
true,
JSON.parse(await fs.promises.readFile(configPath, 'utf8'))
JSON.parse(await fs.promises.readFile(configPath, 'utf8')),
true
),
true
)
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function run(disableRetry) {
configUrl: CONFIG_URL
});
// run the linter!
const result = yield repolinter_1.lint('.', undefined, true, config);
const result = yield repolinter_1.lint('.', undefined, config, true);
core.debug(JSON.stringify(result));
// print the formatted result
core.startGroup('Repolinter Output');
Expand Down Expand Up @@ -26505,12 +26505,12 @@ module.exports.resultFormatter = exports.defaultFormatter
*
* @param {string} targetDir The directory of the repository to lint.
* @param {string[]} [filterPaths] A list of directories to allow linting of, or [] for all.
* @param {boolean} [dryRun] If true, repolinter will report suggested fixes, but will make no disk modifications.
* @param {object|string|null} [ruleset] A custom ruleset object with the same structure as the JSON ruleset configs, or a string path to a JSON config.
* Set to null for repolinter to automatically find it in the repository.
* @param {boolean} [dryRun] If true, repolinter will report suggested fixes, but will make no disk modifications.
* @returns {Promise<LintResult>} An object representing the output of the linter
*/
async function lint (targetDir, filterPaths = [], dryRun = false, ruleset = null) {
async function lint (targetDir, filterPaths = [], ruleset = null, dryRun = false) {
const fileSystem = new FileSystem()
fileSystem.targetDir = targetDir
if (filterPaths.length > 0) { fileSystem.filterPaths = filterPaths }
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"devDependencies": {
"@types/jest": "^26.0.10",
"@types/node": "^14.6.0",
"@types/node": "^14.6.1",
"@typescript-eslint/parser": "^3.10.1",
"@vercel/ncc": "^0.24.0",
"eslint": "^7.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default async function run(disableRetry?: boolean): Promise<void> {
configUrl: CONFIG_URL
})
// run the linter!
const result = await lint('.', undefined, true, config)
const result = await lint('.', undefined, config, true)
core.debug(JSON.stringify(result))
// print the formatted result
core.startGroup('Repolinter Output')
Expand Down

0 comments on commit 8a028c3

Please sign in to comment.