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

Commit

Permalink
Handle prettier with eslint (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek authored Feb 10, 2020
1 parent 86cc5e6 commit 420f1ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/check-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ 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 .eslintrc.js .eslintrc.json .phpcs.xml phpcs.xml .phpcs.xml.dist phpcs.xml.dist phpcs.ruleset.xml ruleset.xml; do
#
# Eslint might depend on Prettier (https://github.com/prettier/eslint-plugin-prettier), so prettier config has to be copied into the linting directory.
# Both Eslint and Prettier might be configured as keys in package.json, so this file needs to also be imported.
for linter_file in .jshint* .jscs* .eslint* package.json .prettier* .phpcs* phpcs* 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

0 comments on commit 420f1ba

Please sign in to comment.