VS Code Tslint library failed to load - visual-studio-code

Whenever I start VS Code the tslint library gives me this error
Failed to load tslint library. Please install tslint in your workspace
I have reinstalled it and but again it gives me the same error.
The current version of tslint I'm using is 0.5.24
I have tried by enabling tslint globally so it should be available to all workspaces followed by Microsoft vscode tslint issues but it also doesn't help me.
I enabled "tslint.enable": true, in vscode workspace settings. but again I have got same results.

Install globally with npm:
npm install typescript -g
npm install tslint -g
Switch to the root of your TypeScript project and generate a starting tslint.jsonconfig file:
cd path/to/my/project
tslint --init
Lint your TypeScript files!
tslint -c path/to/tslint.json path/to/typescript/file.ts
Checkout full usage guide for more.

Related

'ANY_NODE_APP' is not recognized as an internal or external command, operable program or batch file on windows 10

I use windows 10 OS . I already try :
npm i -g tslint
also local install.
I use visual code terminal (power shell , git bash and cmd ) no help in any variant.
Where is the execution file for tslint ? I will put path intro the PATH env var.
It is probably caused by the version conflict between global and project's TsLint. You can see your version by: tslint -v
Then you can reinstall Tslint globally to latest version by:
npm install tslint typescript -g
Then use following command in your project directory to even up versions.
npm install tslint typescript --save-dev
And also you can search in your json files if there is a specification about Tslint version.

How to force the Tailwind CSS IntelliSense extension for VSCode work with .html.eex and .html.leex files?

How to force the Tailwind CSS IntelliSense extension for VSCode work with .html.eex and .html.leex files?
I same tried add settings .html.eex and .html.leex for IntelliSense for CSS class names in HTML, but don’t work for me.
So I can see this extension support HTML (EEx): https://github.com/bradlc/vscode-tailwindcss/blob/f5dfe02f74ac9bd68529f1997ae875691b819833/src/index.ts#L50
I found a solution, helped me this extantion https://github.com/ecmel/vscode-html-css.
Thanks you so much Ecmel Ercan and tme_317 for your thoughts!
But this extension not worked with HTML (EEx) files. I contributed to this. Until the author has merged pull-request, you can use my branch: https://github.com/reducio/vscode-html-css/tree/add-html-eex
git clone https://github.com/reducio/vscode-html-css/tree/add-html-eex
npm install
vsce package
# deps may be need, if you need hack this code
npm install -g typescript
npm install -g yo generator-code
npm install -g vsce
npm i -g #zeit/ncc
So, after run vsce package you get file vscode-html-css-0.2.3.vsix in root project folder.
Then you need install extension manually:
Don't forget about settings of extension.
In settings.json add:
"css.remoteStyleSheets": [
"https://unpkg.com/tailwindcss#^1.0/dist/tailwind.min.css"
],
Usage:
You can view a list of attributes via ctrl + space.
Enjoy auto completion Tailwind CSS in your HTML (EEx) files.

vscode assistance with building cpptools needed

Ubuntu 18.04 ARM64
I have download and built vscode and this appears to be working.
I can see the extension market place and install extensions. The C/C++ IntelliSense, debugging, and code browsing install but gets a dependency install failure sometimes:
Updating C/C++ dependencies...
Downloading package 'Mono Framework Assemblies' (5368 KB) Done!
Installing package 'Mono Framework Assemblies'
Failed at stage: installPackages
Error: end of central directory record signature not found
It seems to succeed on the second attempt but I'm not convinced.
So I have cloned vscode-cpptools and would like to built it myself but I'm not sure what dependencies it has or how to build it correctly.
Any tips appreciated!
So following the build and debug guide at:
$ git clone -b release https://github.com/Microsoft/vscode-cpptools
$ cd vscode-cpptools/Extension
$ npm install ! should install all dependencies but it forgets gulp
$ npm install gulp ! Manually install. I wonder what else it forgets
$ vsce package ! Should trigger the build and make the vsix package.
So the package is created and when I try and install it via the vscode extensions I get
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at ~/.vscode-oss-dev/extensions/ms-vscode.cpptools-0.22.1/bin/Microsoft.VSCode.CPP.Extension.linux.
Me thinks there are a lot of other dependencies that are missing!!!
Looking in the Extension bin folder and two important binaries are missing:
Microsoft.VSCode.CPP.Extension.linux
Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
I also tried this on Intel Ubuntu 18.04 and while the Intel build appeared to do a whole lot more it also fails to build the binaries.
Found the answer in here : github.com/Microsoft/vscode-cpptools/issues/429 which indicates there is no support for Aaarch64 Arm64 at this point in time.

