From cc4ec9c30b7a2ca308d71bdcfb2002bb77d9287f Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 2 Dec 2023 05:46:45 -0600 Subject: [PATCH] fix: eslint --- .vscode/settings.json | 3 +++ package.json | 16 ---------------- packages/core/src/server/build/eslint.config.js | 10 +++++----- 3 files changed, 8 insertions(+), 21 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e62aa47 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "eslint.nodePath": "/home/cha0s/sync/src/code/flecks/node_modules", +} \ No newline at end of file diff --git a/package.json b/package.json index cb6af16..4c91edb 100644 --- a/package.json +++ b/package.json @@ -17,22 +17,6 @@ "dependencies": {}, "devDependencies": { "@flecks/core": "*", - "@flecks/create-app": "*", - "@flecks/create-fleck": "*", - "@flecks/db": "*", - "@flecks/docker": "*", - "@flecks/dox": "*", - "@flecks/electron": "*", - "@flecks/fleck": "*", - "@flecks/governor": "*", - "@flecks/react": "*", - "@flecks/redis": "*", - "@flecks/redux": "*", - "@flecks/repl": "*", - "@flecks/server": "*", - "@flecks/socket": "*", - "@flecks/user": "*", - "@flecks/web": "*", "lerna": "^7.4.2" } } diff --git a/packages/core/src/server/build/eslint.config.js b/packages/core/src/server/build/eslint.config.js index c94eacd..ede8b58 100644 --- a/packages/core/src/server/build/eslint.config.js +++ b/packages/core/src/server/build/eslint.config.js @@ -9,7 +9,7 @@ const {join} = require('path'); const D = require('../../debug'); const {default: Flecks} = require('../flecks'); -const R = require('../../require'); +// const R = require('../../require'); const debug = D('@flecks/core/server/build/eslint.config.js'); @@ -25,11 +25,10 @@ if (FLECKS_CORE_SYNC_FOR_ESLINT) { debug('bootstrapping flecks...'); const flecks = Flecks.bootstrap(); debug('bootstrapped'); - const eslintConfigFn = R( - flecks.buildConfig('default.eslint.config.js', FLECKS_CORE_BUILD_TARGET), - ); + const eslintConfigFn = __non_webpack_require__(flecks.buildConfig('default.eslint.config.js', FLECKS_CORE_BUILD_TARGET)); const eslintConfig = eslintConfigFn(flecks); - const webpackConfig = flecks.buildConfig('webpack.config.js', FLECKS_CORE_BUILD_TARGET); + const webpackConfigFn = __non_webpack_require__(flecks.buildConfig('webpack.config.js', FLECKS_CORE_BUILD_TARGET)); + const webpackConfig = webpackConfigFn({}, {mode: 'development'}, flecks); eslintConfig.settings['import/resolver'].webpack = { config: { resolve: webpackConfig.resolve, @@ -49,6 +48,7 @@ else { const {stderr, stdout} = spawnSync('node', [__filename], { env: { FLECKS_CORE_SYNC_FOR_ESLINT: true, + NODE_PATH: join(FLECKS_CORE_ROOT, 'node_modules'), ...process.env, }, });