Skip to content

Commit

Permalink
fix: Fix Windows specific
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Aug 11, 2024
1 parent 9efe917 commit e4531c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ done

if [[ -n "$INIT$UPDATE" ]]; then
echo "[@diplodoc/lint] Add initial lint configs"
cp -r "$SRCDIR/scaffolding/" .
cp -a "$SRCDIR/scaffolding/." .

echo "[@diplodoc/lint] Extend .ignore configuration"
node "$SRCDIR/scripts/modify-ignore.js"
Expand All @@ -46,7 +46,9 @@ if [[ -n $FIX ]]; then

$BINDIR/eslint '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}' --fix
$BINDIR/prettier --write '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'
$BINDIR/stylelint '**/*.{css,scss}' --fix
if [[ -n $(find . -type f -name '*.css' -name '*.scss' | grep -vwFf .stylelintignore) ]]; then
$BINDIR/stylelint '**/*.{css,scss}' --fix
fi

exit 0
fi
Expand Down
7 changes: 6 additions & 1 deletion eslint-common-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ module.exports = {
process.env.npm_command && '@gravity-ui/eslint-config/prettier',
].filter(Boolean),
overrides: [{
files: ['.eslintrc.js'],
files: [
'.eslintrc.js',
'.prettierrc.js',
'.stylelintrc.js',
'.lintstagedrc.js',
],
env: {
node: true,
},
Expand Down
2 changes: 1 addition & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

npm i @diplodoc/lint
npx @diplodoc/lint init
npm run lint
npm run lint:fix

0 comments on commit e4531c4

Please sign in to comment.