@imapps/oxc-config 0.0.0-stage → 7.0.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.
Files changed (43) hide show
  1. package/README.md +65 -2
  2. package/anti-slop/LICENSE +21 -0
  3. package/anti-slop/UPSTREAM-IMAPPS.md +11 -0
  4. package/anti-slop/index.ts +47 -0
  5. package/anti-slop/rules/no-array-filter-map.ts +28 -0
  6. package/anti-slop/rules/no-chained-type-assertions.ts +77 -0
  7. package/anti-slop/rules/no-conditional-empty-object-spread.ts +49 -0
  8. package/anti-slop/rules/no-known-value-widening.ts +415 -0
  9. package/anti-slop/rules/no-module-mocking.ts +80 -0
  10. package/anti-slop/rules/no-object-parameters.ts +83 -0
  11. package/anti-slop/rules/no-reduce-accumulator-copy.ts +109 -0
  12. package/anti-slop/rules/no-reflect-apply.ts +28 -0
  13. package/anti-slop/rules/no-reflect-get.ts +28 -0
  14. package/anti-slop/rules/no-runtime-typeof.ts +77 -0
  15. package/anti-slop/rules/no-shape-in-symbol-names.ts +46 -0
  16. package/anti-slop/rules/no-unknown-parameters.ts +69 -0
  17. package/anti-slop/rules/no-unknown-returns.ts +82 -0
  18. package/anti-slop/rules/no-unknown-type-aliases.ts +54 -0
  19. package/anti-slop/rules/no-unsafe-dictionary-type.ts +154 -0
  20. package/anti-slop/rules/no-widen-then-assert.ts +366 -0
  21. package/anti-slop/rules/require-readable-spacing.ts +80 -0
  22. package/anti-slop/rules/require-safety-comment-for-type-assertion.ts +131 -0
  23. package/anti-slop/shared/array-method.ts +94 -0
  24. package/anti-slop/shared/dictionary-types.ts +515 -0
  25. package/anti-slop/shared/function-parameters.ts +49 -0
  26. package/anti-slop/shared/lexical-type-parameters.ts +61 -0
  27. package/anti-slop/shared/reflect-method.ts +24 -0
  28. package/anti-slop/shared/scope.ts +15 -0
  29. package/anti-slop/shared/type-alias-resolution.ts +250 -0
  30. package/anti-slop/vendor/eslint-stylistic/LICENSE +22 -0
  31. package/anti-slop/vendor/eslint-stylistic/UPSTREAM.md +28 -0
  32. package/anti-slop/vendor/eslint-stylistic/padding-line-ast.ts +51 -0
  33. package/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.ts +929 -0
  34. package/anti-slop/vendor/eslint-stylistic/padding-line-options.d.ts +87 -0
  35. package/build/anti-slop.js +2569 -0
  36. package/build/anti-slop.js.map +1 -0
  37. package/build/oxfmt.d.ts +24 -0
  38. package/build/oxfmt.js +37 -0
  39. package/build/oxfmt.js.map +1 -0
  40. package/build/oxlint.d.ts +44 -0
  41. package/build/oxlint.js +57 -0
  42. package/build/oxlint.js.map +1 -0
  43. package/package.json +52 -4
