@nighttrax/eslint-config-tsx 12.0.0-beta.1 → 12.0.0-beta.2
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/CHANGELOG.md +10 -0
- package/README.md +2 -3
- package/package.json +5 -6
- package/react.mjs +42 -36
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [12.0.0-beta.2](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-tsx@12.0.0-beta.1...@nighttrax/eslint-config-tsx@12.0.0-beta.2) (2025-07-10)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **react:** Fix imports ([7afa29d](https://github.com/NiGhTTraX/eslint-config/commit/7afa29d6c9cb1be3b6b34f081c3171aae481238e))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **ts,tsx:** Export config helpers ([ae77cda](https://github.com/NiGhTTraX/eslint-config/commit/ae77cdacf76e80427b0e8fcc5618622d83c0b21b))
|
|
15
|
+
|
|
6
16
|
# [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
17
|
|
|
8
18
|
### Features
|
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
|
|
20
|
-
|
|
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.
|
|
3
|
+
"version": "12.0.0-beta.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "git+https://github.com/NiGhTTraX/eslint-config.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@nighttrax/eslint-config-ts": "12.0.0-beta.1",
|
|
23
22
|
"@typescript-eslint/parser": "~8.35.1",
|
|
24
23
|
"eslint-plugin-jsx-a11y": "~6.10.2",
|
|
25
24
|
"eslint-plugin-react": "~7.37.5",
|
|
26
25
|
"eslint-plugin-react-hooks": "~5.2.0",
|
|
27
26
|
"globals": "~16.3.0",
|
|
28
|
-
"typescript-eslint": "~8.35.1"
|
|
27
|
+
"typescript-eslint": "~8.35.1",
|
|
28
|
+
"@nighttrax/eslint-config-ts": "12.0.0-beta.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"eslint": "^9.0.0"
|
|
@@ -33,6 +33,5 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"eslint": "~9.30.1",
|
|
35
35
|
"prettier": "~3.6.2"
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
36
|
+
}
|
|
37
|
+
}
|
package/react.mjs
CHANGED
|
@@ -1,47 +1,53 @@
|
|
|
1
1
|
import globals from "globals";
|
|
2
2
|
import tsEslint from "typescript-eslint";
|
|
3
3
|
import * as tsParser from "@typescript-eslint/parser";
|
|
4
|
-
import
|
|
4
|
+
import react from "eslint-plugin-react";
|
|
5
|
+
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
6
|
import * as reactHooks from "eslint-plugin-react-hooks";
|
|
6
|
-
import * as jsxA11y from "eslint-plugin-jsx-a11y";
|
|
7
7
|
import { nighttraxTS } from "@nighttrax/eslint-config-ts";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('typescript-eslint').InfiniteDepthConfigWithExtends[]} configs
|
|
11
|
+
*/
|
|
12
|
+
export const nighttraxReact = (...configs) =>
|
|
13
|
+
tsEslint.config([
|
|
14
|
+
nighttraxTS(),
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
{
|
|
17
|
+
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
|
|
18
|
+
languageOptions: { globals: globals.browser, parser: tsParser },
|
|
19
|
+
},
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
react.configs.flat.recommended,
|
|
22
|
+
react.configs.flat["jsx-runtime"],
|
|
23
|
+
reactHooks.configs["recommended-latest"],
|
|
24
|
+
jsxA11y.flatConfigs.recommended,
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
{
|
|
27
|
+
settings: {
|
|
28
|
+
react: {
|
|
29
|
+
version: "detect",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
rules: {
|
|
33
|
+
"react/display-name": "off",
|
|
34
|
+
"react/prefer-read-only-props": "off",
|
|
35
|
+
"react/function-component-definition": "off",
|
|
36
|
+
"react/no-multi-comp": "off",
|
|
37
|
+
"react/jsx-filename-extension": "off",
|
|
38
|
+
"react/jsx-max-depth": "off",
|
|
39
|
+
"react/jsx-no-bind": "off",
|
|
40
|
+
"react/require-default-props": "off",
|
|
41
|
+
"react/jsx-sort-props": "off",
|
|
42
|
+
"react/jsx-no-literals": "off", // TODO: enable for translations
|
|
43
|
+
"react/destructuring-assignment": "off",
|
|
44
|
+
"react/jsx-props-no-spreading": "off",
|
|
45
|
+
"react/jsx-handler-names": "off",
|
|
46
|
+
"react/no-unused-prop-types": "off",
|
|
47
|
+
"react/forbid-component-props": "off",
|
|
48
|
+
"react/hook-use-state": "off",
|
|
26
49
|
},
|
|
27
50
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
]);
|
|
51
|
+
|
|
52
|
+
...configs,
|
|
53
|
+
]);
|