@nighttrax/eslint-config-tsx 12.0.0-beta.0 → 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 +17 -0
- package/README.md +2 -3
- package/package.json +6 -6
- package/react.mjs +41 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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
|
+
|
|
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)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **react:** Add a11y rules ([bd825d0](https://github.com/NiGhTTraX/eslint-config/commit/bd825d0f0ab75caba1dff3b4d93a44b45ae7748b))
|
|
21
|
+
- **react:** Don't enable stylistic React rules ([4a1d5e1](https://github.com/NiGhTTraX/eslint-config/commit/4a1d5e1a17a70e8cc2f9aa7bb74fbb19eff76b59))
|
|
22
|
+
|
|
6
23
|
# [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)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @nighttrax/eslint-config-tsx
|
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,12 +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.0",
|
|
23
22
|
"@typescript-eslint/parser": "~8.35.1",
|
|
23
|
+
"eslint-plugin-jsx-a11y": "~6.10.2",
|
|
24
24
|
"eslint-plugin-react": "~7.37.5",
|
|
25
25
|
"eslint-plugin-react-hooks": "~5.2.0",
|
|
26
26
|
"globals": "~16.3.0",
|
|
27
|
-
"typescript-eslint": "~8.35.1"
|
|
27
|
+
"typescript-eslint": "~8.35.1",
|
|
28
|
+
"@nighttrax/eslint-config-ts": "12.0.0-beta.2"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"eslint": "^9.0.0"
|
|
@@ -32,6 +33,5 @@
|
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"eslint": "~9.30.1",
|
|
34
35
|
"prettier": "~3.6.2"
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
|
36
|
+
}
|
|
37
|
+
}
|
package/react.mjs
CHANGED
|
@@ -1,51 +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
7
|
import { nighttraxTS } from "@nighttrax/eslint-config-ts";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('typescript-eslint').InfiniteDepthConfigWithExtends[]} configs
|
|
11
|
+
*/
|
|
12
|
+
export const nighttraxReact = (...configs) =>
|
|
13
|
+
tsEslint.config([
|
|
14
|
+
nighttraxTS(),
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
{
|
|
17
|
+
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
|
|
18
|
+
languageOptions: { globals: globals.browser, parser: tsParser },
|
|
19
|
+
},
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
react.configs.flat.recommended,
|
|
22
|
+
react.configs.flat["jsx-runtime"],
|
|
23
|
+
reactHooks.configs["recommended-latest"],
|
|
24
|
+
jsxA11y.flatConfigs.recommended,
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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",
|
|
23
49
|
},
|
|
24
50
|
},
|
|
25
|
-
rules: {
|
|
26
|
-
"react/react-in-jsx-scope": "off",
|
|
27
|
-
"react/display-name": "off",
|
|
28
|
-
"react/prefer-read-only-props": "off",
|
|
29
|
-
"react/function-component-definition": "off",
|
|
30
|
-
"react/no-multi-comp": "off",
|
|
31
|
-
"react/jsx-filename-extension": "off",
|
|
32
|
-
"react/jsx-max-depth": "off",
|
|
33
|
-
"react/jsx-no-bind": "off",
|
|
34
|
-
"react/require-default-props": "off",
|
|
35
|
-
"react/jsx-sort-props": "off",
|
|
36
|
-
"react/jsx-no-literals": "off", // TODO: enable for translations
|
|
37
|
-
"react/destructuring-assignment": "off",
|
|
38
|
-
"react/jsx-props-no-spreading": "off",
|
|
39
|
-
"react/jsx-handler-names": "off",
|
|
40
|
-
"react/no-unused-prop-types": "off",
|
|
41
|
-
"react/forbid-component-props": "off",
|
|
42
|
-
"react/hook-use-state": "off",
|
|
43
51
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// (https://w3c.github.io/html/sec-forms.html#autofocusing-a-form-control-the-autofocus-attribute)
|
|
47
|
-
// says that user agents should provide a way to disable autofocus behavior.
|
|
48
|
-
"jsx-a11y/no-autofocus": "off",
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
]);
|
|
52
|
+
...configs,
|
|
53
|
+
]);
|