@@ -0,0 +1,44 @@
1
+ declare const _default: {
2
+ ignorePatterns: string[];
3
+ plugins: ("typescript" | "oxc" | "jsx-a11y")[];
4
+ jsPlugins: {
5
+ name: string;
6
+ specifier: string;
7
+ }[];
8
+ categories: {
9
+ correctness: "error";
10
+ };
11
+ rules: {
12
+ 'prefer-const': "error";
13
+ 'prefer-template': "error";
14
+ eqeqeq: "warn";
15
+ 'typescript/no-explicit-any': "warn";
16
+ 'oxc/no-accumulating-spread': "error";
17
+ 'anti-slop/no-array-filter-map': "error";
18
+ 'anti-slop/no-reduce-accumulator-copy': "error";
19
+ 'anti-slop/no-chained-type-assertions': "error";
20
+ 'anti-slop/no-conditional-empty-object-spread': "error";
21
+ 'anti-slop/no-known-value-widening': "error";
22
+ 'anti-slop/no-module-mocking': "error";
23
+ 'anti-slop/no-object-parameters': "error";
24
+ 'anti-slop/no-reflect-apply': "error";
25
+ 'anti-slop/no-reflect-get': "error";
26
+ 'anti-slop/no-runtime-typeof': "error";
27
+ 'anti-slop/no-shape-in-symbol-names': "error";
28
+ 'anti-slop/no-unknown-parameters': "error";
29
+ 'anti-slop/no-unknown-returns': "error";
30
+ 'anti-slop/no-unknown-type-aliases': "error";
31
+ 'anti-slop/no-unsafe-dictionary-type': "error";
32
+ 'anti-slop/no-widen-then-assert': "error";
33
+ 'anti-slop/require-readable-spacing': "error";
34
+ 'anti-slop/require-safety-comment-for-type-assertion': "error";
35
+ };
36
+ overrides: {
37
+ files: string[];
38
+ rules: {
39
+ 'typescript/no-explicit-any': "off";
40
+ };
41
+ }[];
42
+ };
43
+
44
+ export { _default as default };
@@ -0,0 +1,57 @@
1
+ // src/oxlint.ts
2
+ import { defineConfig } from "oxlint";
3
+ var agentDirs = [
4
+ ".agent",
5
+ ".agents",
6
+ ".claude",
7
+ ".codex",
8
+ ".continue",
9
+ ".cursor",
10
+ ".gemini",
11
+ ".omp",
12
+ ".opencode",
13
+ ".pi",
14
+ ".roo",
15
+ ".windsurf"
16
+ ];
17
+ var oxlint_default = defineConfig({
18
+ ignorePatterns: [...agentDirs.map((dir) => `${dir}/**`), "**/.worktrees/**", "**/anti-slop/**"],
19
+ plugins: ["typescript", "oxc", "jsx-a11y"],
20
+ jsPlugins: [{ name: "anti-slop", specifier: "@imapps/oxc-config/anti-slop" }],
21
+ categories: { correctness: "error" },
22
+ rules: {
23
+ "prefer-const": "error",
24
+ "prefer-template": "error",
25
+ eqeqeq: "warn",
26
+ "typescript/no-explicit-any": "warn",
27
+ "oxc/no-accumulating-spread": "error",
28
+ "anti-slop/no-array-filter-map": "error",
29
+ "anti-slop/no-reduce-accumulator-copy": "error",
30
+ "anti-slop/no-chained-type-assertions": "error",
31
+ "anti-slop/no-conditional-empty-object-spread": "error",
32
+ "anti-slop/no-known-value-widening": "error",
33
+ "anti-slop/no-module-mocking": "error",
34
+ "anti-slop/no-object-parameters": "error",
35
+ "anti-slop/no-reflect-apply": "error",
36
+ "anti-slop/no-reflect-get": "error",
37
+ "anti-slop/no-runtime-typeof": "error",
38
+ "anti-slop/no-shape-in-symbol-names": "error",
39
+ "anti-slop/no-unknown-parameters": "error",
40
+ "anti-slop/no-unknown-returns": "error",
41
+ "anti-slop/no-unknown-type-aliases": "error",
42
+ "anti-slop/no-unsafe-dictionary-type": "error",
43
+ "anti-slop/no-widen-then-assert": "error",
44
+ "anti-slop/require-readable-spacing": "error",
45
+ "anti-slop/require-safety-comment-for-type-assertion": "error"
46
+ },
47
+ overrides: [
48
+ {
49
+ files: ["**/*.test.{ts,tsx,js,jsx}", "**/*.spec.{ts,tsx,js,jsx}"],
50
+ rules: { "typescript/no-explicit-any": "off" }
51
+ }
52
+ ]
53
+ });
54
+ export {
55
+ oxlint_default as default
56
+ };
57
+ //# sourceMappingURL=oxlint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/oxlint.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nconst agentDirs = [\n '.agent',\n '.agents',\n '.claude',\n '.codex',\n '.continue',\n '.cursor',\n '.gemini',\n '.omp',\n '.opencode',\n '.pi',\n '.roo',\n '.windsurf',\n];\n\nexport default defineConfig({\n ignorePatterns: [...agentDirs.map((dir) => `${dir}/**`), '**/.worktrees/**', '**/anti-slop/**'],\n plugins: ['typescript', 'oxc', 'jsx-a11y'],\n jsPlugins: [{ name: 'anti-slop', specifier: '@imapps/oxc-config/anti-slop' }],\n categories: { correctness: 'error' },\n rules: {\n 'prefer-const': 'error',\n 'prefer-template': 'error',\n eqeqeq: 'warn',\n 'typescript/no-explicit-any': 'warn',\n 'oxc/no-accumulating-spread': 'error',\n 'anti-slop/no-array-filter-map': 'error',\n 'anti-slop/no-reduce-accumulator-copy': 'error',\n 'anti-slop/no-chained-type-assertions': 'error',\n 'anti-slop/no-conditional-empty-object-spread': 'error',\n 'anti-slop/no-known-value-widening': 'error',\n 'anti-slop/no-module-mocking': 'error',\n 'anti-slop/no-object-parameters': 'error',\n 'anti-slop/no-reflect-apply': 'error',\n 'anti-slop/no-reflect-get': 'error',\n 'anti-slop/no-runtime-typeof': 'error',\n 'anti-slop/no-shape-in-symbol-names': 'error',\n 'anti-slop/no-unknown-parameters': 'error',\n 'anti-slop/no-unknown-returns': 'error',\n 'anti-slop/no-unknown-type-aliases': 'error',\n 'anti-slop/no-unsafe-dictionary-type': 'error',\n 'anti-slop/no-widen-then-assert': 'error',\n 'anti-slop/require-readable-spacing': 'error',\n 'anti-slop/require-safety-comment-for-type-assertion': 'error',\n },\n overrides: [\n {\n files: ['**/*.test.{ts,tsx,js,jsx}', '**/*.spec.{ts,tsx,js,jsx}'],\n rules: { 'typescript/no-explicit-any': 'off' },\n },\n ],\n});\n"],"mappings":";AAAA,SAAS,oBAAoB;AAE7B,IAAM,YAAY;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AAEA,IAAO,iBAAQ,aAAa;AAAA,EACxB,gBAAgB,CAAC,GAAG,UAAU,IAAI,CAAC,QAAQ,GAAG,GAAG,KAAK,GAAG,oBAAoB,iBAAiB;AAAA,EAC9F,SAAS,CAAC,cAAc,OAAO,UAAU;AAAA,EACzC,WAAW,CAAC,EAAE,MAAM,aAAa,WAAW,+BAA+B,CAAC;AAAA,EAC5E,YAAY,EAAE,aAAa,QAAQ;AAAA,EACnC,OAAO;AAAA,IACH,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,QAAQ;AAAA,IACR,8BAA8B;AAAA,IAC9B,8BAA8B;AAAA,IAC9B,iCAAiC;AAAA,IACjC,wCAAwC;AAAA,IACxC,wCAAwC;AAAA,IACxC,gDAAgD;AAAA,IAChD,qCAAqC;AAAA,IACrC,+BAA+B;AAAA,IAC/B,kCAAkC;AAAA,IAClC,8BAA8B;AAAA,IAC9B,4BAA4B;AAAA,IAC5B,+BAA+B;AAAA,IAC/B,sCAAsC;AAAA,IACtC,mCAAmC;AAAA,IACnC,gCAAgC;AAAA,IAChC,qCAAqC;AAAA,IACrC,uCAAuC;AAAA,IACvC,kCAAkC;AAAA,IAClC,sCAAsC;AAAA,IACtC,uDAAuD;AAAA,EAC3D;AAAA,EACA,WAAW;AAAA,IACP;AAAA,MACI,OAAO,CAAC,6BAA6B,2BAA2B;AAAA,MAChE,OAAO,EAAE,8BAA8B,MAAM;AAAA,IACjD;AAAA,EACJ;AACJ,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
2
  "name": "@imapps/oxc-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "7.0.0",
