@ivanmaxlogiudice/eslint-config 1.0.27 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,6 +21,14 @@ based on [@antfu/eslint-config](https://github.com/antfu/eslint-config)
21
21
 
22
22
  ## Usage
23
23
 
24
+ ### Wizard
25
+
26
+ We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config.
27
+
28
+ ```bash
29
+ pnpx @ivanmaxlogiudice/eslint-config@latest
30
+ ```
31
+
24
32
  ### Install
25
33
 
26
34
  ```bash
@@ -285,7 +293,7 @@ Since flat config requires us to explicitly provide the plugin names (instead of
285
293
 
286
294
  | New Prefix | Original Prefix | Source Plugin |
287
295
  | ---------- | ---------------------- | ------------------------------------------------------------------------------------------ |
288
- | `import/*` | `i/*` | [eslint-plugin-i](https://github.com/un-es/eslint-plugin-i) |
296
+ | `import/*` | `import-x/*` | [eslint-plugin-import-x](https://github.com/un-es/eslint-plugin-import-x) |
289
297
  | `node/*` | `n/*` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) |
290
298
  | `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
291
299
  | `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
@@ -468,6 +476,21 @@ export default config({
468
476
  })
469
477
  ```
470
478
 
479
+ ### Editor Specific Disables
480
+
481
+ Some rules are disabled when inside ESLint IDE integrations, namely [`unused-imports/no-unused-imports`](https://www.npmjs.com/package/eslint-plugin-unused-imports) [`test/no-only-tests`](https://github.com/levibuzolic/eslint-plugin-no-only-tests)
482
+
483
+ This is to prevent unused imports from getting removed by the IDE during refactoring to get a better developer experience. Those rules will be applied when you run ESLint in the terminal or [Lint Staged](#lint-staged). If you don't want this behavior, you can disable them:
484
+
485
+ ```js
486
+ // eslint.config.js
487
+ import config from '@ivanmaxlogiudice/eslint-config'
488
+
489
+ export default config({
490
+ isInEditor: false
491
+ })
492
+ ```
493
+
471
494
  ### Lint Staged
472
495
 
473
496
  If you want to apply lint and auto-fix before every commit, you can add the following to your `package.json`:
@@ -0,0 +1,27 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
+ }) : x)(function(x) {
5
+ if (typeof require !== "undefined")
6
+ return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+ var __esm = (fn, res) => function __init() {
10
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
+ };
12
+ var __commonJS = (cb, mod) => function __require2() {
13
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ };
15
+
16
+ // node_modules/.pnpm/tsup@8.0.2_typescript@5.4.3/node_modules/tsup/assets/esm_shims.js
17
+ var init_esm_shims = __esm({
18
+ "node_modules/.pnpm/tsup@8.0.2_typescript@5.4.3/node_modules/tsup/assets/esm_shims.js"() {
19
+ "use strict";
20
+ }
21
+ });
22
+
23
+ export {
24
+ __require,
25
+ __commonJS,
26
+ init_esm_shims
27
+ };