jakob101 / relativepathrefactor Goto Github PK
View Code? Open in Web Editor NEWA plugin for VSCode
Home Page: https://marketplace.visualstudio.com/items?itemName=jakob101.relativepathrefactor
A plugin for VSCode
Home Page: https://marketplace.visualstudio.com/items?itemName=jakob101.relativepathrefactor
The extension has stopped working in in newer versions of vscode.
Any ideas? Is the extension abandoned?
I couldn't find a mention of this in the documentation.
Hello and thank you for your work!
One thing I've noticed is this: when Fix relative paths
is applied, it wraps newly generated path into double quotes, regardless of the convention in use.
// Before
import Styles from './Back.css';
After hitting Fix relative paths
:
// Error: [eslint] Strings must use singlequote. (quotes)
import Styles from "../js/components/Back.css";
The expected behavior would be to use the kind of quotes that were used before fixing the path.
Example 1: Before (back two directories):
import { connect } from 'react-redux';
import { memberA } from '../../shared/app/someUtil';
import { memberB, memberC } from '../../shared/account/someWorkflow';
import { memberD } from '../../shared/app/anotherWorkflow';
Example 1: After (back three directories):
import { connect } from 'react-redux';
import { memberA } from "../../../shared/app/localeUtil"; // updated
import { memberB, memberC } from '../../shared/account/someWorkflow'; // skipped
import { memberD } from '../../shared/app/anotherWorkflow'; // skipped
Example 2: Before (back two directories):
import { Link } from 'react-router';
import { memberA, memberB } from '../../shared/util/images';
import Image from '../../shared/component/Image';
import * as classnames from 'classnames';
Example 2: After (back three directories):
import { Link } from 'react-router';
import { memberA, memberB } from '../../shared/util/images'; // skipped
import Image from "../../../shared/component/Image"; // updated
import * as classnames from 'classnames';
This problem occurs throughout several of my project's files. It seems to occur for both single member and multiple member imports.
Interestingly it seems to struggle with imports with multiple members within a single line, but succeeds if they're split e.g.
import { memberA, memberB } from '../../shared/util/images'; // skipped
import {
memberC,
memberD,
memberE,
} from '../../../shared/account/someUtil'; // updated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.