I already try a lot of things and read a topic about prettier/prettier and eslint error when using nuxtjs this is my first time using nuxt but I can't seem to make it work. I try to install npm i eslint-config-prettier but nothing happen, I tried this code too npm run lint -- --fix it fix the code but when I add a new code it still give me the error.
I try this topic but still not solved:
eslint-and-prettier-battle-for-supremacy
add a lint:fix command to package.json
this is the screenshot I got:
This the error message that i got
this is my carousel code:
<template>
<h1>Test boy</h1>
</template>
<style scoped>
h1 {
color: black;
}
</style>
can someone help me?
Related
I have eslint configuration which works perfectly fine on my local setup (with vscode editor).
but on CI Server, it fails with following error:
eslint:config-array-factory Config file found: /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +0ms
eslint:config-array-factory Loading {extends:"standard"} relative to /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +1ms
Oops! Something went wrong! :(
ESLint: 6.6.0.
ESLint couldn't find the config "standard" to extend from. Please check that the name of the config is correct.
The config "standard" was referenced from the config file in "/home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json".
If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.
I am running following command to lint:
./node_modules/.bin/eslint ./ --ext .ts
I see there are multiple issues on git related to this (https://github.com/microsoft/vscode-eslint/issues/696) but none has solution or that did not worked for me.
Can anyone please help me here.
it seems that eslint-config-standard-with-typescript isn't installed.
Try this:
npm install --save-dev eslint#7 eslint-plugin-promise#4 eslint-plugin-import#2 eslint-plugin-node#11 #typescript-eslint/eslint-plugin#4 eslint-config-standard-with-typescript
To disable eslint during build you can add this code to *.config file as described here
module.exports = {
eslint: {
ignoreDuringBuilds: true,
},
}
it helped me remove the error
I am getting below error while running "gulp build" command to generate build for production server in a project. Please see error below :
[Autoprefixer] Error in plugin 'gulp-autoprefixer'
Message:
vendor.scss:1:1: Unclosed block
Details:
file: vendor.scss
line: 1
column: 1
source: $icon-font-path: "../../bower_components/bootstrap-sass-official/assets/fonts/bootstrap/";
/* Do not remove these comments below. It's the markers used by wiredep to inject
sass dependencies when defined in the bower.json of your dependencies */
// bower:scss
#import "../../bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap.scss";
// endbower
I have searched a lot on google but could not find any proper solution.
Please help me out by giving any solution to fix the above issue.
Thanks in advance.
I am trying to install CKEditor in my project. I am using Laravel.
I know I could download the files but I like making my life difficult and I decided that I want to install CKEditor as a npm dependency.
As stated in their documentation here, I added the package to package.json, like this:
"dependencies": {
"jquery": "^1.11.1",
"bootstrap-sass": "^3.0.0",
"elixir-coffeeify": "^1.0.3",
"laravel-elixir": "^4.0.0",
"font-awesome": "^4.5.0",
"ckeditor": "^4.5.7"
}
Now I guess I have to require it in my app.coffee, and so I tried:
window.$ = window.jQuery = require('jquery')
require('bootstrap-sass')
require('ckeditor')
This surely adds the ckeditor.js script to my app.js. However ckeditor seems to have its own dependencies such as config.js or editor.css, and of course the server responds with 404 for those requests.
How could I install CKeditor this way?
Thank you!
There is probably a problem with paths to those CKEditor dependencies. I'm not sure if you are using browserify or something different but for example in browserify using require('ckeditor') will result in ckeditor.js (bundled probably with other js files) file loading from same dir as your app.coffee file while CKEditor dependencies are in node_modules/ckeditor/ dir.
To tell CKEditor from which directory it should load its dependency you may use CKEDITOR_BASEPATH:
window.CKEDITOR_BASEPATH = 'node_modules/ckeditor/'
require('ckeditor')
You may see if there is a problem with loading those files using Network tab in Dev console (e.g. F12 in Chrome).
Note that it's not ideal solution for production environment because then you need node_modules folder on your server. You should probably consider moving only those dependencies to other folder during building/releasing process (and use CKEDITOR_BASEPATH as before with path to this production folder).
Open the resources/js/app.js file
Add the following line:
window.ClassicEditor = require('#ckeditor/ckeditor5-build-classic');
Then execute the Laravel Mix command
npm run dev
HTML JS:
<html lang="es">
<head>
<meta charset="utf-8">
<title>CKEditor 5 – Classic editor</title>
<script src="[path]/public/app.js"></script>
</head>
<body>
<h1>Classic editor</h1>
<div id="editor">
<p>This is some sample content.</p>
</div>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ) )
.catch( error => {
console.error( error );
} );
</script>
</body>
</html>
I'm using meteor and I ran npm install request to get access to that library. Everything seems to install correctly but when I run the meteor server, I then get the following error. Is there any word on why this is or how to solve it? Thanks.
While building the application:
node_modules/request/node_modules/node-uuid/test/test.html:1: bad formatting in HTML template
node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js:1:15: Unexpected token ILLEGAL
node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js:1:15: Unexpected token ILLEGAL
For reference:
test.html
<html>
<head>
<style>
div {
font-family: monospace;
font-size: 8pt;
}
div.log {color: #444;}
div.warn {color: #550;}
div.error {color: #800; font-weight: bold;}
</style>
<script src="../uuid.js"></script>
</head>
<body>
<script src="./test.js"></script>
</body>
</html>
run.js (same)
#!/usr/bin/env node
var far = require('far').create();
far.add(__dirname);
far.include(/test-.*\.js$/);
far.execute();
Meteor constructs the entire DOM itself so it will typically reject any script tags included in the html (but it will include scripts in the head, thanks Andrew). It also only supports handlebars style templating (right now).
<html>
<head>
<title>Something</title>
</head>
<body>
{{>yourHandlebarsTemplate}}
</body>
</html>
My advice would be to have your js and css located as files inside the client folder under your projects root.
As for NPM request, you will not be able to:
install it normally like you do in most node projects, so node_module is out/npm install require is out
access the functions in it without a Npm.require
At this point you have two options: adding the package NPM from Atmosphere(unofficial package repository) and including request. Or try placing the lib into /packages/ and then using Npm.require('request').
Alternatively you can just use Meteor's built in HTTP package (meteor add http) which functions similar to request.
Remove from your template as it seems Meteor wants to create this tag for you when building the template. This should take care of the "bad formatting in HTML template" error in test.html.
I followed this a link to try to configure Twitter's boostrap.less under Node 0.6.12 and Express 2.5.8:
app configuration:
app.use(express.compiler({src: publicDir, enable: ['less']}));
app.use(express.static(publicDir));
stylesheet link:
<link rel='stylesheet' href='/stylesheets/bootstrap.css' />
boostrap.less is the vanilla bootstrap.less file from bootstrap 2.02. the code section of it starts with:
// CSS Reset
#import "/public/stylesheets/reset.less";
When node is fired up and the page requested, the less paths get resolved correctly but the less parser throws an error:
../node_modules/less/lib/less/parser.js:385
throw new(LessError)(e, env);
The error causes node to crash after returning a 500 error for the contents of the boostrap.css file.
Any ideas how to get bootstrap.less to work in my setup?
Just a thought, but if you have Twitter's bootstrap.less via a git submodule, do you need to update the submodule? (we made that mistake, and had the same error as you until we realized it and fixed it)