Skip to content

Commit 69b5f9e

Browse files
committed
eslint config creation
1 parent 16ef7a2 commit 69b5f9e

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

.github/workflows/repo-sync.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,16 @@ jobs:
9797
git clean -fdX # Remove untracked files and directories
9898
git gc --prune=now # Garbage collect and prune unreachable objects
9999
100+
if [ ! -f "eslint.config.js" ]; then
101+
echo "Creating default ESLint config..."
102+
echo "import js from '@eslint/js';" > eslint.config.js
103+
echo "export default [js.configs.recommended];" >> eslint.config.js
104+
fi
105+
100106
# Remove unused imports and missing file references
101-
# echo "Running ESLint to remove unused imports..."
102-
# npm install eslint -g
103-
# eslint . --fix
107+
echo "Running ESLint to remove unused imports..."
108+
npm install eslint -g
109+
eslint . --fix
104110
105111
echo "Running autoflake to remove unused imports..."
106112
pip install autoflake
@@ -163,10 +169,16 @@ jobs:
163169
git clean -fdX # Remove untracked files and directories
164170
git gc --prune=now # Garbage collect and prune unreachable objects
165171
172+
if [ ! -f "eslint.config.js" ]; then
173+
echo "Creating default ESLint config..."
174+
echo "import js from '@eslint/js';" > eslint.config.js
175+
echo "export default [js.configs.recommended];" >> eslint.config.js
176+
fi
177+
166178
# Remove unused imports and missing file references
167-
# echo "Running ESLint to remove unused imports..."
168-
# npm install eslint -g
169-
# eslint . --fix
179+
echo "Running ESLint to remove unused imports..."
180+
npm install eslint -g
181+
eslint . --fix
170182
171183
echo "Running autoflake to remove unused imports..."
172184
pip install autoflake
@@ -229,10 +241,16 @@ jobs:
229241
git clean -fdX # Remove untracked files and directories
230242
git gc --prune=now # Garbage collect and prune unreachable objects
231243
244+
if [ ! -f "eslint.config.js" ]; then
245+
echo "Creating default ESLint config..."
246+
echo "import js from '@eslint/js';" > eslint.config.js
247+
echo "export default [js.configs.recommended];" >> eslint.config.js
248+
fi
249+
232250
# Remove unused imports and missing file references
233-
# echo "Running ESLint to remove unused imports..."
234-
# npm install eslint -g
235-
# eslint . --fix
251+
echo "Running ESLint to remove unused imports..."
252+
npm install eslint -g
253+
eslint . --fix
236254
237255
echo "Running autoflake to remove unused imports..."
238256
pip install autoflake

0 commit comments

Comments
 (0)