eslint-plugin-prettier 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,7 @@ const eslintPluginPrettier = {
172
172
  if (!prettierFormat) {
173
173
  // Prettier is expensive to load, so only load it if needed.
174
174
  prettierFormat = /** @type {PrettierFormat} */ (
175
- require('synckit').createSyncFn(require.resolve('./worker'))
175
+ require('synckit').createSyncFn(require.resolve('./worker.mjs'))
176
176
  );
177
177
  }
178
178
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "eslint-plugin-prettier",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "Runs prettier as an eslint rule",
5
5
  "repository": "https://github.com/prettier/eslint-plugin-prettier.git",
6
6
  "homepage": "https://github.com/prettier/eslint-plugin-prettier#readme",
7
7
  "author": "Teddy Katz",
8
- "contributors": [
9
- "JounQin (https://github.com/JounQin) <admin@1stg.me>"
8
+ "maintainers": [
9
+ "JounQin <admin@1stg.me> (https://github.com/JounQin)"
10
10
  ],
11
11
  "funding": "https://opencollective.com/eslint-plugin-prettier",
12
12
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "eslint-plugin-prettier.js",
32
32
  "recommended.d.ts",
33
33
  "recommended.js",
34
- "worker.js"
34
+ "worker.mjs"
35
35
  ],
36
36
  "keywords": [
37
37
  "eslint",
@@ -11,13 +11,8 @@
11
11
  * @import {ESLint} from 'eslint'
12
12
  */
13
13
 
14
- const { runAsWorker } = require('synckit');
15
-
16
- /**
17
- * @type {typeof Prettier}
18
- * @import * as Prettier from 'prettier'
19
- */
20
- let prettier;
14
+ import prettier from 'prettier';
15
+ import { runAsWorker } from 'synckit';
21
16
 
22
17
  runAsWorker(
23
18
  /**
@@ -38,10 +33,6 @@ runAsWorker(
38
33
  },
39
34
  eslintFileInfoOptions,
40
35
  ) => {
41
- if (!prettier) {
42
- prettier = await import('prettier');
43
- }
44
-
45
36
  const prettierRcOptions = usePrettierrc
46
37
  ? await prettier.resolveConfig(onDiskFilepath, {
47
38
  editorconfig: true,