Skip to content

Commit

Permalink
Merge pull request #681 from shian15810/patch-2
Browse files Browse the repository at this point in the history
feat(eslint): add support for .eslintrc.cjs
  • Loading branch information
rumpl committed Nov 9, 2021
2 parents 2272944 + 73c2bec commit e770d0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/special/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function checkConfig(config, rootDir, includedDeps = []) {
return result;
}

const configNameRegex = /^\.eslintrc(\.(json|js|yml|yaml))?$/;
const configNameRegex = /^\.eslintrc(\.(json|js|cjs|yml|yaml))?$/;

export default async function parseESLint(filename, deps, rootDir) {
const config = await loadConfig('eslint', configNameRegex, filename, rootDir);
Expand Down
1 change: 1 addition & 0 deletions test/special/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ async function testEslint(deps, content) {
[
'.eslintrc',
'.eslintrc.js',
'.eslintrc.cjs',
'.eslintrc.json',
'.eslintrc.yml',
'.eslintrc.yaml',
Expand Down

0 comments on commit e770d0f

Please sign in to comment.