@vyriy/eslint-config 0.1.22 → 0.1.23

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.
Files changed (2) hide show
  1. package/README.md +43 -1
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -6,13 +6,16 @@ Shared ESLint flat config for Vyriy projects.
6
6
 
7
7
  This package provides the base ESLint setup used in Vyriy repositories for:
8
8
 
9
+ - JavaScript recommended rules
9
10
  - TypeScript
10
11
  - React
12
+ - React Hooks
11
13
  - Storybook
12
14
  - Jest
13
- - import resolution
15
+ - `import-x` import rules and TypeScript-aware resolution
14
16
  - Prettier integration
15
17
  - multiline object formatting for objects with more than three properties
18
+ - runtime file extensions for relative ESM imports
16
19
 
17
20
  ## Install
18
21
 
@@ -29,6 +32,7 @@ yarn add -D @vyriy/eslint-config eslint
29
32
  ```
30
33
 
31
34
  Install `eslint` in the consumer project so the ESLint CLI is available.
35
+ The shared config includes the ESLint plugins, resolvers, Storybook integration, and Prettier runtime it uses.
32
36
 
33
37
  ## Usage
34
38
 
@@ -55,6 +59,37 @@ const config: Linter.Config[] = [
55
59
  export default config;
56
60
  ```
57
61
 
62
+ The TypeScript rules use type-aware linting with `parserOptions.project` set to `./tsconfig.json`.
63
+ Consumer projects should have a root `tsconfig.json` that covers the files ESLint checks.
64
+
65
+ Generated output is ignored by default:
66
+
67
+ - `dist/**`
68
+ - `coverage/**`
69
+ - `storybook-static/**`
70
+
71
+ ## Included Rules
72
+
73
+ The config includes:
74
+
75
+ - `@eslint/js` recommended rules
76
+ - browser and Node globals
77
+ - `@typescript-eslint` recommended type-checked rules for `**/*.{ts,tsx,mts,cts}`
78
+ - `@eslint-react` recommended TypeScript rules for package, workspace, Storybook, and story files
79
+ - `eslint-plugin-react-hooks` flat recommended rules for the same React-capable files
80
+ - `eslint-plugin-jest` recommended rules and Jest globals for `**/*.test.{ts,tsx}`
81
+ - `eslint-plugin-storybook` flat recommended config entries
82
+ - `eslint-plugin-prettier` with `prettier/prettier` as a warning
83
+ - relaxed `@typescript-eslint/require-await` for `.bin` and `.storybook` TypeScript files
84
+
85
+ ## Import Resolution
86
+
87
+ The config enables `eslint-plugin-import-x` for:
88
+
89
+ - `**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}`
90
+
91
+ It uses both the TypeScript resolver and Node resolver with aliases that allow runtime `.js`, `.mjs`, and `.cjs` specifiers to resolve to matching TypeScript source files.
92
+
58
93
  ## Relative ESM Imports
59
94
 
60
95
  Relative module specifiers must include the runtime file extension. TypeScript source that compiles to ESM should import local files with `.js` specifiers:
@@ -85,3 +120,10 @@ const options = {
85
120
  fourth,
86
121
  };
87
122
  ```
123
+
124
+ ## Prettier
125
+
126
+ Formatting issues are reported by ESLint as warnings through `prettier/prettier`.
127
+ The package depends on `prettier` directly so consumers of `@vyriy/eslint-config` do not need to install Prettier only to satisfy the plugin runtime.
128
+
129
+ Projects that also run the Prettier CLI should still install or expose `prettier` in that project so commands like `prettier . --check` are available.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyriy/eslint-config",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Shared ESLint config for Vyriy projects",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -18,6 +18,7 @@
18
18
  "eslint-plugin-storybook": "^10.3.6",
19
19
  "globals": "^17.6.0",
20
20
  "jiti": "^2.7.0",
21
+ "prettier": "^3.8.3",
21
22
  "storybook": "^10.3.6"
22
23
  },
23
24
  "license": "MIT",