How to set intellisense for Angular.Js and Javascript in Visual Studio Code without adding TypeScript file reference on every js file

I am new to VS Code and want to use it for the development of an AngularJs app. However, I am having the problem of adding a reference link on the top of all JS files.
like this.
/// <reference path="path/to/typings/tsd.d.ts" />
is there an alternative to this?
By default, all JavaScript files opened in Visual Studio Code are treated as independent units. If you want to enable IntelliSense for the whole project remember to place the jsconfig.json file at the root of your project.
Below is a jsconfig.json file which defines the JavaScript target to be ES6 and excludes the node_modules folder.
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
You can get IntelliSense for AngularJS library through the use of type definition .d.ts files from DefinitelyTyped repository. The typings are easily managed using Typings manager.
To install Typings manager execute npm install typings --global. This will install typings manager as your global npm module. Then you can install AngularJS Definitions using typings install dt~angular --global command. This will install and persist definitions from DefinitelyTyped repository as global definitions.
You can list available definitions using typings search angular.
Now you'll have IntelliSense available for all files in your project without the need of adding /// reference.
You can find more in the VS Code manual.
Hope this helps!
This is what worked for me on Linux Ubuntu 16.04 x64
npm init
sudo npm install -g typings
sudo ln -s /usr/bin/nodejs /usr/bin/node
typings install dt~angular --save --global
touch jsconfig.json
UPDATE:
Just wanted to advice against building new applications in AngularJS any more.
Angular2 + angular-cli is MUCH easier & expandable.
Believe me, Learn Angular 2 and save yourself MUCH hassle

How can I configure sass with ionic.

I am using the default ionic seed application, I have ran the setup
command ionic setup sass.
I run ionic serve, this should be watching for sass changes but it's not.
I tried to run gulp watch but I am getting an error.Error: Cannot find module 'semver'
Try using sudo ionic setup sass
You might not have had sufficient security privileges, thus not allowing sass to be setup properly. Using sudo will allow the user to act as a superuser and let sass setup correctly.
This worked for me.
First you need to run this command ionic setup sass when you run this command create a scss folder in www folder in scss folder here is style.scss file.
and #import this file in scss/ionic.app.scss path.
#import "www/scss/style.scss" in scss/ionic.app.scss path.
Try this I hope this is work for you.
Please delete the 'node_modules' folder in the project directory and re-run
'npm install'. This worked for me .
Make sure you have changed your index.html to include the relevant css files, as the one previously will no longer be used if you want to use the .min.css one generated by sass.
If removing the node_modules and running npm install doesn't work you can try installing gulp then install sass
npm install -g gulp
ionic setup sass
You can use sass via Ruby:
Install Ruby
Install Sass: npm install -g node-sass
On ionic project (v2) type: npm rebuild node-sass
So whenever you touch sass file(s), you can just rebuild the sass: npm rebuild node-sass if not, it's OK, just continue normal ionic serve
Remark: ionic2 requires sass
Using Sass in ionic project
if you are using windows node cli. goto in your project by
c:\projectname
after
c:\projectname>ionic setup sass
done
http://ionicframework.com/docs/cli/sass.html
Try this. It will setup the sass in your ionic project.
ionic setup sass
If gulp is not setup then run this command first
npm install gulp -g