Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eslint-community/eslint-plugin-n
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d7bf4e1e1058a571170b9b5ed42a1bb4b4624ce3
Choose a base ref
...
head repository: eslint-community/eslint-plugin-n
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 85b794508a0fb92e021c09e63378314093772640
Choose a head ref

Commits on Sep 5, 2023

  1. 3
    Copy the full SHA
    20d2713 View commit details

Commits on Sep 8, 2023

  1. feat: export flat/recommended-script and flat/recommended-module (#113)

    `eslint-plugin-n/configs/recommended-script` & `eslint-plugin-n/configs/recommended-module` are deprecated and may be removed in future majors.
    aladdin-add authored Sep 8, 2023
    Copy the full SHA
    1f8fdc8 View commit details
  2. Copy the full SHA
    78595c4 View commit details

Commits on Sep 11, 2023

  1. Copy the full SHA
    2ab30ce View commit details
  2. Release 16.1.0

    aladdin-add committed Sep 11, 2023
    Copy the full SHA
    47cd9a6 View commit details

Commits on Sep 12, 2023

  1. Copy the full SHA
    b7d0536 View commit details
  2. Copy the full SHA
    150b34f View commit details

Commits on Sep 25, 2023

  1. Copy the full SHA
    7d855e6 View commit details

Commits on Oct 5, 2023

  1. Copy the full SHA
    4f3891c View commit details
  2. Copy the full SHA
    7f54d0c View commit details

Commits on Oct 7, 2023

  1. Copy the full SHA
    98ea90e View commit details
  2. Copy the full SHA
    574df88 View commit details
  3. Copy the full SHA
    5507f43 View commit details

Commits on Oct 10, 2023

  1. fix: Normalise package.json#files before checking ignores and white…

    …list (#123) (fixes #122)
    
    Co-authored-by: 唯然 <weiran.zsd@outlook.com>
    scagood and aladdin-add authored Oct 10, 2023
    Copy the full SHA
    2d43f48 View commit details

Commits on Oct 11, 2023

  1. Copy the full SHA
    6d02512 View commit details
  2. Release 16.2.0

    aladdin-add committed Oct 11, 2023
    Copy the full SHA
    f9dbe21 View commit details

Commits on Oct 17, 2023

  1. Copy the full SHA
    fba650a View commit details

Commits on Oct 19, 2023

  1. Copy the full SHA
    2200c43 View commit details

Commits on Oct 20, 2023

  1. Copy the full SHA
    446e744 View commit details

Commits on Nov 1, 2023

  1. Copy the full SHA
    79c8afd View commit details

Commits on Nov 7, 2023

  1. Copy the full SHA
    ff01930 View commit details
  2. Copy the full SHA
    22ba54c View commit details
  3. Release 16.3.0

    aladdin-add committed Nov 7, 2023
    Copy the full SHA
    5343efd View commit details

Commits on Nov 10, 2023

  1. Copy the full SHA
    2846f4f View commit details
  2. Release 16.3.1

    aladdin-add committed Nov 10, 2023
    Copy the full SHA
    deeb998 View commit details

Commits on Nov 27, 2023

  1. Copy the full SHA
    8bd6c7e View commit details

Commits on Dec 11, 2023

  1. Copy the full SHA
    b075568 View commit details
  2. Release 16.4.0

    aladdin-add committed Dec 11, 2023
    Copy the full SHA
    964cf65 View commit details

Commits on Dec 15, 2023

  1. chore: Configure Renovate

    Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: 唯然 <weiran.zsd@outlook.com>
    Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
    3 people authored Dec 15, 2023
    Copy the full SHA
    0d6a0fe View commit details

Commits on Dec 16, 2023

  1. docs: Auto-generate configs list with eslint-doc-generator (#146)

    docs: auto-generate configs list with eslint-doc-generator
    bmish authored Dec 16, 2023
    Copy the full SHA
    6409e34 View commit details

Commits on Dec 20, 2023

  1. feat: Add syntax check for ES2021 to no-unsupported-features/es-synta…

    …x rule (#152)
    
    the change was borrowed from mysticatea#283
    credits goes to @ota-meshi
    aladdin-add authored Dec 20, 2023
    Copy the full SHA
    6835a10 View commit details
  2. feat: Add builtins check for ES2021 to no-unsupported-features/es-bui…

    …ltins rule (#153)
    
    the change was borrowed from mysticatea#284
    
    credits goes to @ota-meshi. :)
    
    Signed-off-by: 唯然 <weiran.zsd@outlook.com>
    aladdin-add authored Dec 20, 2023
    Copy the full SHA
    15a5850 View commit details
  3. Release 16.5.0

    aladdin-add committed Dec 20, 2023
    Copy the full SHA
    0c9c2f3 View commit details

Commits on Dec 29, 2023

  1. feat: supported new globals added in the new node.js versions (#154)

    For eslintrc configs, using the 'env' property;
    for flat configs, reference the npm package 'globals'.
    aladdin-add authored Dec 29, 2023
    Copy the full SHA
    7628925 View commit details
  2. Release 16.6.0

    aladdin-add committed Dec 29, 2023
    Copy the full SHA
    0ab0f41 View commit details

Commits on Jan 2, 2024

  1. Copy the full SHA
    2419888 View commit details
  2. Release 16.6.1

    aladdin-add committed Jan 2, 2024
    Copy the full SHA
    bc6c538 View commit details

Commits on Jan 3, 2024

  1. chore: move rule tests parserOptions to ruleTester (#157)

    it can help migrating to the eslint v9 RuleTester
    aladdin-add authored Jan 3, 2024
    Copy the full SHA
    ad8f4f4 View commit details

Commits on Jan 4, 2024

  1. chore: add non-rule-change issue template (#159)

    There is already an issue template for rule-related changes,
    but some changes do not apply to it. Therefore, this pull request adds a new one.
    aladdin-add authored Jan 4, 2024
    Copy the full SHA
    c191101 View commit details

Commits on Jan 8, 2024

  1. feat!: drop eslint v7 & node.js < 18 (#161)

    chore: switch to new rule-tester.
    
    Signed-off-by: 唯然 <weiran.zsd@outlook.com>
    Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
    aladdin-add and scagood authored Jan 8, 2024
    Copy the full SHA
    41ceed7 View commit details
  2. Copy the full SHA
    5449752 View commit details

Commits on Jan 9, 2024

  1. feat!: Start using enhanced-resolve to improve ts support (#139)

    * feat: Use enhanced-resolve for imports
    
    * chore: Improve the metadata from "ImportTarget"
    
    * chore: remove "enhanced-resolve" from "no-hide-core-modules"
    
    * test: Add a test for #66
    
    * feat!: Allow ts paths aliases (#84)
    
    * feat: Allow for "allowImportingTsExtensions" (#134)
    
    * feat: Add test for import maps (#147)
    
    * Update lib/util/import-target.js
    
    Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
    
    * test: Add test for n/no-missing-require eslint/use-at-your-own-risk
    
    * chore: Remove esbuild
    
    * feat: Allow for settings.cwd to be used before process.cwd
    
    * chore: replace reference to eslint/use-at-your-own-risk
    
    * chore: Remove more unused packages
    
    * chore: update rule test options to flat config
    
    * fix: incorrect env in tests
    
    ---------
    
    Co-authored-by: 唯然 <weiran.zsd@outlook.com>
    scagood and aladdin-add authored Jan 9, 2024
    Copy the full SHA
    dc9f473 View commit details
  2. Release 17.0.0-0

    aladdin-add committed Jan 9, 2024
    Copy the full SHA
    9613f9b View commit details

Commits on Jan 12, 2024

  1. Copy the full SHA
    bbfde8d View commit details
  2. chore: update dependency release-it to v17 (#168)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 12, 2024
    Copy the full SHA
    1c91e05 View commit details
  3. chore: update dependency markdownlint-cli to ^0.38.0 (#149)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 12, 2024
    Copy the full SHA
    3fd61be View commit details
  4. chore: update dependency @typescript-eslint/parser to v6 (#166)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 12, 2024
    Copy the full SHA
    4265094 View commit details

Commits on Jan 19, 2024

  1. Copy the full SHA
    fc77da2 View commit details

Commits on Jan 22, 2024

  1. chore: update dependency minimatch to v9 (#167)

    * chore: update dependency minimatch to v9
    
    * fix: add "allowWindowsEscape" to Minimatch options
    
    * fix: Convert all patterns to posix from win32 in Minimatch
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
    renovate[bot] and scagood authored Jan 22, 2024
    Copy the full SHA
    5ad657c View commit details

Commits on Jan 29, 2024

  1. Copy the full SHA
    372b283 View commit details
Showing with 16,774 additions and 14,758 deletions.
  1. +9 −0 .editorconfig
  2. +25 −0 .eslint-doc-generatorrc.js
  3. +0 −102 .eslintrc.js
  4. +0 −2 .github/FUNDING.yml
  5. +52 −0 .github/ISSUE_TEMPLATE/bug-report.yml
  6. +1 −0 .github/ISSUE_TEMPLATE/config.yml
  7. +41 −0 .github/ISSUE_TEMPLATE/new-rule.yml
  8. +47 −0 .github/ISSUE_TEMPLATE/non-rule-change.yml
  9. +19 −0 .github/release-please/config.json
  10. +1 −0 .github/release-please/manifest.json
  11. +4 −0 .github/renovate.json
  12. +23 −24 .github/workflows/CI.yml
  13. +44 −0 .github/workflows/release-please.yml
  14. +3 −1 .gitignore
  15. +0 −3 .husky/pre-commit
  16. +3 −1 .npmrc
  17. +0 −1 .nycrc
  18. +1 −0 .prettierrc
  19. +340 −0 CHANGELOG.md
  20. +121 −89 README.md
  21. +2 −10 configs/recommended-module.js
  22. +2 −10 configs/recommended-script.js
  23. +13 −3 docs/rules/file-extension-in-import.md
  24. +103 −0 docs/rules/hashbang.md
  25. +1 −1 docs/rules/no-callback-literal.md
  26. +3 −1 docs/rules/no-deprecated-api.md
  27. +1 −1 docs/rules/no-exports-assign.md
  28. +7 −46 docs/rules/no-extraneous-import.md
  29. +11 −54 docs/rules/no-extraneous-require.md
  30. +11 −41 docs/rules/no-missing-import.md
  31. +13 −45 docs/rules/no-missing-require.md
  32. +1 −1 docs/rules/no-process-exit.md
  33. +3 −75 docs/rules/no-unpublished-bin.md
  34. +25 −85 docs/rules/no-unpublished-import.md
  35. +22 −85 docs/rules/no-unpublished-require.md
  36. +0 −308 docs/rules/no-unsupported-features.md
  37. +8 −1 docs/rules/no-unsupported-features/es-builtins.md
  38. +1 −1 docs/rules/no-unsupported-features/es-syntax.md
  39. +20 −268 docs/rules/no-unsupported-features/node-builtins.md
  40. +73 −0 docs/rules/prefer-node-protocol.md
  41. +3 −3 docs/rules/process-exit-as-throw.md
  42. +3 −132 docs/rules/shebang.md
  43. +235 −0 docs/shared-settings.md
  44. +11 −9 eslint.config.js
  45. +17 −74 lib/configs/_commons.js
  46. +29 −4 lib/configs/recommended-module.js
  47. +29 −4 lib/configs/recommended-script.js
  48. +21 −11 lib/configs/recommended.js
  49. +0 −1,274 lib/converted-esm/import-meta-resolve.js
  50. +83 −0 lib/eslint-utils.d.ts
  51. +44 −12 lib/index.js
  52. +18 −19 lib/rules/callback-return.js
  53. +94 −44 lib/rules/exports-style.js
  54. +57 −45 lib/rules/file-extension-in-import.js
  55. +21 −21 lib/rules/global-require.js
  56. +7 −6 lib/rules/handle-callback-err.js
  57. +237 −0 lib/rules/hashbang.js
  58. +12 −14 lib/rules/no-callback-literal.js
  59. +44 −22 lib/rules/no-deprecated-api.js
  60. +16 −3 lib/rules/no-exports-assign.js
  61. +3 −3 lib/rules/no-extraneous-import.js
  62. +3 −3 lib/rules/no-extraneous-require.js
  63. +27 −43 lib/rules/no-hide-core-modules.js
  64. +9 −3 lib/rules/no-missing-import.js
  65. +7 −3 lib/rules/no-missing-require.js
  66. +23 −9 lib/rules/no-mixed-requires.js
  67. +2 −2 lib/rules/no-new-require.js
  68. +27 −14 lib/rules/no-path-concat.js
  69. +12 −14 lib/rules/no-process-env.js
  70. +11 −5 lib/rules/no-process-exit.js
  71. +2 −2 lib/rules/no-restricted-import.js
  72. +2 −2 lib/rules/no-restricted-require.js
  73. +30 −8 lib/rules/no-sync.js
  74. +13 −31 lib/rules/no-unpublished-bin.js
  75. +7 −8 lib/rules/no-unpublished-import.js
  76. +8 −4 lib/rules/no-unpublished-require.js
  77. +0 −1,548 lib/rules/no-unsupported-features.js
  78. +368 −83 lib/rules/no-unsupported-features/es-builtins.js
  79. +30 −0 lib/rules/no-unsupported-features/es-syntax-additions.json
  80. +139 −579 lib/rules/no-unsupported-features/es-syntax.js
  81. +615 −0 lib/rules/no-unsupported-features/es-syntax.json
  82. +14 −366 lib/rules/no-unsupported-features/node-builtins.js
  83. +6 −7 lib/rules/prefer-global/buffer.js
  84. +5 −4 lib/rules/prefer-global/console.js
  85. +5 −4 lib/rules/prefer-global/process.js
  86. +6 −7 lib/rules/prefer-global/text-decoder.js
  87. +6 −7 lib/rules/prefer-global/text-encoder.js
  88. +6 −7 lib/rules/prefer-global/url-search-params.js
  89. +6 −7 lib/rules/prefer-global/url.js
  90. +193 −0 lib/rules/prefer-node-protocol.js
  91. +10 −8 lib/rules/prefer-promises/dns.js
  92. +10 −8 lib/rules/prefer-promises/fs.js
  93. +13 −11 lib/rules/process-exit-as-throw.js
  94. +9 −165 lib/rules/shebang.js
  95. +47 −0 lib/types-code-path-analysis/code-path-analyzer.d.ts
  96. +115 −0 lib/types-code-path-analysis/code-path-segment.d.ts
  97. +895 −0 lib/types-code-path-analysis/code-path-state.d.ts
  98. +111 −0 lib/types-code-path-analysis/code-path.d.ts
  99. +15 −0 lib/types-code-path-analysis/debug-helpers.d.ts
  100. +136 −0 lib/types-code-path-analysis/fork-context.d.ts
  101. +17 −0 lib/types-code-path-analysis/id-generator.d.ts
  102. +66 −0 lib/unsupported-features/node-builtins-modules/assert.js
  103. +44 −0 lib/unsupported-features/node-builtins-modules/async_hooks.js
  104. +56 −0 lib/unsupported-features/node-builtins-modules/buffer.js
  105. +27 −0 lib/unsupported-features/node-builtins-modules/child_process.js
  106. +31 −0 lib/unsupported-features/node-builtins-modules/cluster.js
  107. +47 −0 lib/unsupported-features/node-builtins-modules/console.js
  108. +138 −0 lib/unsupported-features/node-builtins-modules/crypto.js
  109. +21 −0 lib/unsupported-features/node-builtins-modules/dgram.js
  110. +32 −0 lib/unsupported-features/node-builtins-modules/diagnostics_channel.js
  111. +66 −0 lib/unsupported-features/node-builtins-modules/dns.js
  112. +20 −0 lib/unsupported-features/node-builtins-modules/domain.js
  113. +72 −0 lib/unsupported-features/node-builtins-modules/events.js
  114. +196 −0 lib/unsupported-features/node-builtins-modules/fs.js
  115. +36 −0 lib/unsupported-features/node-builtins-modules/http.js
  116. +41 −0 lib/unsupported-features/node-builtins-modules/http2.js
  117. +25 −0 lib/unsupported-features/node-builtins-modules/https.js
  118. +48 −0 lib/unsupported-features/node-builtins-modules/inspector.js
  119. +34 −0 lib/unsupported-features/node-builtins-modules/module.js
  120. +37 −0 lib/unsupported-features/node-builtins-modules/net.js
  121. +45 −0 lib/unsupported-features/node-builtins-modules/os.js
  122. +43 −0 lib/unsupported-features/node-builtins-modules/path.js
  123. +33 −0 lib/unsupported-features/node-builtins-modules/perf_hooks.js
  124. +138 −0 lib/unsupported-features/node-builtins-modules/process.js
  125. +24 −0 lib/unsupported-features/node-builtins-modules/punycode.js
  126. +25 −0 lib/unsupported-features/node-builtins-modules/querystring.js
  127. +47 −0 lib/unsupported-features/node-builtins-modules/readline.js
  128. +21 −0 lib/unsupported-features/node-builtins-modules/sea.js
  129. +17 −0 lib/unsupported-features/node-builtins-modules/sqlite.js
  130. +119 −0 lib/unsupported-features/node-builtins-modules/stream.js
  131. +20 −0 lib/unsupported-features/node-builtins-modules/string_decoder.js
  132. +58 −0 lib/unsupported-features/node-builtins-modules/test.js
  133. +59 −0 lib/unsupported-features/node-builtins-modules/timers.js
  134. +37 −0 lib/unsupported-features/node-builtins-modules/tls.js
  135. +21 −0 lib/unsupported-features/node-builtins-modules/trace_events.js
  136. +22 −0 lib/unsupported-features/node-builtins-modules/tty.js
  137. +33 −0 lib/unsupported-features/node-builtins-modules/url.js
  138. +126 −0 lib/unsupported-features/node-builtins-modules/util.js
  139. +52 −0 lib/unsupported-features/node-builtins-modules/v8.js
  140. +26 −0 lib/unsupported-features/node-builtins-modules/vm.js
  141. +14 −0 lib/unsupported-features/node-builtins-modules/wasi.js
  142. +48 −0 lib/unsupported-features/node-builtins-modules/worker_threads.js
  143. +54 −0 lib/unsupported-features/node-builtins-modules/zlib.js
  144. +51 −0 lib/unsupported-features/node-builtins.js
  145. +296 −0 lib/unsupported-features/node-globals.js
  146. +34 −0 lib/unsupported-features/types.js
  147. +28 −31 lib/util/check-existence.js
  148. +7 −5 lib/util/check-extraneous.js
  149. +30 −16 lib/util/check-prefer-global.js
  150. +29 −19 lib/util/check-publish.js
  151. +14 −9 lib/util/check-restricted.js
  152. +105 −52 lib/util/check-unsupported-builtins.js
  153. +35 −16 lib/util/enumerate-property-names.js
  154. +8 −1 lib/util/exists.js
  155. +7 −7 lib/util/extend-trackmap-with-node-prefix.js
  156. +10 −8 lib/util/get-allow-modules.js
  157. +24 −24 lib/util/get-configured-node-version.js
  158. +53 −39 lib/util/get-convert-path.js
  159. +67 −52 lib/util/get-npmignore.js
  160. +11 −5 lib/util/get-package-json.js
  161. +9 −10 lib/util/get-resolve-paths.js
  162. +13 −12 lib/util/get-semver-range.js
  163. +43 −14 lib/util/get-try-extensions.js
  164. +49 −0 lib/util/get-tsconfig.js
  165. +158 −0 lib/util/get-typescript-extension-map.js
  166. +279 −84 lib/util/import-target.js
  167. +53 −0 lib/util/is-bin-file.js
  168. +7 −2 lib/util/is-typescript.js
  169. +36 −32 lib/util/map-typescript-extension.js
  170. +21 −13 lib/util/merge-visitors-in-place.js
  171. +12 −2 lib/util/strip-import-path-params.js
  172. +56 −34 lib/util/visit-import.js
  173. +37 −14 lib/util/visit-require.js
  174. +47 −40 package.json
  175. +0 −6 scripts/convert-pure-esm-to-cjs.js
  176. +2 −2 scripts/rules.js
  177. +1 −1 scripts/update.js
  178. +1 −2 tests/fixtures/configs/cjs/package.json
  179. 0 tests/fixtures/file-extension-in-import/{multi.cjs → multi.js}
  180. 0 tests/fixtures/file-extension-in-import/{multi.mjs → multi.json}
  181. 0 tests/fixtures/file-extension-in-import/ts-allow-extension/file.ts
  182. +6 −0 tests/fixtures/file-extension-in-import/ts-allow-extension/tsconfig.json
  183. +5 −0 tests/fixtures/no-extraneous/import-map/package.json
  184. 0 tests/fixtures/no-extraneous/import-map/src/b.js
  185. +1 −2 tests/fixtures/no-hide-core-modules/indirect-thirdparty/package.json
  186. +1 −0 tests/fixtures/no-missing/node_modules/misconfigured-default/build/index.js
  187. +9 −0 tests/fixtures/no-missing/node_modules/misconfigured-default/package.json
  188. +1 −0 tests/fixtures/no-missing/node_modules/misconfigured-default/src/index.ts
  189. +5 −0 tests/fixtures/no-missing/node_modules/types-only/package.json
  190. 0 tests/fixtures/no-missing/node_modules/types-only/types.d.ts
  191. 0 tests/fixtures/no-missing/ts-allow-extension/file.ts
  192. +6 −0 tests/fixtures/no-missing/ts-allow-extension/tsconfig.json
  193. +5 −0 tests/fixtures/no-missing/ts-extends/base.tsconfig.json
  194. 0 tests/fixtures/no-missing/ts-extends/d.ts
  195. 0 tests/fixtures/no-missing/ts-extends/e.tsx
  196. +3 −0 tests/fixtures/no-missing/ts-extends/tsconfig.json
  197. 0 tests/fixtures/no-missing/ts-paths/some/where.ts
  198. +8 −0 tests/fixtures/no-missing/ts-paths/tsconfig.json
  199. 0 tests/fixtures/no-missing/ts-preserve/d.ts
  200. 0 tests/fixtures/no-missing/ts-preserve/e.tsx
  201. +5 −0 tests/fixtures/no-missing/ts-preserve/tsconfig.json
  202. 0 tests/fixtures/no-missing/ts-react/d.ts
  203. 0 tests/fixtures/no-missing/ts-react/e.tsx
  204. +5 −0 tests/fixtures/no-missing/ts-react/tsconfig.json
  205. +1 −1 tests/fixtures/no-unpublished-bin/multi-ok/package.json
  206. +1 −0 tests/fixtures/no-unpublished/issue99/bin.js
  207. 0 tests/fixtures/no-unpublished/issue99/index.js
  208. +8 −0 tests/fixtures/no-unpublished/issue99/package.json
  209. +2 −1 tests/fixtures/shebang/object-bin/package.json
  210. +7 −0 tests/fixtures/shebang/unpublished/package.json
  211. +0 −10 tests/helpers.js
  212. +34 −30 tests/lib/configs/{recommended.js → eslintrc.js}
  213. +3 −13 tests/lib/rules/callback-return.js
  214. +318 −360 tests/lib/rules/exports-style.js
  215. +75 −12 tests/lib/rules/file-extension-in-import.js
  216. +1 −3 tests/lib/rules/global-require.js
  217. +17 −9 tests/lib/rules/handle-callback-err.js
  218. +497 −0 tests/lib/rules/hashbang.js
  219. +7 −1 tests/lib/rules/no-callback-literal.js
  220. +25 −142 tests/lib/rules/no-deprecated-api.js
  221. +6 −4 tests/lib/rules/no-exports-assign.js
  222. +9 −7 tests/lib/rules/no-extraneous-import.js
  223. +2 −2 tests/lib/rules/no-extraneous-require.js
  224. +2 −6 tests/lib/rules/no-hide-core-modules.js
  225. +226 −30 tests/lib/rules/no-missing-import.js
  226. +169 −62 tests/lib/rules/no-missing-require.js
  227. +3 −2 tests/lib/rules/no-mixed-requires.js
  228. +1 −1 tests/lib/rules/no-new-require.js
  229. +2 −13 tests/lib/rules/no-path-concat.js
  230. +1 −1 tests/lib/rules/no-process-env.js
  231. +3 −2 tests/lib/rules/no-process-exit.js
  232. +6 −8 tests/lib/rules/no-restricted-import.js
  233. +2 −4 tests/lib/rules/no-restricted-require.js
  234. +39 −1 tests/lib/rules/no-sync.js
  235. +16 −6 tests/lib/rules/no-unpublished-bin.js
  236. +20 −25 tests/lib/rules/no-unpublished-import.js
  237. +20 −53 tests/lib/rules/no-unpublished-require.js
  238. +0 −1,409 tests/lib/rules/no-unsupported-features.js
  239. +2,398 −2,255 tests/lib/rules/no-unsupported-features/es-builtins.js
  240. +3,196 −2,653 tests/lib/rules/no-unsupported-features/es-syntax.js
  241. +486 −752 tests/lib/rules/no-unsupported-features/node-builtins.js
  242. +2 −10 tests/lib/rules/prefer-global/buffer.js
  243. +2 −10 tests/lib/rules/prefer-global/console.js
  244. +2 −10 tests/lib/rules/prefer-global/process.js
  245. +2 −10 tests/lib/rules/prefer-global/text-decoder.js
  246. +2 −10 tests/lib/rules/prefer-global/text-encoder.js
  247. +2 −10 tests/lib/rules/prefer-global/url-search-params.js
  248. +2 −10 tests/lib/rules/prefer-global/url.js
  249. +246 −0 tests/lib/rules/prefer-node-protocol.js
  250. +2 −8 tests/lib/rules/prefer-promises/dns.js
  251. +2 −8 tests/lib/rules/prefer-promises/fs.js
  252. +7 −319 tests/lib/rules/shebang.js
  253. +65 −0 tests/test-helpers.js
  254. +25 −0 tsconfig.json
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
25 changes: 25 additions & 0 deletions .eslint-doc-generatorrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use strict"

/** @type {import('eslint-doc-generator').GenerateOptions} */
const config = {
ignoreConfig: [
"recommended",
"flat/recommended-script",
"flat/recommended-module",
"flat/recommended",
"flat/mixed-esm-and-cjs",
],
urlConfigs: "https://github.com/eslint-community/eslint-plugin-n#-configs",
configEmoji: [
["recommended-script", "✅"],
["recommended-module", "🟢"],
["recommended", "☑️"],
["flat/recommended-script", "✅"],
["flat/recommended-module", "🟢"],
["flat/recommended", "☑️"],
["flat/mixed-esm-and-cjs", "🟠"],
],
ruleDocSectionOptions: false,
}

module.exports = config
102 changes: 0 additions & 102 deletions .eslintrc.js

This file was deleted.

2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "\U0001F41E Report a problem"
description: "Report an issue with eslint-plugin-n"
title: "Bug: (fill in)"
labels:
- bug
body:
- type: markdown
attributes:
value: By opening an issue, you agree to abide by the [Open JS Foundation Code of Conduct](https://eslint.org/conduct).
- type: textarea
attributes:
label: Environment
description: |
Please tell us about how you're running ESLint.
value: |
Node version:
npm version:
ESLint version:
eslint-plugin-n version:
Operating System:
validations:
required: true
- type: input
attributes:
label: What rule do you want to report?
description: Please provide the name of the rule you're having problems with.
validations:
required: true
- type: input
attributes:
label: Link to Minimal Reproducible Example
description: 'Link to a [playground](https://eslint-online-playground.netlify.app/#eNptjzFuwzAMRa8icGqB2NndtbcoOxgybaiVSUGSgxSG717KUoAMWSiReJ//c4cU7ZXu4xo89T8JBrDCSbTxsryFKJZS6olv7x/IcAFK3nHuFZrdUgVuDRKzYTNHWQ02pAt+Wxx3jKBKZLqf1ETzuPlsvpCN2UsxppJpMLsuOS51GDdPZVQ7o3v5ytK1RJ0mQhiKW4wSESp2lEfLdw0bRvs7LuUuYQ167kLIf4GqdpVJXRBOS4SJbp8UiCdi6ygVptk/jqoyP2ZK+m9JX1z8TLVIBxz/MqF45g==), [StackBlitz](https://stackblitz.com), or GitHub repo with a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed.'
placeholder: 'https://eslint-online-playground.netlify.app/#'
validations:
required: true
- type: textarea
attributes:
label: What did you expect to happen?
description: |
You can use Markdown in this field.
validations:
required: true
- type: checkboxes
attributes:
label: Participation
options:
- label: I am willing to submit a pull request for this issue.
required: false
- type: textarea
attributes:
label: Additional comments
description: Is there anything else that's important for the team to know?
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/new-rule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "\U0001F680 Propose a new rule"
description: "Propose a new rule to be added to the plugin"
title: "New Rule: (fill in)"
labels:
- rule
- feature
body:
- type: markdown
attributes:
value: By opening an issue, you agree to abide by the [Open JS Foundation Code of Conduct](https://eslint.org/conduct).
- type: textarea
attributes:
label: Rule details
description: What should the new rule do?
validations:
required: true
- type: dropdown
attributes:
label: What type of rule is this?
options:
- Warns about a potential problem
- Suggests an alternate way of doing something
validations:
required: true
- type: textarea
attributes:
label: Example code
description: Please provide some example JavaScript code that this rule will warn about. This field will render as JavaScript.
render: js
validations:
required: true
- type: checkboxes
attributes:
label: Participation
options:
- label: I am willing to submit a pull request to implement this rule.
required: false
- type: textarea
attributes:
label: Additional comments
description: Is there anything else that's important for the team to know?
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/non-rule-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "\U0001F680 Request a change (not rule-related)"
description: "Request a change that is not a bug fix, rule change, or new rule"
title: "Change Request: (fill in)"
labels:
- enhancement
- core
body:
- type: markdown
attributes:
value: By opening an issue, you agree to abide by the [Open JS Foundation Code of Conduct](https://eslint.org/conduct).
- type: input
attributes:
label: eslint-plugin-n version
description: |
What version of eslint-plugin-n are you currently using?
placeholder: |
e.g. v16.0.0
validations:
required: true
- type: textarea
attributes:
label: What problem do you want to solve?
description: |
Please explain your use case in as much detail as possible.
placeholder: |
ESLint currently...
validations:
required: true
- type: textarea
attributes:
label: What do you think is the correct solution?
description: |
Please explain how you'd like to change to address the problem.
placeholder: |
I'd like to...
validations:
required: true
- type: checkboxes
attributes:
label: Participation
options:
- label: I am willing to submit a pull request for this change.
required: false
- type: textarea
attributes:
label: Additional comments
description: Is there anything else that's important for the team to know?
19 changes: 19 additions & 0 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"release-type": "node",
"prerelease": false,
"include-component-in-tag": false,
"changelog-sections": [
{ "type": "feat", "section": "🌟 Features", "hidden": false },
{ "type": "fix", "section": "🩹 Fixes", "hidden": false },
{ "type": "docs", "section": "📚 Documentation", "hidden": false },

{ "type": "chore", "section": "🧹 Chores", "hidden": false },
{ "type": "perf", "section": "🧹 Chores", "hidden": false },
{ "type": "refactor", "section": "🧹 Chores", "hidden": false },
{ "type": "test", "section": "🧹 Chores", "hidden": false },

{ "type": "build", "section": "🤖 Automation", "hidden": false },
{ "type": "ci", "section": "🤖 Automation", "hidden": true }
],
"packages": { ".": {} }
}
1 change: 1 addition & 0 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".":"17.10.3"}
4 changes: 4 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>eslint/eslint//.github/renovate.json5"]
}
47 changes: 23 additions & 24 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -8,60 +8,59 @@ on:
- cron: 0 0 * * 0

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node: 16.x
- name: Install Packages
run: npm install
- name: Lint
run: npm run -s lint
node-version: 20.x
- run: npm install
- run: npm run -s lint
- run: npm run -s test:types

test:
name: Test

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
eslint: [8.x, 7.x]
node: [18.x]
eslint: [8.x, "9.x"]
node: [18.x, 20.x, 22.x]
include:
# run on node lts(ubuntu-latest)
- os: ubuntu-latest
node: "16.x"
node: "18.18.0"
eslint: "8.x"
- os: ubuntu-latest
node: "20.9.0"
eslint: "8.x"
- os: ubuntu-latest
node: "21.1.0"
eslint: "8.x"
- os: ubuntu-latest
node: "19.x"
node: "21.x"
eslint: "8.x"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install
- name: Install ESLint ${{ matrix.eslint }}
# We need to execute this command twice because of npm's bug.
# See also: https://npm.community/t/error-node-modules-staging-eslint-e7cf6846-node-modules-eslint
run: |
npm install --no-save eslint@${{ matrix.eslint }}
npm install --no-save eslint@${{ matrix.eslint }}
run: npm install --no-save --force eslint@${{ matrix.eslint }}
- name: Test
run: npm run -s test:ci
- name: Send Coverage
run: npm run -s codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: npm run -s test:tests
Loading