@kamaal111/kamaal-quality-config 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -3,8 +3,9 @@
3
3
  Kamaal Farah's shared [oxlint](https://oxc.rs) quality config.
4
4
 
5
5
  Currently enables every rule from [`@kamaal111/oxlint-plugin-anti-slop`](https://github.com/kamaal111/anti-slop),
6
- Kamaal's fork of [`dmmulroy/anti-slop`](https://github.com/dmmulroy/anti-slop). More rule sources
7
- will be folded in over time.
6
+ Kamaal's fork of [`dmmulroy/anti-slop`](https://github.com/dmmulroy/anti-slop), plus a curated set of
7
+ rules from oxlint's built-in `typescript`, `unicorn`, and `oxc` plugins and from `eslint-plugin-import`
8
+ (via oxlint's `jsPlugins`). More rule sources will be folded in over time.
8
9
 
9
10
  ## Table of contents
10
11
 
package/dist/index.d.ts CHANGED
@@ -1,10 +1,38 @@
1
1
  declare const _default: {
2
+ plugins: ("oxc" | "typescript" | "unicorn")[];
2
3
  jsPlugins: {
3
4
  name: string;
4
5
  specifier: string;
5
6
  }[];
7
+ options: {
8
+ typeAware: true;
9
+ };
10
+ categories: {
11
+ correctness: "error";
12
+ };
6
13
  rules: {
7
- [k: string]: "error";
14
+ curly: "error";
15
+ 'typescript/no-deprecated': "error";
16
+ 'typescript/consistent-type-imports': "error";
17
+ 'typescript/no-non-null-assertion': "error";
18
+ 'typescript/consistent-type-assertions': ["error", {
19
+ assertionStyle: "never";
20
+ }];
21
+ 'oxc/no-accumulating-spread': "error";
22
+ 'anti-slop/no-runtime-typeof': ["error", {
23
+ allowInTypeGuards: boolean;
24
+ }];
25
+ 'import-js/order': ["error", {
26
+ groups: (string | string[])[];
27
+ 'newlines-between': "always";
28
+ alphabetize: {
29
+ order: string;
30
+ caseInsensitive: boolean;
31
+ };
32
+ }];
33
+ };
34
+ env: {
35
+ builtin: true;
8
36
  };
9
37
  };
10
38
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA6BuB,KAAK;gBAAS,eAAe"}
package/dist/index.js CHANGED
@@ -2,7 +2,31 @@ import antiSlopPlugin from '@kamaal111/oxlint-plugin-anti-slop';
2
2
  import { defineConfig } from 'oxlint';
3
3
  const antiSlopRules = Object.fromEntries(Object.keys(antiSlopPlugin.rules).map(ruleName => [`anti-slop/${ruleName}`, 'error']));
4
4
  export default defineConfig({
5
- jsPlugins: [{ name: 'anti-slop', specifier: '@kamaal111/oxlint-plugin-anti-slop' }],
6
- rules: antiSlopRules,
5
+ plugins: ['typescript', 'unicorn', 'oxc'],
6
+ jsPlugins: [
7
+ { name: 'anti-slop', specifier: '@kamaal111/oxlint-plugin-anti-slop' },
8
+ { name: 'import-js', specifier: 'eslint-plugin-import' },
9
+ ],
10
+ options: { typeAware: true },
11
+ categories: { correctness: 'error' },
12
+ rules: {
13
+ ...antiSlopRules,
14
+ curly: 'error',
15
+ 'typescript/no-deprecated': 'error',
16
+ 'typescript/consistent-type-imports': 'error',
17
+ 'typescript/no-non-null-assertion': 'error',
18
+ 'typescript/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
19
+ 'oxc/no-accumulating-spread': 'error',
20
+ 'anti-slop/no-runtime-typeof': ['error', { allowInTypeGuards: true }],
21
+ 'import-js/order': [
22
+ 'error',
23
+ {
24
+ groups: ['builtin', 'external', ['internal', 'parent', 'sibling', 'index']],
25
+ 'newlines-between': 'always',
26
+ alphabetize: { order: 'asc', caseInsensitive: true },
27
+ },
28
+ ],
29
+ },
30
+ env: { builtin: true },
7
31
  });
8
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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E,OAAO;QAC7C,kCAAkC,EAAE,OAAO;QAC3C,uCAAuC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;QAC/E,4BAA4B,EAAE,OAAO;QACrC,6BAA6B,EAAE,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACrE,iBAAiB,EAAE;YACjB,OAAO;YACP;gBACE,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;gBAC3E,kBAAkB,EAAE,QAAQ;gBAC5B,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE;aACrD;SACF;KACF;IACD,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;CACvB,CAAC,CAAC"}
@@ -1,10 +1,25 @@
1
1
  {
2
+ "plugins": [
3
+ "typescript",
4
+ "unicorn",
5
+ "oxc"
6
+ ],
2
7
  "jsPlugins": [
3
8
  {
4
9
  "name": "anti-slop",
5
10
  "specifier": "@kamaal111/oxlint-plugin-anti-slop"
11
+ },
12
+ {
13
+ "name": "import-js",
14
+ "specifier": "eslint-plugin-import"
6
15
  }
7
16
  ],
17
+ "options": {
18
+ "typeAware": true
19
+ },
20
+ "categories": {
21
+ "correctness": "error"
22
+ },
8
23
  "rules": {
9
24
  "anti-slop/no-array-filter-map": "error",
10
25
  "anti-slop/no-reduce-accumulator-copy": "error",
@@ -15,7 +30,12 @@
15
30
  "anti-slop/no-object-parameters": "error",
16
31
  "anti-slop/no-reflect-apply": "error",
17
32
  "anti-slop/no-reflect-get": "error",
18
- "anti-slop/no-runtime-typeof": "error",
33
+ "anti-slop/no-runtime-typeof": [
34
+ "error",
35
+ {
36
+ "allowInTypeGuards": true
37
+ }
38
+ ],
19
39
  "anti-slop/no-unsafe-dictionary-type": "error",
20
40
  "anti-slop/no-shape-in-symbol-names": "error",
21
41
  "anti-slop/no-unknown-parameters": "error",
@@ -23,6 +43,40 @@
23
43
  "anti-slop/no-unknown-type-aliases": "error",
24
44
  "anti-slop/no-widen-then-assert": "error",
25
45
  "anti-slop/require-readable-spacing": "error",
26
- "anti-slop/require-safety-comment-for-type-assertion": "error"
46
+ "anti-slop/require-safety-comment-for-type-assertion": "error",
47
+ "curly": "error",
48
+ "typescript/no-deprecated": "error",
49
+ "typescript/consistent-type-imports": "error",
50
+ "typescript/no-non-null-assertion": "error",
51
+ "typescript/consistent-type-assertions": [
52
+ "error",
53
+ {
54
+ "assertionStyle": "never"
55
+ }
56
+ ],
57
+ "oxc/no-accumulating-spread": "error",
58
+ "import-js/order": [
59
+ "error",
60
+ {
61
+ "groups": [
62
+ "builtin",
63
+ "external",
64
+ [
65
+ "internal",
66
+ "parent",
67
+ "sibling",
68
+ "index"
69
+ ]
70
+ ],
71
+ "newlines-between": "always",
72
+ "alphabetize": {
73
+ "order": "asc",
74
+ "caseInsensitive": true
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ "env": {
80
+ "builtin": true
27
81
  }
28
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamaal111/kamaal-quality-config",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Kamaal Farah's shared oxlint quality config.",
5
5
  "keywords": [
6
6
  "lint",
@@ -34,7 +34,8 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@kamaal111/oxlint-plugin-anti-slop": "^0.0.4"
37
+ "@kamaal111/oxlint-plugin-anti-slop": "^0.0.4",
38
+ "eslint-plugin-import": "^2.32.0"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@oxlint/plugins": "^1.82.0",