@nighttrax/eslint-config-ts 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 +13 -0
- package/README.md +2 -3
- package/package.json +3 -4
- package/typescript.mjs +68 -60
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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-ts@12.0.0-beta.1...@nighttrax/eslint-config-ts@12.0.0-beta.2) (2025-07-10)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **ts,tsx:** Export config helpers ([ae77cda](https://github.com/NiGhTTraX/eslint-config/commit/ae77cdacf76e80427b0e8fcc5618622d83c0b21b))
|
|
11
|
+
- **ts:** Include more ts extensions ([6191739](https://github.com/NiGhTTraX/eslint-config/commit/6191739d5bfaf727d0e56858c5636b4f5fbe61a9))
|
|
12
|
+
|
|
13
|
+
# [12.0.0-beta.1](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-ts@12.0.0-beta.0...@nighttrax/eslint-config-ts@12.0.0-beta.1) (2025-07-06)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- **ts:** Add more globs for dev deps ([2e6e9e7](https://github.com/NiGhTTraX/eslint-config/commit/2e6e9e7044c81a16da1f2e248d0e8933963fa8f4))
|
|
18
|
+
|
|
6
19
|
# [12.0.0-beta.0](https://github.com/NiGhTTraX/eslint-config/compare/@nighttrax/eslint-config-ts@12.0.0-alpha.3...@nighttrax/eslint-config-ts@12.0.0-beta.0) (2025-07-04)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @nighttrax/eslint-config-ts
|
package/README.md
CHANGED
|
@@ -13,10 +13,9 @@ npm i @nighttrax/eslint-config-ts
|
|
|
13
13
|
## Use
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
import { defineConfig } from "eslint/config";
|
|
17
16
|
import { nighttraxTS } from "@nighttrax/eslint-config-ts";
|
|
18
17
|
|
|
19
|
-
export default
|
|
20
|
-
|
|
18
|
+
export default nighttraxTS([
|
|
19
|
+
// other configs
|
|
21
20
|
]);
|
|
22
21
|
```
|
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.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -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/typescript.mjs
CHANGED
|
@@ -3,72 +3,80 @@ import 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 { defineConfig } from "eslint/config";
|
|
7
6
|
|
|
8
|
-
const EXTENSIONS = "{js,mjs,cjs,ts,jsx,tsx}";
|
|
7
|
+
const EXTENSIONS = "{js,mjs,cjs,ts,cts,mts,jsx,tsx}";
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('typescript-eslint').InfiniteDepthConfigWithExtends[]} configs
|
|
11
|
+
*/
|
|
12
|
+
export const nighttraxTS = (...configs) =>
|
|
13
|
+
tsEslint.config([
|
|
14
|
+
{
|
|
15
|
+
files: [`**/*.${EXTENSIONS}`],
|
|
16
|
+
languageOptions: { parser: tsParser },
|
|
17
|
+
},
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
pluginJs.configs.recommended,
|
|
20
|
+
tsEslint.configs.recommended,
|
|
21
|
+
eslintPluginPrettierRecommended,
|
|
22
|
+
pluginImportX.flatConfigs.recommended,
|
|
23
|
+
pluginImportX.flatConfigs.typescript,
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
{
|
|
26
|
+
rules: {
|
|
27
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
28
|
+
"object-shorthand": "error",
|
|
29
|
+
curly: ["error", "all"],
|
|
30
|
+
"padding-line-between-statements": [
|
|
31
|
+
"error",
|
|
32
|
+
{ blankLine: "always", prev: "*", next: "return" },
|
|
33
|
+
{ blankLine: "always", prev: "*", next: "block-like" },
|
|
34
|
+
{ blankLine: "always", prev: "*", next: "if" },
|
|
35
|
+
{ blankLine: "always", prev: "*", next: "export" },
|
|
36
|
+
{ blankLine: "always", prev: "*", next: "const" },
|
|
37
|
+
{ blankLine: "any", prev: "const", next: "const" },
|
|
38
|
+
{ blankLine: "never", prev: "import", next: "import" },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
37
41
|
},
|
|
38
|
-
},
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
{
|
|
44
|
+
rules: {
|
|
45
|
+
// TypeScript should report incorrect imports.
|
|
46
|
+
"import-x/no-named-as-default-member": "off",
|
|
47
|
+
"import-x/namespace": "off",
|
|
48
|
+
"import-x/no-extraneous-dependencies": [
|
|
49
|
+
"error",
|
|
50
|
+
{
|
|
51
|
+
devDependencies: [
|
|
52
|
+
`**/webpack.config.${EXTENSIONS}`,
|
|
53
|
+
`**/rollup.config.${EXTENSIONS}`,
|
|
54
|
+
`**/vite.config.${EXTENSIONS}`,
|
|
55
|
+
`**/vitest.config.${EXTENSIONS}`,
|
|
56
|
+
`**/.storybook/main.${EXTENSIONS}`,
|
|
57
|
+
`**/.storybook/preview.${EXTENSIONS}`,
|
|
58
|
+
`**/eslint.config.${EXTENSIONS}`,
|
|
59
|
+
`**/*.{spec,test}.${EXTENSIONS}`,
|
|
60
|
+
"**/tests/**",
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
58
65
|
},
|
|
59
|
-
},
|
|
60
66
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
{
|
|
68
|
+
rules: {
|
|
69
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
70
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
71
|
+
"@typescript-eslint/no-unused-vars": [
|
|
72
|
+
"error",
|
|
73
|
+
{
|
|
74
|
+
caughtErrors: "none",
|
|
75
|
+
ignoreRestSiblings: true,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
72
79
|
},
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
|
|
81
|
+
...configs,
|
|
82
|
+
]);
|