eslint-config-prettier 10.1.2 → 10.1.4

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.
package/bin/cli.js CHANGED
@@ -60,8 +60,13 @@ if (module === require.main) {
60
60
  })
61
61
  )
62
62
  .then((configs) => {
63
- const rules = configs.flatMap(({ rules }, index) =>
64
- Object.entries(rules).map((entry) => [...entry, args[index]])
63
+ const rules = configs.flatMap(
64
+ (
65
+ // Initializing config and rules for files that aren't included in the flat config,
66
+ // which is a very unlikely scenario, but should still be treated as a success
67
+ { rules = {} } = {},
68
+ index
69
+ ) => Object.entries(rules).map((entry) => [...entry, args[index]])
65
70
  );
66
71
  const result = processRules(rules);
67
72
  if (result.stderr) {
package/flat.d.ts CHANGED
@@ -1,3 +1,7 @@
1
- export * from "./index.js";
1
+ import eslintConfigPrettier from "./index.js";
2
2
 
3
- export const name: "config-prettier";
3
+ declare const eslintConfigPrettierFlat: typeof eslintConfigPrettier & {
4
+ name: "config-prettier";
5
+ };
6
+
7
+ export = eslintConfigPrettierFlat;
package/index.d.ts CHANGED
@@ -1 +1,5 @@
1
- export const rules: Record<string, 0 | "off">;
1
+ declare const eslintConfigPrettier: {
2
+ rules: Record<string, 0 | "off">;
3
+ };
4
+
5
+ export = eslintConfigPrettier;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-prettier",
3
- "version": "10.1.2",
3
+ "version": "10.1.4",
4
4
  "type": "commonjs",
5
5
  "description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
6
6
  "repository": "prettier/eslint-config-prettier",
@@ -12,6 +12,7 @@
12
12
  "license": "MIT",
13
13
  "bin": "bin/cli.js",
14
14
  "main": "index.js",
15
+ "types": "index.d.ts",
15
16
  "exports": {
16
17
  ".": {
17
18
  "types": "./index.d.ts",
@@ -27,7 +28,6 @@
27
28
  },
28
29
  "./package.json": "./package.json"
29
30
  },
30
- "types": "index.d.ts",
31
31
  "files": [
32
32
  "bin",
33
33
  "flat.d.ts",