From fef99782d0a23570a797b1686510464a893bfdf3 Mon Sep 17 00:00:00 2001 From: hippotastic <6137925+hippotastic@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:38:11 +0200 Subject: [PATCH] Fix ESLint warnings, add Windows dev exclusion --- .eslintrc.cjs | 14 ++++++++++++++ packages/astro/test/.eslintrc.cjs | 5 ----- .../special-chars-in-component-imports.test.js | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 packages/astro/test/.eslintrc.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 28ddba1e6..2be3344d0 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -19,4 +19,18 @@ module.exports = { '@typescript-eslint/no-shadow': ['error'], 'no-only-tests/no-only-tests': 'error', }, + overrides: [ + { + files: ['packages/**/test/*.js', 'packages/**/*.test.js'], + env: { + mocha: true, + }, + globals: { + globalThis: false, // false means read-only + }, + rules: { + 'no-console': 'off', + }, + }, + ], }; diff --git a/packages/astro/test/.eslintrc.cjs b/packages/astro/test/.eslintrc.cjs deleted file mode 100644 index 0e6acda5e..000000000 --- a/packages/astro/test/.eslintrc.cjs +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - rules: { - 'no-console': 'off', - }, -}; diff --git a/packages/astro/test/special-chars-in-component-imports.test.js b/packages/astro/test/special-chars-in-component-imports.test.js index eefcc2204..db6612a86 100644 --- a/packages/astro/test/special-chars-in-component-imports.test.js +++ b/packages/astro/test/special-chars-in-component-imports.test.js @@ -68,7 +68,7 @@ describe('Special chars in component import paths', () => { }); - // if (isWindows) return; + if (isWindows) return; describe('dev', () => { let devServer;