Comments (5)
Thanks for the bug report! I'll update when I have a fix.
from js-assistant.
Hey @chandan192 - I agree that inlining here does not make sense, and you would typically not invoke it.
However, I'm not sure I understand what the issue with the refactoring is? The resulting code compiles and executes for me, and it indeed the expected result of an inline operation on temp3.
What would you expect to happen instead?
from js-assistant.
Hi @lgrammel,
I was just experimenting with the refactoring using p42 and tslint. I got the p42 refactoring suggestion on the context menu.
Inline 2 occurrences [p42]
I also checked the p42 suggestion on the activity bar but there was no suggestion. It was only on the manual context menu refactoring.
from js-assistant.
I see - in this case it was not a 'suggestion' (an in, P42 recommended), but it showed up in the quickfix menu. I'll add a warning similar to what is shown for new Objects.
from js-assistant.
I've made a couple of improvements in v1.103.1
to address this issue:
- inline variable warns you about inlining literals that are used in multiple places
- inline variable is only availalbe as a quickfix when it is a suggestion, otherwise you need to use the refactor or inline context menus / shortcuts
Thanks for the bug report!
from js-assistant.
Related Issues (20)
- Let the user disable the custom keybindings in the extension config options HOT 5
- convert to const in for-of loops HOT 1
- Please return the "Move up/down" commands HOT 6
- Issue with convert-if-else-to-conditional-expression HOT 1
- Wrong code generated by "Convert if-else into conditional expression" using p42 VSCode plugin v1.163.1 HOT 1
- Cannot pass the payment process on the select country window HOT 3
- Remove unused imports/class methods/variables HOT 2
- Unsafe suggestions HOT 2
- Support for Svelte components HOT 1
- Insert console.log for variable HOT 2
- Command Palette integration HOT 2
- Convert to destructuring assignment
- Create new file when extract React component
- convert-function-to-object-method potentially unsafe
- p42.ai is down HOT 2
- Refactor Idea: extract functions inside functions
- is the site https://p42.ai/ down? HOT 1
- Make P42 settings apply to remote and workspace, honour jsconfig/tsconfig settings
- provide setting to set default suggestion level
- provide setting to disable the codeActionsOnSave HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-assistant.