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": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"@flecks/core": "*", "@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" "lerna": "^7.4.2"
} }
} }

View File

@ -9,7 +9,7 @@ const {join} = require('path');
const D = require('../../debug'); const D = require('../../debug');
const {default: Flecks} = require('../flecks'); const {default: Flecks} = require('../flecks');
const R = require('../../require'); // const R = require('../../require');
const debug = D('@flecks/core/server/build/eslint.config.js'); const debug = D('@flecks/core/server/build/eslint.config.js');
@ -25,11 +25,10 @@ if (FLECKS_CORE_SYNC_FOR_ESLINT) {
debug('bootstrapping flecks...'); debug('bootstrapping flecks...');
const flecks = Flecks.bootstrap(); const flecks = Flecks.bootstrap();
debug('bootstrapped'); debug('bootstrapped');
const eslintConfigFn = R( const eslintConfigFn = __non_webpack_require__(flecks.buildConfig('default.eslint.config.js', FLECKS_CORE_BUILD_TARGET));
flecks.buildConfig('default.eslint.config.js', FLECKS_CORE_BUILD_TARGET),
);
const eslintConfig = eslintConfigFn(flecks); 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 = { eslintConfig.settings['import/resolver'].webpack = {
config: { config: {
resolve: webpackConfig.resolve, resolve: webpackConfig.resolve,
@ -49,6 +48,7 @@ else {
const {stderr, stdout} = spawnSync('node', [__filename], { const {stderr, stdout} = spawnSync('node', [__filename], {
env: { env: {
FLECKS_CORE_SYNC_FOR_ESLINT: true, FLECKS_CORE_SYNC_FOR_ESLINT: true,
NODE_PATH: join(FLECKS_CORE_ROOT, 'node_modules'),
...process.env, ...process.env,
}, },
}); });