eslint-config-claw 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Claw contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # eslint-config-claw
2
+
3
+ Shared ESLint flat config for Claw projects.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install --save-dev eslint eslint-config-claw
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ // eslint.config.js
15
+ import claw from "eslint-config-claw";
16
+
17
+ export default claw;
18
+ ```
19
+
20
+ Use the JavaScript-only preset when you do not want TypeScript rules:
21
+
22
+ ```js
23
+ import { javascript } from "eslint-config-claw";
24
+
25
+ export default javascript;
26
+ ```
@@ -0,0 +1,4 @@
1
+ declare const javascript: object[];
2
+ declare const recommended: object[];
3
+
4
+ export { recommended as default, javascript, recommended };
package/dist/index.js ADDED
@@ -0,0 +1,93 @@
1
+ // src/index.ts
2
+ import js from "@eslint/js";
3
+ import globals from "globals";
4
+ import tseslint from "typescript-eslint";
5
+ var projectFiles = ["**/*.{js,mjs,cjs,jsx,ts,tsx,mts,cts}"];
6
+ var tsFiles = ["**/*.{ts,tsx,mts,cts}"];
7
+ var clawIgnores = {
8
+ name: "claw/ignores",
9
+ ignores: [
10
+ "**/node_modules/**",
11
+ "**/dist/**",
12
+ "**/coverage/**",
13
+ "**/.next/**",
14
+ "**/.turbo/**",
15
+ "**/.cache/**"
16
+ ]
17
+ };
18
+ var sharedLanguageOptions = {
19
+ ecmaVersion: "latest",
20
+ sourceType: "module",
21
+ globals: {
22
+ ...globals.browser,
23
+ ...globals.node
24
+ }
25
+ };
26
+ var clawBaseRules = {
27
+ "array-callback-return": "error",
28
+ "default-case-last": "error",
29
+ "dot-notation": "error",
30
+ "eqeqeq": ["error", "always"],
31
+ "no-alert": "error",
32
+ "no-console": ["warn", { allow: ["warn", "error"] }],
33
+ "no-constant-binary-expression": "error",
34
+ "no-debugger": "error",
35
+ "no-duplicate-imports": "error",
36
+ "no-empty-pattern": "error",
37
+ "no-fallthrough": "error",
38
+ "no-irregular-whitespace": "error",
39
+ "no-promise-executor-return": "error",
40
+ "no-template-curly-in-string": "error",
41
+ "no-unreachable-loop": "error",
42
+ "no-unused-private-class-members": "error",
43
+ "no-useless-assignment": "error",
44
+ "object-shorthand": ["error", "always"],
45
+ "prefer-const": "error",
46
+ "prefer-template": "error",
47
+ "symbol-description": "error"
48
+ };
49
+ var clawBaseConfig = {
50
+ name: "claw/base",
51
+ files: projectFiles,
52
+ languageOptions: sharedLanguageOptions,
53
+ linterOptions: {
54
+ reportUnusedDisableDirectives: "error"
55
+ },
56
+ rules: clawBaseRules
57
+ };
58
+ var clawTypeScriptConfig = {
59
+ name: "claw/typescript",
60
+ files: tsFiles,
61
+ rules: {
62
+ "@typescript-eslint/consistent-type-imports": "error",
63
+ "@typescript-eslint/no-unused-vars": [
64
+ "error",
65
+ {
66
+ argsIgnorePattern: "^_",
67
+ caughtErrorsIgnorePattern: "^_",
68
+ destructuredArrayIgnorePattern: "^_",
69
+ varsIgnorePattern: "^_"
70
+ }
71
+ ],
72
+ "no-undef": "off",
73
+ "no-unused-vars": "off"
74
+ }
75
+ };
76
+ var javascript = [
77
+ clawIgnores,
78
+ js.configs.recommended,
79
+ clawBaseConfig
80
+ ];
81
+ var recommended = [
82
+ clawIgnores,
83
+ js.configs.recommended,
84
+ ...tseslint.configs.recommended,
85
+ clawBaseConfig,
86
+ clawTypeScriptConfig
87
+ ];
88
+ var index_default = recommended;
89
+ export {
90
+ index_default as default,
91
+ javascript,
92
+ recommended
93
+ };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "eslint-config-claw",
3
+ "version": "0.1.0",
4
+ "description": "Shared ESLint flat config for Claw projects.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/clawic/clawjs",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/clawic/clawjs.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/clawic/clawjs/issues"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "engines": {
19
+ "node": ">=20"
20
+ },
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.js"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "scripts": {
35
+ "build": "tsup src/index.ts --format esm --dts --out-dir dist --clean --target node20"
36
+ },
37
+ "dependencies": {
38
+ "@eslint/js": "^9.23.0",
39
+ "globals": "^15.15.0",
40
+ "typescript-eslint": "^8.28.0"
41
+ },
42
+ "peerDependencies": {
43
+ "eslint": "^9.0.0"
44
+ }
45
+ }