neutrinojs / neutrino

Create and build modern JavaScript projects with zero initial configuration.
https://neutrinojs.org
Mozilla Public License 2.0
3.95k stars 213 forks source link

"npm run lint -- --fix" exited unsuccessfully #1522

Closed carlosen14 closed 4 years ago

carlosen14 commented 4 years ago

Bug or issue?

Please try to answer the following questions:

carlos@carlos-lenovo:~/test$ npx @neutrinojs/create-project neutrinojs --debug
                        _          _
    _ __    ___  _   _ | |_  _ __ (_) _ __    ___
   | '_ \  / _ \| | | || __|| '__|| || '_ \  / _ \
   | | | ||  __/| |_| || |_ | |   | || | | || (_) |
   |_| |_| \___| \__,_| \__||_|   |_||_| |_| \___/

Welcome to Neutrino! 👋
To help you create your new project, I am going to ask you a few questions.

? 🤔  First up, what would you like to create? A web or Node.js application
? 🤔  Next, what kind of application would you like to create? Node.js
? 🤔  Would you like to add a test runner to your project? Mocha
? 🤔  Would you like to add linting to your project? StandardJS rules

👌  Looks like I have all the info I need. Give me a moment while I create your project!

Wrote to /home/carlos/test/neutrinojs/package.json:

{
  "name": "neutrinojs",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

   create neutrinojs/package.json
npx: installed 1 in 0.655s
An unexpected error occurred.
{ Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
    at TLSSocket.emit (events.js:189:13)
    at TLSSocket._finishInit (_tls_wrap.js:633:8) code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' }
   create neutrinojs/.neutrinorc.js
   create neutrinojs/.eslintrc.js
   create neutrinojs/webpack.config.js
   create neutrinojs/src/app.js
   create neutrinojs/src/index.js
   create neutrinojs/.mocharc.js
   create neutrinojs/test/simple_test.js

⏳  Installing devDependencies: @neutrinojs/node@^9.0.0, neutrino@^9.0.0, webpack@^4, webpack-cli@^3, @neutrinojs/mocha@^9.0.0, mocha@^6, @neutrinojs/standardjs@^9.0.0, eslint@^6
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN neutrinojs@1.0.0 No description
npm WARN neutrinojs@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ @neutrinojs/standardjs@9.0.0
+ @neutrinojs/mocha@9.0.0
+ @neutrinojs/node@9.0.0
+ neutrino@9.0.0
+ webpack-cli@3.3.10
+ eslint@6.8.0
+ mocha@6.2.2
+ webpack@4.41.5
added 760 packages from 872 contributors and audited 8272 packages in 15.93s
found 0 vulnerabilities

⏳  Performing one-time lint

> neutrinojs@1.0.0 lint /home/carlos/test/neutrinojs
> eslint --cache --format codeframe --ext mjs,js src test "--fix"

error: 'assert.equal' was deprecated since v10.0.0. Use 'assert.strictEqual' instead (node/no-deprecated-api) at test/simple_test.js:5:5:
  3 | describe('simple', () => {
  4 |   it('should be sane', () => {
> 5 |     assert.equal(true, !false)
    |     ^
  6 |   })
  7 | })
  8 | 

1 error found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! neutrinojs@1.0.0 lint: `eslint --cache --format codeframe --ext mjs,js src test "--fix"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the neutrinojs@1.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/carlos/.npm/_logs/2020-01-22T17_59_40_947Z-debug.log
✖ The command "npm run lint -- --fix" exited unsuccessfully.
edmorley commented 4 years ago

Hi! Thank you for filing it looks like this is fixed by https://github.com/mysticatea/eslint-plugin-node/commit/276a9ad0fa8d6db224aae6fe6d35146a3fac9377 which is in eslint-plugin-node v11, which is on Neutrino master. I'll publish a new release soon that includes it :-)

edmorley commented 4 years ago

I've just released Neutrino v9.1.0, which should resolve this issue (via the upgrade of eslint-plugin-node to v11). Let me know if that doesn't help :-)

morshlab commented 1 year ago

not working need to update the plugin full of bug

AmolPounikar commented 1 year ago

after runnig the command npm run lint -- --fix the error litst is not display and the project dos not run