@websolutespa/eslint-config 3.0.0 → 3.0.1-next.0

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 (3) hide show
  1. package/CHANGELOG.md +55 -49
  2. package/base.js +22 -0
  3. package/package.json +41 -41
package/CHANGELOG.md CHANGED
@@ -1,49 +1,55 @@
1
- # @websolutespa/eslint-config
2
-
3
- ## 3.0.0
4
-
5
- ### Major Changes
6
-
7
- - Release: Bom 3.0
8
-
9
- ## 0.1.2
10
-
11
- ### Patch Changes
12
-
13
- - Fixing: downgrading eslint to v8.56.0
14
-
15
- ## 0.1.1
16
-
17
- ### Patch Changes
18
-
19
- - Updating: dependencies
20
-
21
- ## 0.1.0
22
-
23
- ### Minor Changes
24
-
25
- - Updating: next 13.
26
-
27
- ## 0.0.5
28
-
29
- ### Patch Changes
30
-
31
- - Added: mdx files.
32
-
33
- ## 0.0.4
34
-
35
- ### Patch Changes
36
-
37
- - Added: mdx support.
38
-
39
- ## 0.0.3
40
-
41
- ### Patch Changes
42
-
43
- - Added: no-unreachable error.
44
-
45
- ## 0.0.2
46
-
47
- ### Patch Changes
48
-
49
- - Added: first release.
1
+ # @websolutespa/eslint-config
2
+
3
+ ## 3.0.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Add a `no-restricted-imports` rule for `next/headers` outside `src/app` and route handlers.
8
+
9
+ ## 3.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - Release: Bom 3.0
14
+
15
+ ## 0.1.2
16
+
17
+ ### Patch Changes
18
+
19
+ - Fixing: downgrading eslint to v8.56.0
20
+
21
+ ## 0.1.1
22
+
23
+ ### Patch Changes
24
+
25
+ - Updating: dependencies
26
+
27
+ ## 0.1.0
28
+
29
+ ### Minor Changes
30
+
31
+ - Updating: next 13.
32
+
33
+ ## 0.0.5
34
+
35
+ ### Patch Changes
36
+
37
+ - Added: mdx files.
38
+
39
+ ## 0.0.4
40
+
41
+ ### Patch Changes
42
+
43
+ - Added: mdx support.
44
+
45
+ ## 0.0.3
46
+
47
+ ### Patch Changes
48
+
49
+ - Added: no-unreachable error.
50
+
51
+ ## 0.0.2
52
+
53
+ ### Patch Changes
54
+
55
+ - Added: first release.
package/base.js CHANGED
@@ -35,6 +35,28 @@ export const base = [
35
35
  onlyWarn,
36
36
  },
37
37
  },
38
+ {
39
+ // Helpers must not read request data: only the template (page, layout,
40
+ // route handler) reads headers()/cookies()/draftMode() and passes it down.
41
+ rules: {
42
+ 'no-restricted-imports': ['warn', {
43
+ paths: [{
44
+ name: 'next/headers',
45
+ message: 'Read request data (headers, cookies, draftMode) in the template under src/app and pass it down as an argument.',
46
+ }],
47
+ }],
48
+ },
49
+ },
50
+ {
51
+ files: [
52
+ 'src/app/**',
53
+ '**/handlers/**',
54
+ '**/*.test.{ts,tsx}',
55
+ ],
56
+ rules: {
57
+ 'no-restricted-imports': 'off',
58
+ },
59
+ },
38
60
  {
39
61
  ignores: [
40
62
  '.next/**',
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@websolutespa/eslint-config",
3
- "version": "3.0.0",
4
- "description": "Eslint shared config of the BOM Repository",
5
- "keywords": [
6
- "bom",
7
- "eslint",
8
- "config",
9
- "websolute"
10
- ],
11
- "license": "MIT",
12
- "repository": {
13
- "type": "git",
14
- "url": "git://github.com/websolutespa/bom.git"
15
- },
16
- "type": "module",
17
- "dependencies": {
18
- "@eslint/js": "9.31.0",
19
- "@next/eslint-plugin-next": "16.1.6",
20
- "@stylistic/eslint-plugin": "5.2.3",
21
- "eslint": "9.31.0",
22
- "eslint-config-prettier": "10.1.1",
23
- "eslint-plugin-only-warn": "1.1.0",
24
- "eslint-plugin-react": "7.37.5",
25
- "eslint-plugin-react-hooks": "5.2.0",
26
- "eslint-plugin-turbo": "2.5.0",
27
- "globals": "16.3.0",
28
- "typescript-eslint": "8.36.0"
29
- },
30
- "devDependencies": {
31
- "typescript": "5.8.3"
32
- },
33
- "main": "./base.js",
34
- "exports": {
35
- ".": "./base.js",
36
- "./base": "./base.js",
37
- "./next": "./next.js",
38
- "./plugin": "./plugin.js",
39
- "./react": "./react.js"
40
- }
41
- }
1
+ {
2
+ "name": "@websolutespa/eslint-config",
3
+ "version": "3.0.1-next.0",
4
+ "description": "Eslint shared config of the BOM Repository",
5
+ "keywords": [
6
+ "bom",
7
+ "eslint",
8
+ "config",
9
+ "websolute"
10
+ ],
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git://github.com/websolutespa/bom.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@eslint/js": "9.31.0",
19
+ "@next/eslint-plugin-next": "16.1.6",
20
+ "@stylistic/eslint-plugin": "5.2.3",
21
+ "eslint": "9.31.0",
22
+ "eslint-config-prettier": "10.1.1",
23
+ "eslint-plugin-only-warn": "1.1.0",
24
+ "eslint-plugin-react": "7.37.5",
25
+ "eslint-plugin-react-hooks": "5.2.0",
26
+ "eslint-plugin-turbo": "2.5.0",
27
+ "globals": "16.3.0",
28
+ "typescript-eslint": "8.36.0"
29
+ },
30
+ "devDependencies": {
31
+ "typescript": "5.8.3"
32
+ },
33
+ "main": "./base.js",
34
+ "exports": {
35
+ ".": "./base.js",
36
+ "./base": "./base.js",
37
+ "./next": "./next.js",
38
+ "./plugin": "./plugin.js",
39
+ "./react": "./react.js"
40
+ }
41
+ }