chatnest 3.4.2 → 3.4.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.
@@ -0,0 +1,111 @@
1
+ import js from "@eslint/js";
2
+ import globals from "globals";
3
+ import prettierConfig from "eslint-config-prettier";
4
+ import tsParser from "@typescript-eslint/parser";
5
+ import tsPlugin from "@typescript-eslint/eslint-plugin";
6
+
7
+ export default [
8
+ js.configs.recommended,
9
+
10
+ // TypeScript source files
11
+ {
12
+ files: ["src/**/*.ts"],
13
+ languageOptions: {
14
+ parser: tsParser,
15
+ sourceType: "module",
16
+ globals: {
17
+ ...globals.browser,
18
+ },
19
+ },
20
+ plugins: {
21
+ "@typescript-eslint": tsPlugin,
22
+ },
23
+ rules: {
24
+ "no-unused-vars": "off",
25
+ "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
26
+ "no-console": ["warn", { allow: ["warn", "error"] }],
27
+ "prefer-const": "error",
28
+ "no-var": "error",
29
+ eqeqeq: ["error", "always"],
30
+ },
31
+ },
32
+
33
+ // JavaScript source files
34
+ {
35
+ files: ["src/**/*.js"],
36
+ languageOptions: {
37
+ sourceType: "module",
38
+ globals: {
39
+ ...globals.browser,
40
+ },
41
+ },
42
+ rules: {
43
+ "no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
44
+ "no-console": ["warn", { allow: ["warn", "error"] }],
45
+ "prefer-const": "error",
46
+ "no-var": "error",
47
+ eqeqeq: ["error", "always"],
48
+ },
49
+ },
50
+
51
+ // Config/tooling files — CommonJS
52
+ {
53
+ files: ["webpack.config.js", "jest.config.js", "babel.config.js", ".babelrc.js"],
54
+ languageOptions: {
55
+ sourceType: "commonjs",
56
+ globals: {
57
+ ...globals.node,
58
+ },
59
+ },
60
+ rules: {
61
+ "no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
62
+ "prefer-const": "error",
63
+ "no-var": "error",
64
+ },
65
+ },
66
+
67
+ // Test files
68
+ {
69
+ files: ["tests/**/*.ts", "**/*.test.ts", "**/*.spec.ts"],
70
+ languageOptions: {
71
+ parser: tsParser,
72
+ sourceType: "commonjs",
73
+ globals: {
74
+ ...globals.browser,
75
+ ...globals.node,
76
+ ...globals.jest,
77
+ },
78
+ },
79
+ plugins: {
80
+ "@typescript-eslint": tsPlugin,
81
+ },
82
+ rules: {
83
+ "no-unused-vars": "off",
84
+ "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
85
+ "no-console": "off",
86
+ },
87
+ },
88
+
89
+ // Test files (JS)
90
+ {
91
+ files: ["tests/**/*.js", "**/*.test.js", "**/*.spec.js"],
92
+ languageOptions: {
93
+ sourceType: "commonjs",
94
+ globals: {
95
+ ...globals.browser,
96
+ ...globals.node,
97
+ ...globals.jest,
98
+ },
99
+ },
100
+ rules: {
101
+ "no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
102
+ "no-console": "off",
103
+ },
104
+ },
105
+
106
+ prettierConfig,
107
+
108
+ {
109
+ ignores: ["dist/", "node_modules/", "coverage/"],
110
+ },
111
+ ];