Skip to content

Commit

Permalink
ci: debug dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalston committed Dec 5, 2024
1 parent 7459238 commit 73cf353
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ import eslint from '@eslint/js';
import perfectionist from 'eslint-plugin-perfectionist';
import tseslint from 'typescript-eslint';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const baseDir = join(__dirname, 'src');
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const baseDir = join(_dirname, 'src');
const internalDirectories = readdirSync(baseDir, {
withFileTypes: true,
}).flatMap((dirent) => (dirent.isDirectory() ? dirent.name : []));

console.log({
__dirname,
dirname: _dirname,
importMetaDirname: import.meta.dirname,
equal: __dirname === import.meta.dirname,
equal: _dirname === import.meta.dirname,
internalDirectories,
rand: process.cwd()
});

export default tseslint.config(
Expand Down

0 comments on commit 73cf353

Please sign in to comment.