4
+ "description": "Shared Oxlint and Oxfmt configuration (with vendored anti-slop rules) for IM Apps projects",
5
+ "license": "AGPL-3.0 license",
6
+ "type": "module",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/",
9
+ "access": "public"
10
+ },
11
+ "exports": {
12
+ "./oxlint": {
13
+ "types": "./build/oxlint.d.ts",
14
+ "default": "./build/oxlint.js"
15
+ },
16
+ "./oxfmt": {
17
+ "types": "./build/oxfmt.d.ts",
18
+ "default": "./build/oxfmt.js"
19
+ },
20
+ "./anti-slop": {
21
+ "default": "./build/anti-slop.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "build",
26
+ "anti-slop",
27
+ "README.md"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "clean": "rimraf build",
32
+ "prepack": "bun run clean && bun run build",
33
+ "test": "tsup && vitest run"
34
+ },
35
+ "devDependencies": {
36
+ "@oxlint/plugins": "1.90.0",
37
+ "@types/node": "^24.3.0",
38
+ "oxfmt": "0.75.0",
39
+ "oxlint": "1.90.0",
40
+ "rimraf": "^6.0.1",
41
+ "tsup": "^8.5.0",
42
+ "typescript": "^5.9.2",
43
+ "vitest": "^3.2.4"
44
+ },
45
+ "peerDependencies": {
46
+ "@oxlint/plugins": "1.90.0",
47
+ "oxfmt": "0.75.0",
48
+ "oxlint": "1.90.0"
49
+ },
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/igor-siergiej/utils.git"
53
+ }
54
+ }