@nighttrax/eslint-config-tsx 12.0.0-beta.1 → 12.0.0-beta.3

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
@@ -13,10 +13,9 @@ npm i @nighttrax/eslint-config-tsx
13
13
  ## Use
14
14
 
15
15
  ```js
16
- import { defineConfig } from "eslint/config";
17
16
  import { nighttraxReact } from "@nighttrax/eslint-config-tsx";
18
17
 
19
- export default defineConfig([
20
- nighttraxReact
18
+ export default nighttraxReact([
19
+ // other configs
21
20
  ]);
22
21
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nighttrax/eslint-config-tsx",
3
- "version": "12.0.0-beta.1",
3
+ "version": "12.0.0-beta.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,26 +13,27 @@
13
13
  ],
14
14
  "author": "Andrei Picus <NiGhTTraX@users.noreply.github.com>",
15
15
  "license": "MIT",
16
- "main": "react.mjs",
16
+ "main": "src/react.mjs",
17
+ "files": [
18
+ "src"
19
+ ],
17
20
  "repository": {
18
21
  "type": "git",
19
22
  "url": "git+https://github.com/NiGhTTraX/eslint-config.git"
20
23
  },
21
24
  "dependencies": {
22
- "@nighttrax/eslint-config-ts": "12.0.0-beta.1",
23
- "@typescript-eslint/parser": "~8.35.1",
24
25
  "eslint-plugin-jsx-a11y": "~6.10.2",
25
26
  "eslint-plugin-react": "~7.37.5",
26
27
  "eslint-plugin-react-hooks": "~5.2.0",
27
- "globals": "~16.3.0",
28
- "typescript-eslint": "~8.35.1"
28
+ "@nighttrax/eslint-config-ts": "12.0.0-beta.3"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "eslint": "^9.0.0"
32
32
  },
33
33
  "devDependencies": {
34
+ "@types/react": "~19.1.8",
34
35
  "eslint": "~9.30.1",
35
- "prettier": "~3.6.2"
36
- },
37
- "gitHead": "18c0dc9bd552923c4b81c8e3c572d8a58fb653ff"
38
- }
36
+ "prettier": "~3.6.2",
37
+ "react": "~19.1.0"
38
+ }
39
+ }
package/src/react.mjs ADDED
@@ -0,0 +1,44 @@
1
+ import react from "eslint-plugin-react";
2
+ import jsxA11y from "eslint-plugin-jsx-a11y";
3
+ import * as reactHooks from "eslint-plugin-react-hooks";
4
+ import { nighttraxTS } from "@nighttrax/eslint-config-ts";
5
+
6
+ /**
7
+ * @param {import('typescript-eslint').InfiniteDepthConfigWithExtends[]} configs
8
+ */
9
+ export const nighttraxReact = (...configs) =>
10
+ nighttraxTS([
11
+ react.configs.flat.recommended,
12
+ react.configs.flat["jsx-runtime"],
13
+ reactHooks.configs["recommended-latest"],
14
+ jsxA11y.flatConfigs.recommended,
15
+
16
+ {
17
+ settings: {
18
+ react: {
19
+ version: "detect",
20
+ },
21
+ },
22
+ rules: {
23
+ // This usually warns for memoized or forwardRef-ed components, which is fine.
24
+ "react/display-name": "off",
25
+ "react/function-component-definition": [
26
+ "error",
27
+ {
28
+ namedComponents: "arrow-function",
29
+ unnamedComponents: "arrow-function",
30
+ },
31
+ ],
32
+ "react/jsx-handler-names": [
33
+ "error",
34
+ {
35
+ eventHandlerPrefix: "on",
36
+ eventHandlerPropPrefix: "on",
37
+ },
38
+ ],
39
+ "react/jsx-no-leaked-render": "error",
40
+ },
41
+ },
42
+
43
+ ...configs,
44
+ ]);
package/CHANGELOG.md DELETED
@@ -1,101 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [12.0.0-beta.1](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@12.0.0-beta.0...@nighttrax/eslint-config-tsx@12.0.0-beta.1) (2025-07-06)
7
-
8
- ### Features
9
-
10
- - **react:** Add a11y rules ([bd825d0](https://github.com/NiGhTTraX/eslint-config/commit/bd825d0f0ab75caba1dff3b4d93a44b45ae7748b))
11
- - **react:** Don't enable stylistic React rules ([4a1d5e1](https://github.com/NiGhTTraX/eslint-config/commit/4a1d5e1a17a70e8cc2f9aa7bb74fbb19eff76b59))
12
-
13
- # [12.0.0-beta.0](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@12.0.0-alpha.3...@nighttrax/eslint-config-tsx@12.0.0-beta.0) (2025-07-04)
14
-
15
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
16
-
17
- # [12.0.0-alpha.3](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@12.0.0-alpha.2...@nighttrax/eslint-config-tsx@12.0.0-alpha.3) (2023-04-17)
18
-
19
- ### Bug Fixes
20
-
21
- - **deps:** update typescript-eslint monorepo to ~5.57.0 ([339bfcb](https://github.com/NiGhTTraX/eslint-config/commit/339bfcb1e325f4d3ce1dc4c614d6518d48113c18))
22
-
23
- # [12.0.0-alpha.2](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@12.0.0-alpha.1...@nighttrax/eslint-config-tsx@12.0.0-alpha.2) (2023-03-20)
24
-
25
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
26
-
27
- # [12.0.0-alpha.1](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@12.0.0-alpha.0...@nighttrax/eslint-config-tsx@12.0.0-alpha.1) (2023-03-20)
28
-
29
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
30
-
31
- # [10.0.0](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@10.0.0-beta.2...@nighttrax/eslint-config-tsx@10.0.0) (2022-08-25)
32
-
33
- ### Bug Fixes
34
-
35
- - **deps:** update dependency eslint-import-resolver-typescript to ~2.7.0 ([aa68548](https://github.com/NiGhTTraX/eslint-config/commit/aa68548080ce73b548e72500924d0043cdc74ac4))
36
- - **deps:** update dependency eslint-import-resolver-typescript to ~3.2.0 ([1b7f887](https://github.com/NiGhTTraX/eslint-config/commit/1b7f8874a5f7db3c4d391535397ba157f112d307))
37
- - **deps:** update dependency eslint-import-resolver-typescript to ~3.3.0 ([948363f](https://github.com/NiGhTTraX/eslint-config/commit/948363f2365dfaa209da18aa0b86ce3076da9579))
38
- - **deps:** update dependency eslint-import-resolver-typescript to ~3.4.0 ([a45981a](https://github.com/NiGhTTraX/eslint-config/commit/a45981a6148644ffd82f7c1f741b611fc02d2200))
39
- - **deps:** update dependency eslint-import-resolver-typescript to ~3.5.0 ([fd9b586](https://github.com/NiGhTTraX/eslint-config/commit/fd9b58690eeb9bf5124e3cb0af3d3aebb391fb5d))
40
- - **deps:** update dependency eslint-import-resolver-typescript to v3 ([8cc5d9d](https://github.com/NiGhTTraX/eslint-config/commit/8cc5d9da548f22a2f25815a2ccf3cbec5d068129))
41
- - **deps:** update dependency eslint-plugin-import to ~2.26.0 ([34d1654](https://github.com/NiGhTTraX/eslint-config/commit/34d16541be02de0367f190ed2ccedcc8c2d5799c))
42
- - **deps:** update dependency eslint-plugin-jsx-a11y to ~6.6.0 ([62597e2](https://github.com/NiGhTTraX/eslint-config/commit/62597e2ba8a23f7b02795c47b5c23955770a0ecf))
43
- - **deps:** update dependency eslint-plugin-prettier to ~4.1.0 ([1641c19](https://github.com/NiGhTTraX/eslint-config/commit/1641c19471618e5c775c53c9f5d3393320d754bc))
44
- - **deps:** update dependency eslint-plugin-prettier to ~4.2.0 ([371b98f](https://github.com/NiGhTTraX/eslint-config/commit/371b98fbb445f693984614807084c06f6f15dcc0))
45
- - **deps:** update dependency eslint-plugin-react to ~7.29.0 ([748a74c](https://github.com/NiGhTTraX/eslint-config/commit/748a74cf6b04dc02fd823cee50e1a1fa0d76e9f3))
46
- - **deps:** update dependency eslint-plugin-react to ~7.30.0 ([de82c5f](https://github.com/NiGhTTraX/eslint-config/commit/de82c5fde798bd2e33adaf02aca39fe7e4ac4507))
47
- - **deps:** update dependency eslint-plugin-react to ~7.31.0 ([c29b065](https://github.com/NiGhTTraX/eslint-config/commit/c29b0658d3f3a118e8fcc27a2af44c8fe429c24a))
48
- - **deps:** update dependency eslint-plugin-react-hooks to ~4.4.0 ([7850328](https://github.com/NiGhTTraX/eslint-config/commit/7850328d5b69f1abf63304b5319e2765523a7fbb))
49
- - **deps:** update dependency eslint-plugin-react-hooks to ~4.5.0 ([884bf63](https://github.com/NiGhTTraX/eslint-config/commit/884bf63de0f32704468b63995f129c15f842925e))
50
- - **deps:** update dependency eslint-plugin-react-hooks to ~4.6.0 ([7e8637b](https://github.com/NiGhTTraX/eslint-config/commit/7e8637be31e8ed40f527f7b83991fc5cdfa75210))
51
- - **deps:** update dependency prettier to ~2.6.0 ([66702f3](https://github.com/NiGhTTraX/eslint-config/commit/66702f3d5a0285b4d511ccd8e0983a1584e9b161))
52
- - **deps:** update dependency prettier to ~2.7.0 ([dd152e0](https://github.com/NiGhTTraX/eslint-config/commit/dd152e093f072b99bff914b2b3066a7eba5119f1))
53
- - **deps:** update typescript-eslint monorepo to ~5.10.0 ([6bea838](https://github.com/NiGhTTraX/eslint-config/commit/6bea838ed1e094aed6b5a060b4e8b50ef6f154bb))
54
- - **deps:** update typescript-eslint monorepo to ~5.11.0 ([e39b801](https://github.com/NiGhTTraX/eslint-config/commit/e39b80183fb6b3f34ffbff628e4ef4b93bfb4351))
55
- - **deps:** update typescript-eslint monorepo to ~5.12.0 ([420d4fc](https://github.com/NiGhTTraX/eslint-config/commit/420d4fcfcb156ff243ec673717f5fdc6b80d19ea))
56
- - **deps:** update typescript-eslint monorepo to ~5.13.0 ([fd2881b](https://github.com/NiGhTTraX/eslint-config/commit/fd2881b8e089d823146d65583596869a02fa0d0f))
57
- - **deps:** update typescript-eslint monorepo to ~5.14.0 ([93e1041](https://github.com/NiGhTTraX/eslint-config/commit/93e1041c93ad47430811970c0a841c6dfe042e44))
58
- - **deps:** update typescript-eslint monorepo to ~5.15.0 ([fe2fa10](https://github.com/NiGhTTraX/eslint-config/commit/fe2fa1014597010222b26ee71fe7ec853bdf9503))
59
- - **deps:** update typescript-eslint monorepo to ~5.16.0 ([f4c9cf4](https://github.com/NiGhTTraX/eslint-config/commit/f4c9cf4ad284dbd71b67ec663e945b5c9d2691c7))
60
- - **deps:** update typescript-eslint monorepo to ~5.17.0 ([1c8fa70](https://github.com/NiGhTTraX/eslint-config/commit/1c8fa705640ac5166abe7db1e3c01ae079966f19))
61
- - **deps:** update typescript-eslint monorepo to ~5.18.0 ([4a1f2a1](https://github.com/NiGhTTraX/eslint-config/commit/4a1f2a1ef0a57c181018b9ed8954d1a1e4fe109c))
62
- - **deps:** update typescript-eslint monorepo to ~5.19.0 ([ca55f11](https://github.com/NiGhTTraX/eslint-config/commit/ca55f118cb1ac809b136e06ad986a88469cbecd0))
63
- - **deps:** update typescript-eslint monorepo to ~5.20.0 ([d400a4c](https://github.com/NiGhTTraX/eslint-config/commit/d400a4caf65ddd4790e546f99fa0b58946960bdb))
64
- - **deps:** update typescript-eslint monorepo to ~5.21.0 ([b9a21c7](https://github.com/NiGhTTraX/eslint-config/commit/b9a21c7dc3478bf2501a3c623eea65ec1235be8d))
65
- - **deps:** update typescript-eslint monorepo to ~5.22.0 ([a4a245a](https://github.com/NiGhTTraX/eslint-config/commit/a4a245a30fc4ce94e7338175e686dee12b21fc04))
66
- - **deps:** update typescript-eslint monorepo to ~5.25.0 ([d6853bd](https://github.com/NiGhTTraX/eslint-config/commit/d6853bdc38267461b8815023601a8c31bd2f4e8e))
67
- - **deps:** update typescript-eslint monorepo to ~5.26.0 ([2b350f3](https://github.com/NiGhTTraX/eslint-config/commit/2b350f36b178ad5473d6239f58b907f159cf84d5))
68
- - **deps:** update typescript-eslint monorepo to ~5.27.0 ([09201f9](https://github.com/NiGhTTraX/eslint-config/commit/09201f993430c314fd8435ffd8b16205e52f7eeb))
69
- - **deps:** update typescript-eslint monorepo to ~5.28.0 ([546d2c4](https://github.com/NiGhTTraX/eslint-config/commit/546d2c420feece937ad57e50402d652883317cdd))
70
- - **deps:** update typescript-eslint monorepo to ~5.29.0 ([4e504a7](https://github.com/NiGhTTraX/eslint-config/commit/4e504a71e60f03ba9109509286ced399f9efafe9))
71
- - **deps:** update typescript-eslint monorepo to ~5.30.0 ([18e9958](https://github.com/NiGhTTraX/eslint-config/commit/18e9958b89d70c392c8655781bd10ab9381c904d))
72
- - **deps:** update typescript-eslint monorepo to ~5.31.0 ([867b97a](https://github.com/NiGhTTraX/eslint-config/commit/867b97a8b7db0a7c9afe6c380b4a29ba7d769ecc))
73
- - **deps:** update typescript-eslint monorepo to ~5.32.0 ([b86e191](https://github.com/NiGhTTraX/eslint-config/commit/b86e191c4c6937182cafdff95a6bc7de5c9583bc))
74
- - **deps:** update typescript-eslint monorepo to ~5.33.0 ([fc5ce21](https://github.com/NiGhTTraX/eslint-config/commit/fc5ce21da0fda498ee4707e80ec28f7dd750959f))
75
- - **deps:** update typescript-eslint monorepo to ~5.34.0 ([6d2ffdd](https://github.com/NiGhTTraX/eslint-config/commit/6d2ffdd9240c0a3bc881aa3c8772106a8238f0f6))
76
- - **deps:** update typescript-eslint monorepo to ~5.35.0 ([7d6d91f](https://github.com/NiGhTTraX/eslint-config/commit/7d6d91f66713cd79aee142c1df53c2a479e7890e))
77
- - **deps:** update typescript-eslint monorepo to ~5.9.0 ([3ff65f2](https://github.com/NiGhTTraX/eslint-config/commit/3ff65f285351f0b6ae33fd9e481fb7d1a339ed14))
78
-
79
- ## [8.0.5](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@8.0.4...@nighttrax/eslint-config-tsx@8.0.5) (2021-02-21)
80
-
81
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
82
-
83
- ## [8.0.4](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@8.0.3...@nighttrax/eslint-config-tsx@8.0.4) (2021-01-27)
84
-
85
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
86
-
87
- ## [8.0.3](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@8.0.2...@nighttrax/eslint-config-tsx@8.0.3) (2021-01-24)
88
-
89
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
90
-
91
- ## [8.0.2](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@8.0.1...@nighttrax/eslint-config-tsx@8.0.2) (2021-01-11)
92
-
93
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
94
-
95
- ## [8.0.1](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@8.0.0...@nighttrax/eslint-config-tsx@8.0.1) (2021-01-08)
96
-
97
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
98
-
99
- # [8.0.0](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@8.0.0-alpha.0...@nighttrax/eslint-config-tsx@8.0.0) (2021-01-07)
100
-
101
- **Note:** Version bump only for package @nighttrax/eslint-config-tsx
package/react.mjs DELETED
@@ -1,47 +0,0 @@
1
- import globals from "globals";
2
- import tsEslint from "typescript-eslint";
3
- import * as tsParser from "@typescript-eslint/parser";
4
- import * as react from "eslint-plugin-react";
5
- import * as reactHooks from "eslint-plugin-react-hooks";
6
- import * as jsxA11y from "eslint-plugin-jsx-a11y";
7
- import { nighttraxTS } from "@nighttrax/eslint-config-ts";
8
-
9
- export const nighttraxReact = tsEslint.config([
10
- nighttraxTS,
11
-
12
- {
13
- files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
14
- languageOptions: { globals: globals.browser, parser: tsParser },
15
- },
16
-
17
- react.configs.flat.recommended,
18
- react.configs.flat["jsx-runtime"],
19
- reactHooks.configs["recommended-latest"],
20
- jsxA11y.flatConfigs.recommended,
21
-
22
- {
23
- settings: {
24
- react: {
25
- version: "detect",
26
- },
27
- },
28
- rules: {
29
- "react/display-name": "off",
30
- "react/prefer-read-only-props": "off",
31
- "react/function-component-definition": "off",
32
- "react/no-multi-comp": "off",
33
- "react/jsx-filename-extension": "off",
34
- "react/jsx-max-depth": "off",
35
- "react/jsx-no-bind": "off",
36
- "react/require-default-props": "off",
37
- "react/jsx-sort-props": "off",
38
- "react/jsx-no-literals": "off", // TODO: enable for translations
39
- "react/destructuring-assignment": "off",
40
- "react/jsx-props-no-spreading": "off",
41
- "react/jsx-handler-names": "off",
42
- "react/no-unused-prop-types": "off",
43
- "react/forbid-component-props": "off",
44
- "react/hook-use-state": "off",
45
- },
46
- },
47
- ]);