Skip to content

Commit

Permalink
Converted .eslintrc.js to json to imrpove workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yousufkalim committed Jul 2, 2022
1 parent 3a94fa5 commit de40549
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ export const runEslint = async (inputs: Inputs): Promise<void> => {
endGroup();

if (!inputs.eslintrc) {
fs.writeFileSync('.eslintrc.js', `exports.default = ${eslintRules}`);
fs.writeFileSync('.eslintrc.json', JSON.stringify(eslintRules));
}

const execOptions = [path.resolve(inputs.binPath, 'eslint'), ...files, ...inputs.eslintArgs].filter(Boolean);

await exec('npm i');
await exec('npm i eslint eslint-config-airbnb eslint-plugin-spellcheck');

await exec('node', execOptions);
};

0 comments on commit de40549

Please sign in to comment.