fix: eslint

This commit is contained in:
cha0s 2023-12-02 05:46:45 -06:00
parent 13b7bf465b
commit cc4ec9c30b
3 changed files with 8 additions and 21 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"eslint.nodePath": "/home/cha0s/sync/src/code/flecks/node_modules",
}

View File

@ -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"
}
}

View File

@ -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,
},
});