eslint-plugin-prettier 5.5.3 → 5.5.5
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/eslint-plugin-prettier.js +4 -2
- package/package.json +3 -3
- package/worker.mjs +3 -0
|
@@ -102,7 +102,9 @@ function getLocFromIndex(sourceCode, index) {
|
|
|
102
102
|
* @returns {void}
|
|
103
103
|
*/
|
|
104
104
|
function reportDifference(context, difference) {
|
|
105
|
-
const { operation, offset
|
|
105
|
+
const { operation, offset } = difference;
|
|
106
|
+
const insertText = 'insertText' in difference ? difference.insertText : '';
|
|
107
|
+
const deleteText = 'deleteText' in difference ? difference.deleteText : '';
|
|
106
108
|
/** @type {AST.Range} */
|
|
107
109
|
const range = [offset, offset + deleteText.length];
|
|
108
110
|
// `context.getSourceCode()` was deprecated in ESLint v8.40.0 and replaced
|
|
@@ -166,7 +168,7 @@ const eslintPluginPrettier = {
|
|
|
166
168
|
additionalProperties: true,
|
|
167
169
|
},
|
|
168
170
|
},
|
|
169
|
-
additionalProperties:
|
|
171
|
+
additionalProperties: false,
|
|
170
172
|
},
|
|
171
173
|
],
|
|
172
174
|
messages: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-prettier",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.5",
|
|
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",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"prettier-linter-helpers": "^1.0.
|
|
58
|
-
"synckit": "^0.11.
|
|
57
|
+
"prettier-linter-helpers": "^1.0.1",
|
|
58
|
+
"synckit": "^0.11.12"
|
|
59
59
|
}
|
|
60
60
|
}
|