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

Handle multiple eslint config formats #313

Merged
merged 1 commit into from
Jan 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/check-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function set_environment_variables {
fi

if [ -z "$ESLINT_CONFIG" ]; then
ESLINT_CONFIG="$( upsearch .eslintrc )"
ESLINT_CONFIG="$( upsearch .eslintrc* )"
kasparsd marked this conversation as resolved.
Show resolved Hide resolved
fi
if [ -z "$ESLINT_IGNORE" ]; then
ESLINT_IGNORE="$( upsearch .eslintignore )"
Expand Down Expand Up @@ -308,7 +308,7 @@ function set_environment_variables {
done

# Make sure linter configs get copied linting directory since upsearch is relative.
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
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
if git ls-files "$linter_file" --error-unmatch > /dev/null 2>&1; then
if [ -L $linter_file ]; then
ln -fs $(git show :"$linter_file") "$LINTING_DIRECTORY/$linter_file"
Expand Down