@soujvnunes/eslint-config 0.2.0 → 0.3.1

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
@@ -1,6 +1,6 @@
1
1
  # @soujvnunes/eslint-config
2
2
 
3
- Shared flat ESLint config as factories. Bundles the plugin set (typescript-eslint, import-x, import-helpers, unused-imports, security, and — for the Next preset — react, react-hooks, jsx-a11y, `@next/next`); you only bring `eslint` + `typescript`.
3
+ Shared flat ESLint config as factories. Bundles the plugin set (typescript-eslint, import-x, import-helpers, unused-imports, security, and — for the Next preset — react, react-hooks, jsx-a11y, `@next/next`); you only bring `eslint` + `typescript`. The Next preset also bundles the TypeScript import resolver (`eslint-import-resolver-typescript`, wired via `import-x/resolver-next`), so `@/…` path aliases and `.d.ts` types resolve out of the box — no extra install, no `settings` wiring.
4
4
 
5
5
  ## Install
6
6
 
@@ -39,11 +39,11 @@ export default createBaseConfig()
39
39
 
40
40
  ## Options
41
41
 
42
- | Option | Default | Purpose |
43
- | ----------------- | ------------------------------------------------ | ------------------------------------------------------ |
44
- | `importGroups` | react → next → module → parent → sibling → index | Full import-order groups; insert your `@/…` paths |
45
- | `ignores` | — | Extra ignore globs, merged after the built-in defaults |
46
- | `tsconfigRootDir` | `process.cwd()` | Root for typescript-eslint's project service |
47
- | `extend` | `[]` | Extra flat-config objects appended at the end |
42
+ | Option | Default | Purpose |
43
+ | --- | --- | --- |
44
+ | `importGroups` | react → next → module → parent → sibling → index | Full import-order groups; insert your `@/…` paths |
45
+ | `ignores` | — | Extra ignore globs, merged after the built-in defaults |
46
+ | `tsconfigRootDir` | `process.cwd()` | Root for typescript-eslint's project service |
47
+ | `extend` | `[]` | Extra flat-config objects appended at the end |
48
48
 
49
49
  Type-aware rules use typescript-eslint's **project service**, so no `parserOptions.project` wiring is needed — it discovers the nearest `tsconfig.json` per file.
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import js from "@eslint/js";
3
3
  import nextPlugin from "@next/eslint-plugin-next";
4
4
  import prettier from "eslint-config-prettier";
5
+ import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
5
6
  import importHelpers from "eslint-plugin-import-helpers";
6
7
  import importXPlugin from "eslint-plugin-import-x";
7
8
  import jsxA11y from "eslint-plugin-jsx-a11y";
@@ -234,6 +235,7 @@ var buildConfig = ({
234
235
  NodeJS: "readonly"
235
236
  });
236
237
  settings.react = { version: "detect" };
238
+ settings["import-x/resolver-next"] = [createTypeScriptImportResolver({ alwaysTryTypes: true })];
237
239
  }
238
240
  const rootConfigOverride = {
239
241
  files: ["*.{mjs,js,ts,mts,cts}"],
package/package.json CHANGED
@@ -1,9 +1,23 @@
1
1
  {
2
2
  "name": "@soujvnunes/eslint-config",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Shared flat ESLint config factories (base + Next.js).",
5
5
  "license": "MIT",
6
6
  "author": "soujvnunes",
7
+ "keywords": [
8
+ "eslint",
9
+ "eslint-config",
10
+ "eslintconfig",
11
+ "flat-config",
12
+ "typescript",
13
+ "typescript-eslint",
14
+ "nextjs",
15
+ "react",
16
+ "import-order",
17
+ "prettier"
18
+ ],
19
+ "homepage": "https://github.com/soujvnunes/packages/tree/main/eslint-config#readme",
20
+ "bugs": "https://github.com/soujvnunes/packages/issues",
7
21
  "repository": {
8
22
  "type": "git",
9
23
  "url": "git+https://github.com/soujvnunes/packages.git",
@@ -25,6 +39,7 @@
25
39
  "@eslint/js": "^9.39.4",
26
40
  "@next/eslint-plugin-next": "^16.2.2",
27
41
  "eslint-config-prettier": "^10.1.8",
42
+ "eslint-import-resolver-typescript": "^4.4.5",
28
43
  "eslint-plugin-import-helpers": "^2.0.1",
29
44
  "eslint-plugin-import-x": "^4.16.2",
30
45
  "eslint-plugin-jsx-a11y": "^6.10.2",