@justeattakeaway/eslint-plugin-snacks-pie-migration 0.1.0 → 0.1.1
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const path = require('path');
|
|
1
2
|
const { getAddedComponents } = require('./get-added-components');
|
|
2
3
|
const { getDefaultBranchName } = require('./git-utils');
|
|
3
4
|
|
|
@@ -11,7 +12,8 @@ const { getDefaultBranchName } = require('./git-utils');
|
|
|
11
12
|
*/
|
|
12
13
|
function addedComponentsPostprocessor (messages, filePath, { readFileSync, isFileNew, getFileStateFromBranch }) {
|
|
13
14
|
// Get file relative path to the repo
|
|
14
|
-
const relativeFilePath =
|
|
15
|
+
const relativeFilePath = path.relative(process.cwd(), filePath)
|
|
16
|
+
.replace(/\\/g, '/'); // Fix path handling on Windows
|
|
15
17
|
|
|
16
18
|
// Check if file was added, but not committed yet
|
|
17
19
|
// This is used in the pre-commit hook
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/eslint-plugin-snacks-pie-migration",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "This plugin helps developers to identify deprecated Snacks components and provides suggestions of replacement PIE components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|