Page 4 of 4

Re: JavaScript Linter

Posted: Wed Jan 24, 2024 10:40 pm
by hiran
Cholmondely wrote: Wed Jan 24, 2024 6:22 pm
I already had node (from dismal attempts at mastering javascript).

I got this:

Command inside AppleMac's "Terminal":

Code: Select all

npm init @eslint/config
resulted in all sorts of on-going fun and games culminating in this:

Code: Select all

npx: installed 43 in 30.559s
file:///~/~/.npm/_npx/46428/lib/node_modules/@eslint/create-config/lib/init/config-initializer.js:400
        throw new Error("A package.json file is necessary to initialize ESLint. Run `npm init` to create a package.json file and try again.");
              ^

Error: A package.json file is necessary to initialize ESLint. Run `npm init` to create a package.json file and try again.
    at promptUser (file:///~/~/.npm/_npx/46428/lib/node_modules/@eslint/create-config/lib/init/config-initializer.js:400:15)
    at initializeConfig (file:///~/~/.npm/_npx/46428/lib/node_modules/@eslint/create-config/lib/init/config-initializer.js:616:12)
    at file:///~/~/.npm/_npx/46428/lib/node_modules/@eslint/create-config/bin/create-config.js:10:1
    at ModuleJob.run (internal/modules/esm/module_job.js:146:23)
    at async Loader.import (internal/modules/esm/loader.js:165:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5)
I can see you ran `npm init @eslint/config`.
Now what output do you get from `npm init` running in the same directory?

Re: JavaScript Linter

Posted: Thu Jan 25, 2024 1:20 am
by Cholmondely
hiran wrote: Wed Jan 24, 2024 10:40 pm
I can see you ran `npm init @eslint/config`.
Now what output do you get from `npm init` running in the same directory?


1) Before trying all this, I had a stab at the OXP Verifier.

Using the 1.90 Verifier resulted in odd messages about XML (the .js script & the OpenStep .plist I was checking had nothing about XML in either, so I presume it was more to do with the 1.90 Verifier).

Using the 1.91 Verifier resulted in just as little information as I get in my lastest.log - I presume that that too uses OXP Verifier.



2) Then another stab at ATOM

I then ran them both through ATOM. No joy with the .js script, but chunks of the .plist appeared in red! And I had just enough smatterings of knowledge to fix them! I rather amazed myself...

So the desperate need for a .plist linter might just be over! (No joy yet with XML .plists, though, and I seem to be getting error messages about the shipdata.plist in The Assassins Guild which is in XML).



3) "npm init" yielded this:

Code: Select all

gubbins ~ % npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help init` for definitive documentation on these fields and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (gubbins) 

And, if it is relevant, I got the following message when I first expanded the node.js package:

Code: Select all

This package will install:
	•	Node.js v14.15.1 to /usr/local/bin/node
	•	npm v6.14.8 to /usr/local/bin/npm