@kirill.konshin/lint 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.
- package/lintPrepare.js +2 -2
- package/package.json +1 -1
package/lintPrepare.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
import fs from 'node:fs';
|
|
22
22
|
import path from 'node:path';
|
|
23
|
-
import { fileURLToPath
|
|
23
|
+
import { fileURLToPath } from 'node:url';
|
|
24
24
|
|
|
25
25
|
const __filename = fileURLToPath(import.meta.url);
|
|
26
26
|
const __dirname = path.dirname(__filename);
|
|
@@ -321,6 +321,6 @@ export function main() {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
// Only run when executed directly (e.g. `lint-prepare init`), not when imported.
|
|
324
|
-
if (process.argv[1] &&
|
|
324
|
+
if (process.argv[1] && fs.realpathSync(process.argv[1]) === fs.realpathSync(__filename)) {
|
|
325
325
|
main();
|
|
326
326
|
}
|