@siim-m/config 0.2.0 → 0.3.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/dist/oxlint.js CHANGED
@@ -1,3 +1,4 @@
1
+ const TEST_FILES = ['**/*.test.*', '**/*.spec.*', '**/test/**', '**/tests/**', '**/__tests__/**'];
1
2
  /**
2
3
  * Shared oxlint preset. Extend it from `oxlint.config.mts`:
3
4
  *
@@ -10,11 +11,15 @@ const preset = {
10
11
  jsPlugins: [
11
12
  { name: 'anti-slop', specifier: '@siim-m/config/anti-slop' },
12
13
  { name: 'anti-slop-effect', specifier: '@siim-m/config/anti-slop-effect' },
14
+ { name: 'ai-guard', specifier: '@siim-m/config/ai-guard' },
15
+ { name: 'landmines', specifier: '@siim-m/config/landmines' },
13
16
  ],
14
17
  categories: { correctness: 'error' },
15
18
  rules: {
19
+ 'anti-slop/comments': 'error',
16
20
  'anti-slop/no-chained-type-assertions': 'error',
17
21
  'anti-slop/no-conditional-empty-object-spread': 'error',
22
+ 'anti-slop/no-disabled-type-assertion-rules': 'error',
18
23
  'anti-slop/no-known-value-widening': 'error',
19
24
  'anti-slop/no-module-mocking': 'error',
20
25
  'anti-slop/no-object-parameters': 'error',
@@ -30,15 +35,57 @@ const preset = {
30
35
  'anti-slop/require-pascal-case-namespace-imports': 'error',
31
36
  'anti-slop/require-readable-spacing': 'error',
32
37
  'anti-slop/require-safety-comment-for-type-assertion': 'error',
38
+ 'anti-slop/require-suppression-reason': 'error',
33
39
  'anti-slop-effect/no-manual-effect-error-tag': 'error',
40
+ 'anti-slop-effect/no-ordie-in-service-construction': 'error',
34
41
  'anti-slop-effect/no-service-constructor-imports': 'error',
35
42
  'anti-slop-effect/no-service-parameters': 'error',
43
+ 'anti-slop-effect/no-unbounded-retry': 'error',
36
44
  'anti-slop-effect/prefer-effect-match': 'error',
45
+ 'anti-slop-effect/require-cause-when-narrowing': 'error',
46
+ 'anti-slop-effect/throw-in-effect-gen': 'error',
47
+ 'ai-guard/no-assertionless-test': 'error',
48
+ 'ai-guard/no-placeholder-implementation': 'error',
49
+ 'ai-guard/no-silent-fallback': 'error',
50
+ 'ai-guard/no-tautological-assertion': 'error',
51
+ 'ai-guard/no-test-env-branch': 'error',
52
+ 'ai-guard/no-undeclared-import': 'error',
53
+ 'landmines/no-fixed-sleep': 'error',
54
+ 'landmines/no-flake-masking': 'error',
55
+ 'landmines/no-unsignaled-poll': 'error',
56
+ 'landmines/strict-msw': 'error',
37
57
  // Spreads in reducers; anti-slop/no-reduce-accumulator-copy covers the other copies.
38
58
  'oxc/no-accumulating-spread': 'error',
39
- // Type-aware: these run only with `oxlint --type-aware` and oxlint-tsgolint installed.
59
+ eqeqeq: 'error',
60
+ 'typescript/consistent-type-imports': 'error',
61
+ 'typescript/no-explicit-any': 'error',
62
+ 'typescript/no-non-null-assertion': 'error',
63
+ // Type-aware: these run only with `oxlint --type-aware` and tsrs or oxlint-tsgolint installed.
40
64
  'typescript/no-floating-promises': 'error',
41
65
  'typescript/no-misused-promises': 'error',
66
+ 'typescript/no-unnecessary-type-assertion': 'error',
67
+ 'typescript/no-unnecessary-type-conversion': 'error',
68
+ 'typescript/no-unsafe-argument': 'error',
69
+ 'typescript/no-unsafe-assignment': 'error',
70
+ 'typescript/no-unsafe-call': 'error',
71
+ 'typescript/no-unsafe-member-access': 'error',
72
+ 'typescript/no-unsafe-return': 'error',
73
+ 'typescript/no-unsafe-type-assertion': 'error',
74
+ 'typescript/only-throw-error': 'error',
75
+ 'typescript/switch-exhaustiveness-check': [
76
+ 'error',
77
+ { allowDefaultCaseForExhaustiveSwitch: true, considerDefaultExhaustiveForUnions: true },
78
+ ],
79
+ 'typescript/use-unknown-in-catch-callback-variable': 'error',
42
80
  },
81
+ overrides: [
82
+ {
83
+ files: TEST_FILES,
84
+ rules: {
85
+ // A test may throw inside Effect.gen to fail on purpose.
86
+ 'anti-slop-effect/throw-in-effect-gen': 'off',
87
+ },
88
+ },
89
+ ],
43
90
  };
44
91
  export default preset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siim-m/config",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Shared oxlint, oxfmt and tsconfig settings, with the anti-slop oxlint plugins and a React preset",
5
5
  "license": "MIT",
6
6
  "repository": "github:siim-m/config",
@@ -17,6 +17,8 @@
17
17
  "./anti-slop": "./dist/anti-slop/index.js",
18
18
  "./anti-slop-effect": "./dist/anti-slop/effect/index.js",
19
19
  "./anti-slop-react": "./dist/anti-slop-react/index.js",
20
+ "./ai-guard": "./dist/ai-guard.js",
21
+ "./landmines": "./dist/landmines.js",
20
22
  "./tsconfig.json": "./tsconfig.base.json",
21
23
  "./reset.d.ts": "./reset.d.ts"
22
24
  },
@@ -24,7 +26,7 @@
24
26
  "access": "public"
25
27
  },
26
28
  "scripts": {
27
- "build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/anti-slop/LICENSE dist/anti-slop/ && cp src/anti-slop-react/LICENSE dist/anti-slop-react/ && cp src/anti-slop/vendor/eslint-stylistic/LICENSE src/anti-slop/vendor/eslint-stylistic/padding-line-options.d.ts dist/anti-slop/vendor/eslint-stylistic/",
29
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/anti-slop/LICENSE dist/anti-slop/ && cp src/anti-slop/effect/LICENSE-enfect dist/anti-slop/effect/ && cp src/anti-slop-react/LICENSE dist/anti-slop-react/ && cp src/anti-slop/vendor/eslint-stylistic/LICENSE src/anti-slop/vendor/eslint-stylistic/padding-line-options.d.ts dist/anti-slop/vendor/eslint-stylistic/",
28
30
  "typecheck": "tsc --noEmit",
29
31
  "test": "bun run build && node --test 'src/**/*.test.ts' 'test/*.test.ts'",
30
32
  "format": "oxfmt",
@@ -33,22 +35,25 @@
33
35
  "prepublishOnly": "bun run check"
34
36
  },
35
37
  "dependencies": {
38
+ "@interfere/landmines": "^0.1.1",
36
39
  "@oxlint/plugins": "^1.92.0",
37
- "@total-typescript/ts-reset": "^0.6.1"
40
+ "@total-typescript/ts-reset": "^0.6.1",
41
+ "eslint-plugin-ai-guard": "^1.4.7"
38
42
  },
39
43
  "devDependencies": {
40
44
  "@types/node": "26.6.6",
41
45
  "@types/react": "19.3.0",
42
46
  "oxfmt": "0.77.0",
43
47
  "oxlint": "1.92.0",
44
- "oxlint-tsgolint": "7.0.2006",
48
+ "tsrs": "7.1.0-beta.tsrs3",
45
49
  "typescript": "7.0.2"
46
50
  },
47
51
  "peerDependencies": {
48
52
  "@effect/tsgo": ">=0.67.5",
49
53
  "oxfmt": ">=0.77.0",
50
54
  "oxlint": ">=1.92.0",
51
- "oxlint-tsgolint": ">=7.0.2006"
55
+ "oxlint-tsgolint": ">=7.0.2006",
56
+ "tsrs": ">=7.1.0-beta.tsrs3"
52
57
  },
53
58
  "peerDependenciesMeta": {
54
59
  "@effect/tsgo": {
@@ -59,7 +64,13 @@
59
64
  },
60
65
  "oxlint-tsgolint": {
61
66
  "optional": true
67
+ },
68
+ "tsrs": {
69
+ "optional": true
62
70
  }
63
71
  },
72
+ "engines": {
73
+ "node": "^22.18.0 || >=24.11.0"
74
+ },
64
75
  "packageManager": "bun@1.4.4"
65
76
  }