Expand my Community achievements bar.

SOLVED

Failed to execute goal org.codehaus.mojo:jslint-maven-plugin:1.0.1:jslint (default) on project wknd-sites-guide.ui.apps: Issues found in project. -> [Help 1]

Avatar

Level 4

1297716_pastedImage_0.png

can someone help me? thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

JS Lint is more about "Good Parts" of JS(javascript - Does it make any sense to use JSLint and follow it? - Stack Overflow ). It seems the error that it shows is in bootstrap plugin JS. You should exclude plugins from the JS Lint checking. If your bootstrap JS is in one of these folders, it will be ignored. If no, you should add an exclusion rule for the same.

<configuration>

   <sourceJsFolder>src/main/content/jcr_root</sourceJsFolder>

   <failOnIssues>true</failOnIssues>

   <predefinedVars>jQuery,window,$,use,properties,pageProperties,inheritedPageProperties,component,componentContext,currentDesign,currentNode,currentPage,currentSession,currentStyle,designer,editContext,log,out,pageManager,reader,request,resource,resourceDesign,resourcePage,response,sling,slyWcmHelper,wcmmode,xssAPI</predefinedVars>

   <excludes>

   <exclude>**/extensions/**/*.js</exclude>

   <exclude>**/vendor/**/*.js</exclude>

   </excludes>

</configuration>

Hope this helps..

View solution in original post

8 Replies

Avatar

Level 10

Hi,

Are you creating a project from scratch from this article: Adobe Experience Manager Help | Getting Started with AEM Sites - WKND Tutorial . It uses Lazybones. Please confirm.

Make sure to use the Maven 3.3.x version to create the new project using Lazybones. I have created the project and it works.

~Ratna.

Avatar

Community Advisor

The errors would be there just above Build Summary. Something like:

[ERROR] index.js:1:1:Expected an identifier and instead saw 'import'.

[ERROR] index.js:1:1:Stopping.  (25% scanned).

[ERROR] admin.bundle.js:1:31:'n' is not defined.

[ERROR] admin.bundle.js:1:36:Expected '{' and instead saw 'return'.

[ERROR] admin.bundle.js:1:43:'n' is not defined.

[ERROR] admin.bundle.js:1:62:'n' is not defined.

Can you check that?

Avatar

Level 4

i remove this one, the execution tag, and it works now. It has problem with JS dunno why

1297773_pastedImage_0.png

Avatar

Level 4

yes I use lazybones too, I just used this guide to create my own. So I added new js files in it. And somehow it rejects my Js in the clientlibs folder

Avatar

Community Advisor

It works because you have commented JS Lint checking from the build... If you dont want to follow JS Lint code quality tool, you can keep it commented but if you want to enforce the standards, then its worth taking a look at the errors that it is throwing and fix your JS code.

Avatar

Level 4

this is the error on the JS, i dont know why JS Lint rejects it when I build the project, it actually works on my own created Html with JS and CSS.

1297774_pastedImage_0.png

1297802_pastedImage_1.png

Avatar

Correct answer by
Community Advisor

JS Lint is more about "Good Parts" of JS(javascript - Does it make any sense to use JSLint and follow it? - Stack Overflow ). It seems the error that it shows is in bootstrap plugin JS. You should exclude plugins from the JS Lint checking. If your bootstrap JS is in one of these folders, it will be ignored. If no, you should add an exclusion rule for the same.

<configuration>

   <sourceJsFolder>src/main/content/jcr_root</sourceJsFolder>

   <failOnIssues>true</failOnIssues>

   <predefinedVars>jQuery,window,$,use,properties,pageProperties,inheritedPageProperties,component,componentContext,currentDesign,currentNode,currentPage,currentSession,currentStyle,designer,editContext,log,out,pageManager,reader,request,resource,resourceDesign,resourcePage,response,sling,slyWcmHelper,wcmmode,xssAPI</predefinedVars>

   <excludes>

   <exclude>**/extensions/**/*.js</exclude>

   <exclude>**/vendor/**/*.js</exclude>

   </excludes>

</configuration>

Hope this helps..