It seems ./node_modules/.bin/nx lint is not doing anything. What is it supposed to do?
i experienced same thing. it is doing nothing for me with latest nx.
i use npm run affected:lint -- --uncommitted --fix --parallel to automatically lint when users commit code.
Hi @dereklin,
The command ./node_modules/.bin/nx lint verifies that your Nx Workspace is not inconsistent nor has some files out of sync. This command will show you the problem if you start deviating from the Nx guidelines when creating a library or an application not in the right place.
The command lint from Nx does Workspace integrity checks of your /apps and /libs like so:
angular.json that target nowhere;angular.json;This is more like a Nx validation of your project's configuration than simply checking _language errors_. The latter is done with the ng lint command which is the code linting from the Angular CLI.
Hi @bcabanes,
When you say
The latest is done with the ng lint command which is the code linting from the Angular CLI.
Does it mean ./node_modules/.bin/nx lint is no longer needed if we use ng lint?
No sorry i'meant to say _the latter_, they do different things.
You want to have nx lint for checking the integrity of your workspace against Nx guidelines, and ng lint for checking code errors.
I would not remove the nx lint command.
@dereklin: Your workspace lint command should actually run ./node_modules/.bin/nx lint && ng lint.
Thanks @bcabanes and @skorunka
@bcabanes : has this changed in recent releases?
I see this in my build output:
> nx lint && ng lint
> NX NOTE Nx didn't recognize the command, forwarding on to the Angular CLI.
@tmtron This is caused by our new shiny CLI, this Note will be fixed in the next release ;)