Just started using testcafe and I'm trying to get eslint set up.
Here's the software and versions I'm using:
testcafe#1.8.1, eslint-plugin-testcafe#0.2.1, neovim#0.3.7, electron#7.1.9
Can anyone point me in the right direction to have neovim stop with the red wiggly lines all over anything to do with testcafe?
I added:
"plugins": [
"testcafe"
],
"extends": [
"standard",
"plugin:testcafe/recommended"
],
to the .eslintrc.json and
/* eslint-env testcafe */
to the test. Fabulously, the install and my first test worked fine and straight away!
Related
I have followed the steps outlined in the VS Code documentation for getting Intellisense working for React Native by installing typings for React Native. Now, what do I need to do to get autocomplete working? For instance, if I type <Text>, I would like to see an automatic closing of that tag. What am I missing here? This seems like it shuld work out of the box.
To enable IntelliSense (autocomplete) you have to install the official React Native Tools extension.
Installation
Open Command Palette by pressing F1, type ext install and press Enter, then look for React Native Tools extension.
Create a jsconfig.json file
You should create a jsconfig.json file in you root directory. It can be empty but must be present. The presence of such a file in a directory indicates that the directory is the root of a JavaScript project.
(Optional)
The file itself can optionally list the files belonging to the project, the files to be excluded from the project, as well as compiler options.
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
You can find more at https://code.visualstudio.com/docs/languages/javascript#_javascript-projects-jsconfigjson
Create a .babelrc file for ReactNative Packger transformer (optional, if you want to use TypeScript)
You should create a .babelrc file with sourceMaps = true and "presets": [ "react-native" ] for better source-mapping support. (required if you want TypeScript support).
{
"presets": [
"react-native" // this is required for debugging with react-native/packager/transformer
],
"plugins": [],
"sourceMaps": true // must be true react-native/packager/transformer using with node-module-debug
// because of some bugs from vscode-node-debug & vscode-react-native, "sourceMaps" cannot be "inline" or "both"
}
Install typings for React Native (optional)
To get IntelliSense for React Native, run npm install typings -g and then typings install dt~react-native --global in your terminal.
Hope this helps!!
React Native Tools in VSCode can't help you close the Tag after you typed<Text>,you can try to install Auto Close Tag and Auto Rename Tag
In my case, I have to copy jsconfig.json to tsconfig.json, close Visual Code and reopen it. Then it works properly.
jsconfig.json
{
"compilerOptions": {
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
tsconfig.json
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
I am also not getting any IntelliSense and also package auto-import is not working. Since I am not using Typescript, deleting the tsconfig.json helped me.
Take backup of your tsconfig.json file first
In my case, I've already installed many react-native extensions for autoSuggestion and another helper extension, e.g. "React Native Tools", and "React-Native/React/Redux snippets for es6/es7"
Issues:
autoSuggestion keywords not coming while typing.
command(in IOS) + click not letting me to jump on the target files.
Recently I have seen in VS Code editor for new React-native applications autoSuggestion not working.
Steps I have followed to solve:
Go to Extensions
Search for React or React-native
Remove the installed extension
Reload it.
I am just starting to play with angular CLI , I created a test project with
ng new quickstart-cli
And it has created all the initial folders , then I create the first component with :
ng g component hero-details
The problem comes when I trying to modify the hero-details.component.ts using intelliJ (I had install the angular plugin that supports angular 2 and typescript).
I have the following error .
It looks as is not recognize the tsconfig.json (1) file where this option is declare and also I have a lot of error in the typescript compiler console (2) , It's trying to compile all the files of node , and I think it shouldn't do that.
I check out if intelliJ was not well configurated but I think everything is okey , I also try using the the option of use tsconfig.json but nothing changes.
If I select the the option of use tsconfig.json I have the following message from TypeScript Compiler
How i solved this ? Regards Roberto.
Can you change your tsconfig.json with this snippet of code and let me know if it works :)
{
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
I'm trying to package serialport.js with my nw.js app. I'm having a hard time building serialport.js for nw.js.
I've installed serialport.js in my "app\resource\node_modules" using npm.
I've also installed nw.gyp globally "npm install nw-gyp -g"
Then I changed directory to "app\resource\node_modules\serialport" where the binding.gyp is located and tried to rebuild serialport with nw-gyp "nw-gyp rebuild --target=0.12.3"
This is the error I got:
Undefined variable module_name in binding.gyp
Any Ideas how I can get passed this problem?
Other's seem to have similar problems:
Serialport.js in Node-webkit (nw.js) on Win 7
I also saw the same error happening with a different node module:
Building node-sqlite3 with nw-gyp
open node_modules/serialport/binding.gyp, you need make some changes...
before:
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
after:
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "serialport" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/serialport.node" ],
"destination": "."
And change module_path in node_modules/serialport/package.json for:
"module_path": "./build/{configuration}/",
Finally, run nw-gyp rebuild --target=0.12.3
Downgrading npm works! Give a try
npm install npm#6 -g
I am working with Sencha Touch application with different packages with consequent scss files, these files are imported in the app.scss but when the sencha CMD is listening (with the command "sencha app watch") changes are not refreshed itself, I need to reset the command line to get the changes.
What am I doing wrong? or maybe is a bug?
Thanks!!
Have you added the package to your app.json file in the requires?
"resources": [
"resources/images",
"resources/icons",
"resources/splash",
"resources/fonts"
],
"ignore": [
".svn$"
],
"archivePath": "archive",
"requires": [
"package-name" <--- Here.
],
I'm trying to get Durandal.js optimizer working on my test project, but it seems to generate nothing to main-built.js. I use the following command from node.js command prompt, in durandal/amd folder:
optimizer.exe --verbose true
Result is
Using default base configuration.
Configuring for deploy with almond (custom).
{
"name": "durandal/amd/almond-custom",
"inlineText": true,
"stubModules": [
"durandal/amd/text"
],
"paths": {
"text": "durandal/amd/text"
},
"baseUrl": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp",
"mainConfigFile": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp\\main.js",
"include": [
"main-built",
"main",
"bindings/tinymce-binding",
"durandal/app",
"durandal/composition",
"durandal/events",
"durandal/http",
"text!durandal/messageBox.html",
"durandal/messageBox",
"durandal/modalDialog",
"durandal/system",
"durandal/viewEngine",
"durandal/viewLocator",
"durandal/viewModel",
"durandal/viewModelBinder",
"durandal/widget",
"durandal/plugins/router",
"durandal/transitions/entrance",
"raphael-amd/eve.0.3.4",
"raphael-amd/raphael.2.1.0.amd",
"raphael-amd/raphael.2.1.0.core",
"raphael-amd/raphael.2.1.0.svg",
"raphael-amd/raphael.2.1.0.vml",
"viewmodels/flickr",
"viewmodels/modal1",
"viewmodels/myPage",
"viewmodels/shell",
"viewmodels/welcome",
"text!views/detail.html",
"text!views/flickr.html",
"text!views/modal1.html",
"text!views/myPage.html",
"text!views/shell.html",
"text!views/welcome.html"
],
"exclude": [],
"keepBuildDir": true,
"optimize": "uglify2",
"out": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp\\main-built.js",
"pragmas": {
"build": true
},
"wrap": true,
"insertRequire": [
"main"
]
}
Deleting old output file.
Tracing dependencies for: durandal/amd/almond-custom
Then, when I check main-built.js, it is empty. Can anyone help me what is the problem? I have several AMD modules in the test project, including Raphael.js AMD modules.
My requirejs configuration looks like this:
requirejs.config({
paths: {
'text': 'durandal/amd/text',
'eve': './raphael-amd/eve.0.3.4',
'raphael.core': './raphael-amd/raphael.2.1.0.core',
'raphael.svg': './raphael-amd/raphael.2.1.0.svg',
'raphael.vml': './raphael-amd/raphael.2.1.0.vml',
'raphael': './raphael-amd/raphael.2.1.0.amd',
'tinymce': "../Scripts/tinymce/jquery.tinymce.min"
}
});
In the same amd folder, where optimizer is stored, try running node r.js -o app.build.js. I've seen r.js sometimes choke about some dependencies, which resolves without problem when loading via require.js. For whatever reason the error messages won't show up when using optimizer --verbose. Typically the error message provides enough information to see where this occurs and if you've to update require.contig.paths or a specific define dependency.