@tucchi-/eslint-config 1.4.0 → 1.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tucchi-/eslint-config",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "Modern ESLint config with TypeScript strict, unicorn, and complexity rules",
5
5
  "author": "tucchi-",
6
6
  "license": "MIT",
@@ -10,7 +10,10 @@
10
10
  ".": "./index.js"
11
11
  },
12
12
  "files": [
13
- "index.js"
13
+ "index.js",
14
+ "tsconfig.recommended.json",
15
+ "ruleset.json",
16
+ "scripts/protect-branch.sh"
14
17
  ],
15
18
  "keywords": [
16
19
  "eslint",
@@ -33,6 +36,6 @@
33
36
  "typescript-eslint": "^8.0.0"
34
37
  },
35
38
  "devDependencies": {
36
- "@tucchi-/eslint-config": "1.3.0"
39
+ "@tucchi-/eslint-config": "1.5.0"
37
40
  }
38
41
  }
package/ruleset.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "main-protection",
3
+ "target": "branch",
4
+ "enforcement": "active",
5
+ "bypass_actors": [
6
+ {
7
+ "actor_id": 1,
8
+ "actor_type": "OrganizationAdmin",
9
+ "bypass_mode": "always"
10
+ }
11
+ ],
12
+ "conditions": {
13
+ "ref_name": {
14
+ "exclude": [],
15
+ "include": ["refs/heads/main"]
16
+ }
17
+ },
18
+ "rules": [
19
+ {
20
+ "type": "required_linear_history"
21
+ },
22
+ {
23
+ "type": "non_fast_forward"
24
+ },
25
+ {
26
+ "type": "deletion"
27
+ },
28
+ {
29
+ "type": "required_status_checks",
30
+ "parameters": {
31
+ "strict_required_status_checks_policy": true,
32
+ "required_status_checks": [
33
+ { "context": "check" },
34
+ { "context": "build" },
35
+ { "context": "test" }
36
+ ]
37
+ }
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ # Apply standard branch protection ruleset
3
+ # Usage: ./scripts/protect-branch.sh [owner/repo]
4
+
5
+ set -e
6
+
7
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8
+ REPO=${1:-$(gh repo view --json nameWithOwner -q .nameWithOwner)}
9
+
10
+ gh api "repos/$REPO/rulesets" -X POST --input "$SCRIPT_DIR/../ruleset.json"
11
+
12
+ echo "✓ Ruleset applied to $REPO"
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
5
+ "target": "ESNext",
6
+ "module": "Preserve",
7
+ "moduleDetection": "force",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "noEmit": true,
15
+
16
+ "strict": true,
17
+ "skipLibCheck": true,
18
+ "noFallthroughCasesInSwitch": true,
19
+ "noUncheckedIndexedAccess": true,
20
+ "noImplicitOverride": true,
21
+
22
+ "noUnusedLocals": false,
23
+ "noUnusedParameters": false,
24
+ "noPropertyAccessFromIndexSignature": false
25
+ }
26
+ }