Skip to content

Commit

Permalink
Made types.eslint.config.template a cjs file by default
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-shostak committed Nov 20, 2024
1 parent 9e1b7b4 commit 59285f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ target
*.iml
*.log
types.eslint.config.js
types.eslint.config.cjs
__tmp__

# Ignore example plugin builds
Expand Down
7 changes: 2 additions & 5 deletions src/dev/eslint/run_eslint_with_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function runEslintWithTypes() {
async ({ log, flags }) => {
const ignoreFilePath = Path.resolve(REPO_ROOT, '.eslintignore');
const configTemplate = Fs.readFileSync(
Path.resolve(__dirname, 'types.eslint.config.template.js'),
Path.resolve(__dirname, 'types.eslint.config.template.cjs'),
'utf8'
);

Expand Down Expand Up @@ -65,10 +65,7 @@ export function runEslintWithTypes() {
const failures = await Rx.lastValueFrom(
Rx.from(projects).pipe(
mergeMap(async (project) => {
const configFilePath = Path.resolve(
project.directory,
`types.eslint.config.${project.isEsm ? 'cjs' : 'js'}`
);
const configFilePath = Path.resolve(project.directory, 'types.eslint.config.cjs');

Fs.writeFileSync(
configFilePath,
Expand Down

0 comments on commit 59285f1

Please sign in to comment.