Skip to content

Commit 53735a1

Browse files
authored
fix: export entry regression (#1182)
1 parent 5335c10 commit 53735a1

23 files changed

Lines changed: 103 additions & 2479 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"prettier-eslint": patch
3+
---
4+
5+
fix: export entry regression

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
node_modules
2-
coverage
3-
dist
4-
.opt-in
5-
.opt-out
61
.DS_Store
7-
.eslintcache
2+
coverage
3+
lib
4+
node_modules
5+
.*cache
86
.yarn/*
97
!.yarn/releases
108
!.yarn/plugins

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.yarn
2+
test/fixtures

__mocks__/eslint.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* This mock file is so eslint doesn't attempt to actually search around the
3-
* file system for stuff, we can not use `.ts` because it's called by
4-
* `test/fixtures/node_modules/eslint/index.js`
3+
* file system for stuff
54
*/
65

76
import eslint_, { type ESLint as ESLint_ } from 'eslint';

__mocks__/prettier.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* We can not use `.ts` because it's called by
3-
* `test/fixtures/node_modules/prettier/index.js`
4-
*/
5-
61
import type { Options } from 'prettier';
72

83
import type { PrettierMock } from '../mock.js';

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default tseslint.config(
3030
},
3131
},
3232
{
33-
files: ['__mocks__/**/*.{js,ts}', 'test/**/*.spec.ts'],
33+
files: ['__mocks__/**/*.ts', 'test/**/*.spec.ts'],
3434
languageOptions: {
3535
globals: globals.jest,
3636
},

index.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { analyze, format } from './lib/index.js';
2+
3+
namespace prettierESLint {
4+
type Format = typeof format;
5+
6+
interface PrettierESLint extends Format {
7+
analyze: typeof analyze;
8+
format: Format;
9+
}
10+
}
11+
12+
declare const prettierESLint: prettierESLint.PrettierESLint;
13+
14+
export = prettierESLint;

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { analyze, format } = require('./lib/index.js');
2+
3+
module.exports = format;
4+
module.exports.format = format;
5+
module.exports.analyze = analyze;

lib/index.d.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/index.js

Lines changed: 0 additions & 234 deletions
This file was deleted.

0 commit comments

Comments
 (0)