Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Commit 86cc5e6

Browse files
adekbadekKaspars Dambis
authored andcommitted
Handle multiple eslint config formats (#313)
Eslint can be configured using `.eslintrc`/`.eslintrc.js`/`.eslintrc.json` file names
1 parent 31c7236 commit 86cc5e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/check-diff.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function set_environment_variables {
185185
fi
186186

187187
if [ -z "$ESLINT_CONFIG" ]; then
188-
ESLINT_CONFIG="$( upsearch .eslintrc )"
188+
ESLINT_CONFIG="$( upsearch .eslintrc* )"
189189
fi
190190
if [ -z "$ESLINT_IGNORE" ]; then
191191
ESLINT_IGNORE="$( upsearch .eslintignore )"
@@ -308,7 +308,7 @@ function set_environment_variables {
308308
done
309309

310310
# Make sure linter configs get copied linting directory since upsearch is relative.
311-
for linter_file in .jshintrc .jshintignore .jscsrc .jscs.json .eslintignore .eslintrc .phpcs.xml phpcs.xml .phpcs.xml.dist phpcs.xml.dist phpcs.ruleset.xml ruleset.xml; do
311+
for linter_file in .jshintrc .jshintignore .jscsrc .jscs.json .eslintignore .eslintrc .eslintrc.js .eslintrc.json .phpcs.xml phpcs.xml .phpcs.xml.dist phpcs.xml.dist phpcs.ruleset.xml ruleset.xml; do
312312
if git ls-files "$linter_file" --error-unmatch > /dev/null 2>&1; then
313313
if [ -L $linter_file ]; then
314314
ln -fs $(git show :"$linter_file") "$LINTING_DIRECTORY/$linter_file"

0 commit comments

Comments
 (0)