stylelint / eslint-config-stylelint

Stylelint org's shareable config for eslint
MIT License
59 stars 9 forks source link

Migrate `eslint-plugin-node` to `eslint-plugin-n` #214

Closed ybiquitous closed 1 year ago

ybiquitous commented 1 year ago

Which issue, if any, is this issue related to?

None.

Is there anything in the PR that needs further explanation?

eslint-plugin-n is forked from eslint-plugin-node which seems no longer maintained, and is released by the ESLint Community organization.

See https://github.com/eslint-community/eslint-plugin-n

Test on stylelint/stylelint

$ npm i -D 'github:stylelint/eslint-config-stylelint#pull/214/merge'
...

$ npm --silent run lint:js

/Users/masafumi.koba/git/stylelint/stylelint/lib/__tests__/fixtures/config-require-unknown.js
  3:26  error  "./someUnknownFile.js" is not found                          n/no-missing-require
  3:51  error  Definition for rule 'node/no-missing-require' was not found  node/no-missing-require

/Users/masafumi.koba/git/stylelint/stylelint/lib/cli.js
  359:3  error  Don't use process.exit(); throw an error instead  n/no-process-exit

/Users/masafumi.koba/git/stylelint/stylelint/lib/testUtils/safeChdir.js
  2:43  error  "@jest/globals" is extraneous                                   n/no-extraneous-require
  2:61  error  Definition for rule 'node/no-extraneous-require' was not found  node/no-extraneous-require

/Users/masafumi.koba/git/stylelint/stylelint/scripts/remark-changelog-to-github-release.mjs
  1:1   error  Definition for rule 'node/no-extraneous-import' was not found  node/no-extraneous-import
  2:23  error  "unist-util-visit" is extraneous                               n/no-extraneous-import

✖ 7 problems (7 errors, 0 warnings)

We can fix the problems above easily.