eslint-config-prettier 10.1.0 → 10.1.2
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/README.md +7 -4
- package/flat.d.ts +3 -0
- package/flat.js +6 -0
- package/index.d.ts +0 -2
- package/index.js +0 -6
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -47,7 +47,10 @@ Note that this config _only_ turns rules _off,_ so it only makes sense using it
|
|
|
47
47
|
<!-- prettier-ignore -->
|
|
48
48
|
```js
|
|
49
49
|
import someConfig from "some-other-config-you-use";
|
|
50
|
-
|
|
50
|
+
// Note the `/flat` suffix here, the difference from default entry is that
|
|
51
|
+
// `/flat` added `name` property to the exported object to improve
|
|
52
|
+
// [config-inspector](https://eslint.org/blog/2024/04/eslint-config-inspector/) experience.
|
|
53
|
+
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
51
54
|
|
|
52
55
|
export default [
|
|
53
56
|
someConfig,
|
|
@@ -81,7 +84,7 @@ With flat config, _you_ get to decide the plugin name! For example:
|
|
|
81
84
|
|
|
82
85
|
```js
|
|
83
86
|
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
84
|
-
import eslintConfigPrettier from "eslint-config-prettier";
|
|
87
|
+
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
85
88
|
|
|
86
89
|
export default [
|
|
87
90
|
{
|
|
@@ -153,7 +156,7 @@ For eslintrc, while the `"prettier"` config can disable problematic rules in `"s
|
|
|
153
156
|
|
|
154
157
|
```js
|
|
155
158
|
import someConfig from "some-other-config-you-use";
|
|
156
|
-
import eslintConfigPrettier from "eslint-config-prettier";
|
|
159
|
+
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
157
160
|
|
|
158
161
|
export default [
|
|
159
162
|
someConfig,
|
|
@@ -170,7 +173,7 @@ With the new ESLint “flat config” format, you can control what things overri
|
|
|
170
173
|
|
|
171
174
|
```js
|
|
172
175
|
import someConfig from "some-other-config-you-use";
|
|
173
|
-
import eslintConfigPrettier from "eslint-config-prettier";
|
|
176
|
+
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
174
177
|
|
|
175
178
|
export default [
|
|
176
179
|
someConfig,
|
package/flat.d.ts
ADDED
package/flat.js
ADDED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { version } = require("eslint/package.json");
|
|
4
|
-
|
|
5
3
|
const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
|
|
6
4
|
|
|
7
5
|
const specialRule = 0;
|
|
8
6
|
|
|
9
|
-
if (+version.split(".")[0] >= 9) {
|
|
10
|
-
exports.name = "config-prettier";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
7
|
exports.rules = {
|
|
14
8
|
// The following rules can be used in some cases. See the README for more
|
|
15
9
|
// information. These are marked with `0` instead of `"off"` so that a
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-prettier",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.2",
|
|
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",
|
|
7
|
+
"homepage": "https://github.com/prettier/eslint-config-prettier#readme",
|
|
7
8
|
"author": "Simon Lydell",
|
|
9
|
+
"maintainers": [
|
|
10
|
+
"JounQin (https://www.1stG.me) <admin@1stg.me>"
|
|
11
|
+
],
|
|
8
12
|
"license": "MIT",
|
|
9
13
|
"bin": "bin/cli.js",
|
|
10
14
|
"main": "index.js",
|
|
@@ -13,6 +17,10 @@
|
|
|
13
17
|
"types": "./index.d.ts",
|
|
14
18
|
"default": "./index.js"
|
|
15
19
|
},
|
|
20
|
+
"./flat": {
|
|
21
|
+
"types": "./flat.d.ts",
|
|
22
|
+
"default": "./flat.js"
|
|
23
|
+
},
|
|
16
24
|
"./prettier": {
|
|
17
25
|
"types": "./prettier.d.ts",
|
|
18
26
|
"default": "./prettier.js"
|
|
@@ -22,6 +30,8 @@
|
|
|
22
30
|
"types": "index.d.ts",
|
|
23
31
|
"files": [
|
|
24
32
|
"bin",
|
|
33
|
+
"flat.d.ts",
|
|
34
|
+
"flat.js",
|
|
25
35
|
"index.d.ts",
|
|
26
36
|
"index.js",
|
|
27
37
|
"prettier.d.ts",
|