@nighttrax/eslint-config-ts 12.0.0-beta.2 → 12.0.0-beta.4
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 +21 -0
- package/package.json +2 -1
- package/typescript.mjs +21 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
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.4](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-ts@12.0.0-beta.3...@nighttrax/eslint-config-ts@12.0.0-beta.4) (2025-07-15)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **ts:** Turn off no-undef after removing globals ([7243a76](https://github.com/NiGhTTraX/eslint-config/commit/7243a7643de08961b0a9c9c0598d128f45b8cc6d))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **ts:** Handle dev deps for stories ([d8ed0e3](https://github.com/NiGhTTraX/eslint-config/commit/d8ed0e31009e12ee50223922671710c24ab5696f))
|
|
15
|
+
|
|
16
|
+
# [12.0.0-beta.3](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-ts@12.0.0-beta.2...@nighttrax/eslint-config-ts@12.0.0-beta.3) (2025-07-15)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **ts:** Report errors from incorrect default imports ([238a87a](https://github.com/NiGhTTraX/eslint-config/commit/238a87a7b340f8bcae45aac01ecaf59d234b64e8))
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- **ts,tsx:** Add a default ignore list ([ec4f3a8](https://github.com/NiGhTTraX/eslint-config/commit/ec4f3a89047d3a23c4f19248799e4c0625517c1b))
|
|
25
|
+
- **ts:** Report unused `eslint-disable` directives ([e58fe64](https://github.com/NiGhTTraX/eslint-config/commit/e58fe6489343520812e698c58121bf788b7a6fe1))
|
|
26
|
+
|
|
6
27
|
# [12.0.0-beta.2](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-ts@12.0.0-beta.1...@nighttrax/eslint-config-ts@12.0.0-beta.2) (2025-07-10)
|
|
7
28
|
|
|
8
29
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nighttrax/eslint-config-ts",
|
|
3
|
-
"version": "12.0.0-beta.
|
|
3
|
+
"version": "12.0.0-beta.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@eslint/js": "~9.30.1",
|
|
22
|
+
"@stylistic/eslint-plugin": "~5.1.0",
|
|
22
23
|
"@typescript-eslint/parser": "~8.35.1",
|
|
23
24
|
"eslint-config-prettier": "~10.1.5",
|
|
24
25
|
"eslint-import-resolver-typescript": "~4.4.4",
|
package/typescript.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import pluginJs from "@eslint/js";
|
|
2
|
-
import tsEslint from "typescript-eslint";
|
|
2
|
+
import * as tsEslint from "typescript-eslint";
|
|
3
3
|
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
|
4
4
|
import * as pluginImportX from "eslint-plugin-import-x";
|
|
5
5
|
import * as tsParser from "@typescript-eslint/parser";
|
|
6
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
6
7
|
|
|
7
8
|
const EXTENSIONS = "{js,mjs,cjs,ts,cts,mts,jsx,tsx}";
|
|
8
9
|
|
|
@@ -11,11 +12,23 @@ const EXTENSIONS = "{js,mjs,cjs,ts,cts,mts,jsx,tsx}";
|
|
|
11
12
|
*/
|
|
12
13
|
export const nighttraxTS = (...configs) =>
|
|
13
14
|
tsEslint.config([
|
|
15
|
+
{
|
|
16
|
+
linterOptions: {
|
|
17
|
+
reportUnusedDisableDirectives: "error",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{ ignores: ["**/dist/"] },
|
|
14
21
|
{
|
|
15
22
|
files: [`**/*.${EXTENSIONS}`],
|
|
16
23
|
languageOptions: { parser: tsParser },
|
|
17
24
|
},
|
|
18
25
|
|
|
26
|
+
{
|
|
27
|
+
plugins: {
|
|
28
|
+
"@stylistic": stylistic,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
|
|
19
32
|
pluginJs.configs.recommended,
|
|
20
33
|
tsEslint.configs.recommended,
|
|
21
34
|
eslintPluginPrettierRecommended,
|
|
@@ -27,7 +40,7 @@ export const nighttraxTS = (...configs) =>
|
|
|
27
40
|
"arrow-body-style": ["error", "as-needed"],
|
|
28
41
|
"object-shorthand": "error",
|
|
29
42
|
curly: ["error", "all"],
|
|
30
|
-
"padding-line-between-statements": [
|
|
43
|
+
"@stylistic/padding-line-between-statements": [
|
|
31
44
|
"error",
|
|
32
45
|
{ blankLine: "always", prev: "*", next: "return" },
|
|
33
46
|
{ blankLine: "always", prev: "*", next: "block-like" },
|
|
@@ -42,9 +55,6 @@ export const nighttraxTS = (...configs) =>
|
|
|
42
55
|
|
|
43
56
|
{
|
|
44
57
|
rules: {
|
|
45
|
-
// TypeScript should report incorrect imports.
|
|
46
|
-
"import-x/no-named-as-default-member": "off",
|
|
47
|
-
"import-x/namespace": "off",
|
|
48
58
|
"import-x/no-extraneous-dependencies": [
|
|
49
59
|
"error",
|
|
50
60
|
{
|
|
@@ -57,7 +67,8 @@ export const nighttraxTS = (...configs) =>
|
|
|
57
67
|
`**/.storybook/preview.${EXTENSIONS}`,
|
|
58
68
|
`**/eslint.config.${EXTENSIONS}`,
|
|
59
69
|
`**/*.{spec,test}.${EXTENSIONS}`,
|
|
60
|
-
"**/tests
|
|
70
|
+
"**/tests/**/*",
|
|
71
|
+
"**/stories.tsx",
|
|
61
72
|
],
|
|
62
73
|
},
|
|
63
74
|
],
|
|
@@ -66,7 +77,10 @@ export const nighttraxTS = (...configs) =>
|
|
|
66
77
|
|
|
67
78
|
{
|
|
68
79
|
rules: {
|
|
69
|
-
|
|
80
|
+
// This is already turned off for TS files,
|
|
81
|
+
// but leaving it on for JS requires globals, e.g., module.exports,
|
|
82
|
+
// which is not worth the effort.
|
|
83
|
+
"no-undef": "off",
|
|
70
84
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
71
85
|
"@typescript-eslint/no-unused-vars": [
|
|
72
86
|
"error",
|