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