@jsenv/eslint-config-relax 1.4.6 → 1.4.11

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/package.json +5 -5
  2. package/readme.md +64 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/eslint-config-relax",
3
- "version": "1.4.6",
3
+ "version": "1.4.11",
4
4
  "description": "A pleaseant ESLint configuration for any project",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -30,13 +30,13 @@
30
30
  ],
31
31
  "scripts": {},
32
32
  "dependencies": {
33
- "@babel/eslint-parser": "7.26.10",
33
+ "@babel/eslint-parser": "7.27.0",
34
34
  "globals": "16.0.0",
35
35
  "@jsenv/eslint-import-resolver": "8.3.0",
36
- "@jsenv/urls": "2.7.1",
37
- "eslint-plugin-import-x": "4.6.1",
36
+ "@jsenv/urls": "2.7.3",
37
+ "eslint-plugin-import-x": "4.10.2",
38
38
  "eslint-plugin-html": "8.1.2",
39
- "eslint-plugin-react": "7.37.4",
39
+ "eslint-plugin-react": "7.37.5",
40
40
  "eslint-plugin-regexp": "2.7.0"
41
41
  },
42
42
  "devDependencies": {}
package/readme.md CHANGED
@@ -2,35 +2,85 @@
2
2
 
3
3
  [![npm package](https://img.shields.io/npm/v/@jsenv/eslint-config-relax.svg?logo=npm&label=package)](https://www.npmjs.com/package/@jsenv/eslint-config-relax)
4
4
 
5
- Two things:
5
+ A pragmatic ESLint configuration that focuses on meaningful errors while giving you freedom to write code your way.
6
6
 
7
- 1. ESLint should bother me only for important things
8
- 2. Share ESLint configuration for different types of project
7
+ ## Why Choose eslint-config-relax?
9
8
 
10
- ## Usage
9
+ If you're tired of:
10
+
11
+ - Fighting with ESLint configuration
12
+ - Being forced to code in a specific style
13
+ - Module resolution errors in ESLint
14
+ - Noisy linting that focuses on trivial issues
15
+
16
+ eslint-config-relax lets you focus on writing code while still catching potential bugs and serious issues.
17
+
18
+ ## Quick setup
11
19
 
12
20
  ```console
13
21
  npm i --save-dev @jsenv/eslint-config-relax
14
22
  ```
15
23
 
16
- **eslint.config.js**
24
+ Create an `eslint.config.js` file at your project root:
17
25
 
18
26
  ```js
19
27
  import { eslintConfigRelax } from "@jsenv/eslint-config-relax";
20
28
 
21
29
  export default eslintConfigRelax({
22
- rootDirectoryUrl: new URL("./", import.meta.url),
23
- browserDirectoryUrl: new URL("./src/", import.meta.url), // optional
30
+ rootDirectoryUrl: import.meta.resolve("./"),
31
+ browserDirectoryUrl: import.meta.resolve("./src/"), // optional
24
32
  });
25
33
  ```
26
34
 
27
- ## Best parts
35
+ ## Key Features
36
+
37
+ ### Focus on Real Issues
38
+
39
+ We disable rules that are:
40
+
41
+ - Purely stylistic
42
+ - Too opinionated
43
+ - More annoying than helpful
44
+
45
+ So you only see warnings that actually matter for code quality.
46
+
47
+ ### Working Import Resolution
48
+
49
+ Full implementation of Node.js ESM resolution algorithm means:
50
+
51
+ - No more "Unable to resolve path to module" errors for valid imports
52
+ - Correct browser vs Node.js environment detection
53
+ - Proper handling of package exports
28
54
 
29
- - No need to configure ESLint; it is hard to do correctly
30
- - Freedom in the code; rules coercing you to code in a certain way are disabled
31
- - Import resolution works; The whole node esm resolution algorith is implemented
55
+ ### Modern & Simple
32
56
 
33
- ## To know
57
+ - Uses ESLint's flat config system
58
+ - No complex plugin chains or configuration inheritance
59
+ - Works across various project types with minimal setup
60
+
61
+ ### Environment Aware
62
+
63
+ Automatically adjusts rules based on your code's environment:
64
+
65
+ - Browser-specific checks for browser code
66
+ - Node.js-specific checks for server code
67
+
68
+ ## Technical Notes
69
+
70
+ - Requires ESLint 8.0 or higher (uses flat config)
71
+ - TypeScript support planned for future releases
72
+ - Works with any project structure
73
+
74
+ ## Example project structure
75
+
76
+ ```
77
+ your-project/
78
+ ├── eslint.config.js
79
+ ├── package.json
80
+ ├── src/ // Browser code
81
+ │ └── browser-specific-code.js
82
+ └── server/ // Node.js code
83
+ └── node-specific-code.js
84
+ ```
34
85
 
35
- - No support for TypeScript (it's planned)
36
- - Not compatible with ESLint < 8
86
+ Migrate from traditional ESLint and enjoy writing code that's checked for what matters, not how it looks.