From b0773ae7e3f860ff381d8d98d23d612609048e38 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 30 Apr 2023 00:03:35 +0300 Subject: [PATCH] Fix loading eslintrc --- frontend/.eslintrc.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index a881f4a31..cc26a2633 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -1,17 +1,21 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires const fs = require('fs'); // eslint-disable-next-line @typescript-eslint/no-var-requires +const path = require('path'); +// eslint-disable-next-line @typescript-eslint/no-var-requires const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin').configs.recommended; +const frontendFolder = __dirname; + const dirs = fs - .readdirSync('frontend/src', { withFileTypes: true }) + .readdirSync(path.join(frontendFolder, 'src'), { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) .map((dirent) => dirent.name) .join('|'); -const frontendFolder = __dirname; - module.exports = { + root: true, + parser: '@babel/eslint-parser', env: {