@r_masseater/oxlint-typed-rules 0.4.1 → 0.4.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 +12 -25
- package/dist/drizzle.d.mts +3 -3
- package/dist/drizzle.mjs +3 -3
- package/dist/drizzle.mjs.map +1 -1
- package/dist/{upstream-plugin-xn91RvOJ.d.mts → index-D1qDt581.d.mts} +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/react.d.mts +5 -5
- package/dist/react.mjs +158 -104
- package/dist/react.mjs.map +1 -1
- package/dist/remotion.d.mts +3 -3
- package/dist/remotion.mjs +4 -4
- package/dist/remotion.mjs.map +1 -1
- package/dist/tanstack-query.d.mts +3 -3
- package/dist/tanstack-query.mjs +4 -4
- package/dist/tanstack-query.mjs.map +1 -1
- package/dist/tanstack-router.d.mts +3 -3
- package/dist/tanstack-router.mjs +3 -3
- package/dist/tanstack-router.mjs.map +1 -1
- package/dist/tanstack-start.mjs +4 -4
- package/dist/tanstack-start.mjs.map +1 -1
- package/dist/{ts-compat-kqrVqnFj.mjs → ts-compat-CFDky9Ie.mjs} +3 -3
- package/dist/ts-compat-CFDky9Ie.mjs.map +1 -0
- package/dist/{typed-rule-DljA66d1.mjs → typed-rule-DFpV2XgE.mjs} +63 -63
- package/dist/typed-rule-DFpV2XgE.mjs.map +1 -0
- package/dist/{typescript-eslint-utils-DRyGbBR9.mjs → typescript-eslint-utils-BMYUCcJU.mjs} +2 -2
- package/dist/typescript-eslint-utils-BMYUCcJU.mjs.map +1 -0
- package/dist/{upstream-plugin-B_PNfSLV.mjs → upstream-plugin-D4Lz9A1H.mjs} +5 -4
- package/dist/upstream-plugin-D4Lz9A1H.mjs.map +1 -0
- package/package.json +18 -16
- package/skills/run-typed-eslint-rules/SKILL.md +85 -0
- package/dist/config-rules-CIyMUUvG.mjs +0 -6
- package/dist/config-rules-CIyMUUvG.mjs.map +0 -1
- package/dist/ts-compat-kqrVqnFj.mjs.map +0 -1
- package/dist/typed-rule-DljA66d1.mjs.map +0 -1
- package/dist/typescript-eslint-utils-DRyGbBR9.mjs.map +0 -1
- package/dist/upstream-plugin-B_PNfSLV.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ ESLint を入れずに、型情報を使うルールを oxlint だけで回せ
|
|
|
7
7
|
|
|
8
8
|
## 公開先
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
npm: [@r_masseater/oxlint-typed-rules](https://www.npmjs.com/package/@r_masseater/oxlint-typed-rules)
|
|
11
11
|
|
|
12
12
|
## 移植したルール
|
|
13
13
|
|
|
@@ -25,16 +25,16 @@ ESLint を入れずに、型情報を使うルールを oxlint だけで回せ
|
|
|
25
25
|
同じルールを ESLint(typescript-eslint)で動かした場合と比べた。
|
|
26
26
|
計測は 2026-11-03 に、次の条件で行った。
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
対象は [masseater.dev][masseater-dev] の `apps/portfolio/src`(238 ファイル)と、
|
|
29
|
+
持ち主の非公開のリポジトリにあるスライドの React アプリ(1,434 ファイル、5.2 万行)である。
|
|
30
|
+
oxlint の側は oxlint 1.90.0、oxlint-tsgolint 7.0.2005、TypeScript 7.1.0-beta で測った。
|
|
31
|
+
ESLint の側は ESLint 9.39.5、typescript-eslint 8.72.1(`projectService`)で測った。
|
|
32
|
+
`@tanstack/eslint-plugin-start` 0.1.0 が ESLint 10 に対応していないので、ESLint は 9 にした。
|
|
33
|
+
ESLint 側にも同じ patch を当て、両者が同じ違反を出すことを確かめた。
|
|
34
|
+
Node.js 26.13.0、4 コア、メモリ 16 GB の Linux で測った。
|
|
35
|
+
cold は OS のページキャッシュを捨ててからの 3 回の中央値である。
|
|
36
|
+
warm はページキャッシュの載った状態での 5 回の中央値で、ESLint の `--cache` は使っていない。
|
|
37
|
+
メモリは子プロセスの tsgo と tsgolint を含めた RSS の合計の最大値である。
|
|
38
38
|
|
|
39
39
|
[masseater-dev]: https://github.com/masseater/masseater.dev
|
|
40
40
|
|
|
@@ -51,7 +51,7 @@ masseater.dev の `apps/portfolio/src` の結果は次のとおりである。
|
|
|
51
51
|
| 3 ルール・このパッケージと tsgolint | 2.84 秒 | 2.59 秒 | 1,449 MB |
|
|
52
52
|
| 3 ルール・ESLint | 7.53 秒 | 6.64 秒 | 1,416 MB |
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
スライドの React アプリの結果は次のとおりである。
|
|
55
55
|
|
|
56
56
|
| ルールとツール | cold | warm | メモリ |
|
|
57
57
|
| ------------------------------------ | -------: | -------: | -------: |
|
|
@@ -65,21 +65,8 @@ personal-space の `apps/slides/src` の結果は次のとおりである。
|
|
|
65
65
|
| 3 ルール・ESLint | 11.00 秒 | 10.31 秒 | 1,763 MB |
|
|
66
66
|
|
|
67
67
|
TanStack の 2 ルールは、ESLint の 2.5〜3.6 倍の速さで、メモリは 5〜6 割で済む。
|
|
68
|
-
TypeScript 6 で Program を作っていた 0.0.2 では、
|
|
69
|
-
warm で masseater.dev が 6.37 秒、slides が 8.17 秒だった。
|
|
70
|
-
時間の大半が TypeScript 6 で Program と型検査器を作る処理だったので、そこを tsgo に任せた。
|
|
71
|
-
|
|
72
|
-
slides の 3.8 秒のうち、tsgo との往復は 1.1 秒で、そのうち tsgo の中の処理は 0.8 秒だった。
|
|
73
|
-
残りは、tsgo から受け取った構文木を JS の側で組み立て、ルールを動かす時間である。
|
|
74
|
-
oxlint のスレッドの数を 1 から 4 に変えても、時間はほぼ変わらなかった。
|
|
75
|
-
|
|
76
|
-
ESLint の `--cache` が当たると、どの組み合わせも 0.4〜0.5 秒、170〜210 MB で終わる。
|
|
77
|
-
ただし ESLint のキャッシュはファイルの中身だけを見る。
|
|
78
|
-
型の出どころのファイルが変わっても、型を使うルールを検査し直さない。
|
|
79
68
|
|
|
80
69
|
typescript-eslint のルールで oxlint に同じ名前のものがあれば、tsgolint で動かす。
|
|
81
|
-
tsgolint は Go で書かれた TypeScript 7 で並列に型を調べる。
|
|
82
|
-
ESLint の 6〜9 倍速く、メモリも 4〜6 割で済む。
|
|
83
70
|
このパッケージは、tsgolint に無いルールを ESLint 無しで動かすためのものである。
|
|
84
71
|
tsgolint と併せると、型の情報を tsgo と tsgolint で 2 度作り、メモリはそのぶん増える。
|
|
85
72
|
|
package/dist/drizzle.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as UpstreamPlugin } from "./
|
|
2
|
-
type ConfigName = "all" | "recommended";
|
|
1
|
+
import { t as UpstreamPlugin } from "./index-D1qDt581.mjs";
|
|
2
|
+
export type ConfigName = "all" | "recommended";
|
|
3
3
|
declare const plugin: UpstreamPlugin<ConfigName>;
|
|
4
|
-
export {
|
|
4
|
+
export { plugin as default };
|
|
5
5
|
//# sourceMappingURL=drizzle.d.mts.map
|
package/dist/drizzle.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toCommonJS, t as __commonJSMin } from "./rolldown-runtime-DQp2zzRu.mjs";
|
|
2
|
-
import { i as typescript_eslint_utils_exports, r as init_typescript_eslint_utils } from "./typescript-eslint-utils-
|
|
3
|
-
import { n as upstreamPlugin, t as plainRules } from "./upstream-plugin-
|
|
2
|
+
import { i as typescript_eslint_utils_exports, r as init_typescript_eslint_utils } from "./typescript-eslint-utils-BMYUCcJU.mjs";
|
|
3
|
+
import { n as upstreamPlugin, t as plainRules } from "./upstream-plugin-D4Lz9A1H.mjs";
|
|
4
4
|
// ../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/package.json
|
|
5
5
|
var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
6
|
module.exports = {
|
|
@@ -198,7 +198,7 @@ var require_enforce_update_with_where = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
}));
|
|
201
|
-
// src/drizzle.ts
|
|
201
|
+
// src/app/drizzle.ts
|
|
202
202
|
var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
203
203
|
var __importDefault = this$1 && this$1.__importDefault || function(mod) {
|
|
204
204
|
return mod && mod.__esModule ? mod : { "default": mod };
|
package/dist/drizzle.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.mjs","names":[],"sources":["../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/package.json","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/configs/all.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/configs/recommended.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/utils/ast.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/utils/options.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/enforce-delete-with-where.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/enforce-update-with-where.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/index.js","../src/drizzle.ts"],"sourcesContent":["","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n env: {\n es2024: true,\n },\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n plugins: ['drizzle'],\n rules: {\n 'drizzle/enforce-delete-with-where': 'error',\n 'drizzle/enforce-update-with-where': 'error',\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n env: {\n es2024: true,\n },\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n plugins: ['drizzle'],\n rules: {\n 'drizzle/enforce-delete-with-where': 'error',\n 'drizzle/enforce-update-with-where': 'error',\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveMemberExpressionPath = void 0;\nconst resolveMemberExpressionPath = (node) => {\n let objectExpression = node.object;\n let fullName = '';\n const addToFullName = (name) => {\n const prefix = fullName ? '.' : '';\n fullName = `${name}${prefix}${fullName}`;\n };\n while (objectExpression) {\n if (objectExpression.type === 'MemberExpression') {\n if (objectExpression.property.type === 'Identifier') {\n addToFullName(objectExpression.property.name);\n }\n objectExpression = objectExpression.object;\n }\n else if (objectExpression.type === 'CallExpression' && objectExpression.callee.type === 'Identifier') {\n addToFullName(`${objectExpression.callee.name}(...)`);\n break;\n }\n else if (objectExpression.type === 'CallExpression' && objectExpression.callee.type === 'MemberExpression') {\n if (objectExpression.callee.property.type === 'Identifier') {\n addToFullName(`${objectExpression.callee.property.name}(...)`);\n }\n objectExpression = objectExpression.callee.object;\n }\n else if (objectExpression.type === 'Identifier') {\n addToFullName(objectExpression.name);\n break;\n }\n else if (objectExpression.type === 'ThisExpression') {\n addToFullName('this');\n break;\n }\n else {\n break;\n }\n }\n return fullName;\n};\nexports.resolveMemberExpressionPath = resolveMemberExpressionPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isDrizzleObj = void 0;\nconst isDrizzleObjName = (name, drizzleObjectName) => {\n if (typeof drizzleObjectName === 'string') {\n return name === drizzleObjectName;\n }\n if (Array.isArray(drizzleObjectName)) {\n if (drizzleObjectName.length === 0) {\n return true;\n }\n return drizzleObjectName.includes(name);\n }\n return false;\n};\nconst isDrizzleObj = (node, options) => {\n const drizzleObjectName = options[0].drizzleObjectName;\n if (node.object.type === 'Identifier') {\n return isDrizzleObjName(node.object.name, drizzleObjectName);\n }\n else if (node.object.type === 'MemberExpression' && node.object.property.type === 'Identifier') {\n return isDrizzleObjName(node.object.property.name, drizzleObjectName);\n }\n else if (node.object.type === 'CallExpression') {\n if (node.object.callee.type === 'Identifier') {\n return isDrizzleObjName(node.object.callee.name, drizzleObjectName);\n }\n else if (node.object.callee.type === 'MemberExpression' && node.object.callee.property.type === 'Identifier') {\n return isDrizzleObjName(node.object.callee.property.name, drizzleObjectName);\n }\n }\n return false;\n};\nexports.isDrizzleObj = isDrizzleObj;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"@typescript-eslint/utils\");\nconst ast_1 = require(\"./utils/ast\");\nconst options_1 = require(\"./utils/options\");\nconst createRule = utils_1.ESLintUtils.RuleCreator(() => 'https://github.com/drizzle-team/eslint-plugin-drizzle');\nlet lastNodeName = '';\nconst deleteRule = createRule({\n defaultOptions: [{ drizzleObjectName: [] }],\n name: 'enforce-delete-with-where',\n meta: {\n type: 'problem',\n docs: {\n description: 'Enforce that `delete` method is used with `where` to avoid deleting all the rows in a table.',\n },\n fixable: 'code',\n messages: {\n enforceDeleteWithWhere: \"Without `.where(...)` you will delete all the rows in a table. If you didn't want to do it, please use `{{ drizzleObjName }}.delete(...).where(...)` instead. Otherwise you can ignore this rule here\",\n },\n schema: [{\n type: 'object',\n properties: {\n drizzleObjectName: {\n type: ['string', 'array'],\n },\n },\n additionalProperties: false,\n }],\n },\n create(context, options) {\n return {\n MemberExpression: (node) => {\n if (node.property.type === 'Identifier') {\n if (node.property.name === 'delete' && lastNodeName !== 'where' && (0, options_1.isDrizzleObj)(node, options)) {\n context.report({\n node,\n messageId: 'enforceDeleteWithWhere',\n data: {\n drizzleObjName: (0, ast_1.resolveMemberExpressionPath)(node),\n },\n });\n }\n lastNodeName = node.property.name;\n }\n return;\n },\n };\n },\n});\nexports.default = deleteRule;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"@typescript-eslint/utils\");\nconst ast_1 = require(\"./utils/ast\");\nconst options_1 = require(\"./utils/options\");\nconst createRule = utils_1.ESLintUtils.RuleCreator(() => 'https://github.com/drizzle-team/eslint-plugin-drizzle');\nlet lastNodeName = '';\nconst updateRule = createRule({\n defaultOptions: [{ drizzleObjectName: [] }],\n name: 'enforce-update-with-where',\n meta: {\n type: 'problem',\n docs: {\n description: 'Enforce that `update` method is used with `where` to avoid deleting all the rows in a table.',\n },\n fixable: 'code',\n messages: {\n enforceUpdateWithWhere: \"Without `.where(...)` you will update all the rows in a table. If you didn't want to do it, please use `{{ drizzleObjName }}.update(...).set(...).where(...)` instead. Otherwise you can ignore this rule here\",\n },\n schema: [{\n type: 'object',\n properties: {\n drizzleObjectName: {\n type: ['string', 'array'],\n },\n },\n additionalProperties: false,\n }],\n },\n create(context, options) {\n return {\n MemberExpression: (node) => {\n if (node.property.type === 'Identifier') {\n if (lastNodeName !== 'where'\n && node.property.name === 'set'\n && node.object.type === 'CallExpression'\n && node.object.callee.type === 'MemberExpression'\n && node.object.callee.property.type === 'Identifier'\n && node.object.callee.property.name === 'update'\n && (0, options_1.isDrizzleObj)(node.object.callee, options)) {\n context.report({\n node,\n messageId: 'enforceUpdateWithWhere',\n data: {\n drizzleObjName: (0, ast_1.resolveMemberExpressionPath)(node.object.callee),\n },\n });\n }\n lastNodeName = node.property.name;\n }\n return;\n },\n };\n },\n});\nexports.default = updateRule;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.meta = exports.configs = exports.rules = void 0;\nconst package_json_1 = require(\"../package.json\");\nconst all_1 = __importDefault(require(\"./configs/all\"));\nconst recommended_1 = __importDefault(require(\"./configs/recommended\"));\nconst enforce_delete_with_where_1 = __importDefault(require(\"./enforce-delete-with-where\"));\nconst enforce_update_with_where_1 = __importDefault(require(\"./enforce-update-with-where\"));\nexports.rules = {\n 'enforce-delete-with-where': enforce_delete_with_where_1.default,\n 'enforce-update-with-where': enforce_update_with_where_1.default,\n};\nexports.configs = { all: all_1.default, recommended: recommended_1.default };\nexports.meta = { name: package_json_1.name, version: package_json_1.version };\n","import { configs, rules } from \"eslint-plugin-drizzle\";\n\nimport { plainRules, upstreamPlugin } from \"./upstream-plugin.ts\";\nimport type { UpstreamPlugin } from \"./upstream-plugin.ts\";\n\ntype ConfigName = \"all\" | \"recommended\";\n\nconst plugin: UpstreamPlugin<ConfigName> = upstreamPlugin(\n \"drizzle\",\n { configs, rules },\n plainRules,\n);\n\nexport type { ConfigName };\nexport default plugin;\n"],"ignoreList":[0,1,2,3,4,5,6,7],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCCA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,UAAU;EACd,KAAK,EACD,QAAQ,KACZ;EACA,eAAe;GACX,aAAa;GACb,YAAY;EAChB;EACA,SAAS,CAAC,SAAS;EACnB,OAAO;GACH,qC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AAc,KAAK,OAAO,QAAQ,OAAO,GAC1D,QAAQ,OAAO;MACX;MACA,WAAW;MACX,MAAM,EACF,iBAAiB,GAAG,MAAM,4BAAA,CAA6B,KAAK,OAAO,MAAM,EAC7E;KACJ,CAAC;KAEL,eAAe,KAAK,SAAS;IACjC;GAEJ,EACJ;EACJ;CACJ,CACkB;;;;CCtDlB,IAAI,kBAAA,UAAA,OAAgC,mBAAoB,SAAU,KAAK;EACnE,OAAQ,OAAO,IAAI,aAAc,MAAM,EAAE,WAAW,IAAI;CAC5D;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,OAAO,QAAQ,UAAU,QAAQ,QAAQ,KAAK;CACtD,MAAM,iBAAA,gBAAA;CACN,MAAM,QAAQ,gBAAA,YAAA,CAAwC;CACtD,MAAM,gBAAgB,gBAAA,oBAAA,CAAgD;CACtE,MAAM,8BAA8B,gBAAA,kCAAA,CAAsD;CAC1F,MAAM,8BAA8B,gBAAA,kCAAA,CAAsD;CAC1F,QAAQ,QAAQ;EACZ,6BAA6B,4BAA4B;EACzD,6BAA6B,4BAA4B;CAC7D;CACA,QAAQ,UAAU;EAAE,KAAK,MAAM;EAAS,aAAa,cAAc;CAAQ;CAC3E,QAAQ,OAAO;EAAE,MAAM,eAAe;EAAM,SAAS,eAAe;CAAQ;;ACT5E,MAAM,SAAqC,eACzC,WACA;CAAE,SAAA,WAAA;CAAS,OAAA,WAAA;AAAM,GACjB,UACF"}
|
|
1
|
+
{"version":3,"file":"drizzle.mjs","names":[],"sources":["../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/package.json","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/configs/all.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/configs/recommended.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/utils/ast.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/utils/options.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/enforce-delete-with-where.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/enforce-update-with-where.js","../../../node_modules/.pnpm/eslint-plugin-drizzle@0.2.3_patch_hash=970a4ab095ef16d6b77ccac81c31e17b85e1423d06ec977b_db324cd083eb061c53d9564a15258730/node_modules/eslint-plugin-drizzle/src/index.js","../src/app/drizzle.ts"],"sourcesContent":["","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n env: {\n es2024: true,\n },\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n plugins: ['drizzle'],\n rules: {\n 'drizzle/enforce-delete-with-where': 'error',\n 'drizzle/enforce-update-with-where': 'error',\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n env: {\n es2024: true,\n },\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n plugins: ['drizzle'],\n rules: {\n 'drizzle/enforce-delete-with-where': 'error',\n 'drizzle/enforce-update-with-where': 'error',\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveMemberExpressionPath = void 0;\nconst resolveMemberExpressionPath = (node) => {\n let objectExpression = node.object;\n let fullName = '';\n const addToFullName = (name) => {\n const prefix = fullName ? '.' : '';\n fullName = `${name}${prefix}${fullName}`;\n };\n while (objectExpression) {\n if (objectExpression.type === 'MemberExpression') {\n if (objectExpression.property.type === 'Identifier') {\n addToFullName(objectExpression.property.name);\n }\n objectExpression = objectExpression.object;\n }\n else if (objectExpression.type === 'CallExpression' && objectExpression.callee.type === 'Identifier') {\n addToFullName(`${objectExpression.callee.name}(...)`);\n break;\n }\n else if (objectExpression.type === 'CallExpression' && objectExpression.callee.type === 'MemberExpression') {\n if (objectExpression.callee.property.type === 'Identifier') {\n addToFullName(`${objectExpression.callee.property.name}(...)`);\n }\n objectExpression = objectExpression.callee.object;\n }\n else if (objectExpression.type === 'Identifier') {\n addToFullName(objectExpression.name);\n break;\n }\n else if (objectExpression.type === 'ThisExpression') {\n addToFullName('this');\n break;\n }\n else {\n break;\n }\n }\n return fullName;\n};\nexports.resolveMemberExpressionPath = resolveMemberExpressionPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isDrizzleObj = void 0;\nconst isDrizzleObjName = (name, drizzleObjectName) => {\n if (typeof drizzleObjectName === 'string') {\n return name === drizzleObjectName;\n }\n if (Array.isArray(drizzleObjectName)) {\n if (drizzleObjectName.length === 0) {\n return true;\n }\n return drizzleObjectName.includes(name);\n }\n return false;\n};\nconst isDrizzleObj = (node, options) => {\n const drizzleObjectName = options[0].drizzleObjectName;\n if (node.object.type === 'Identifier') {\n return isDrizzleObjName(node.object.name, drizzleObjectName);\n }\n else if (node.object.type === 'MemberExpression' && node.object.property.type === 'Identifier') {\n return isDrizzleObjName(node.object.property.name, drizzleObjectName);\n }\n else if (node.object.type === 'CallExpression') {\n if (node.object.callee.type === 'Identifier') {\n return isDrizzleObjName(node.object.callee.name, drizzleObjectName);\n }\n else if (node.object.callee.type === 'MemberExpression' && node.object.callee.property.type === 'Identifier') {\n return isDrizzleObjName(node.object.callee.property.name, drizzleObjectName);\n }\n }\n return false;\n};\nexports.isDrizzleObj = isDrizzleObj;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"@typescript-eslint/utils\");\nconst ast_1 = require(\"./utils/ast\");\nconst options_1 = require(\"./utils/options\");\nconst createRule = utils_1.ESLintUtils.RuleCreator(() => 'https://github.com/drizzle-team/eslint-plugin-drizzle');\nlet lastNodeName = '';\nconst deleteRule = createRule({\n defaultOptions: [{ drizzleObjectName: [] }],\n name: 'enforce-delete-with-where',\n meta: {\n type: 'problem',\n docs: {\n description: 'Enforce that `delete` method is used with `where` to avoid deleting all the rows in a table.',\n },\n fixable: 'code',\n messages: {\n enforceDeleteWithWhere: \"Without `.where(...)` you will delete all the rows in a table. If you didn't want to do it, please use `{{ drizzleObjName }}.delete(...).where(...)` instead. Otherwise you can ignore this rule here\",\n },\n schema: [{\n type: 'object',\n properties: {\n drizzleObjectName: {\n type: ['string', 'array'],\n },\n },\n additionalProperties: false,\n }],\n },\n create(context, options) {\n return {\n MemberExpression: (node) => {\n if (node.property.type === 'Identifier') {\n if (node.property.name === 'delete' && lastNodeName !== 'where' && (0, options_1.isDrizzleObj)(node, options)) {\n context.report({\n node,\n messageId: 'enforceDeleteWithWhere',\n data: {\n drizzleObjName: (0, ast_1.resolveMemberExpressionPath)(node),\n },\n });\n }\n lastNodeName = node.property.name;\n }\n return;\n },\n };\n },\n});\nexports.default = deleteRule;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"@typescript-eslint/utils\");\nconst ast_1 = require(\"./utils/ast\");\nconst options_1 = require(\"./utils/options\");\nconst createRule = utils_1.ESLintUtils.RuleCreator(() => 'https://github.com/drizzle-team/eslint-plugin-drizzle');\nlet lastNodeName = '';\nconst updateRule = createRule({\n defaultOptions: [{ drizzleObjectName: [] }],\n name: 'enforce-update-with-where',\n meta: {\n type: 'problem',\n docs: {\n description: 'Enforce that `update` method is used with `where` to avoid deleting all the rows in a table.',\n },\n fixable: 'code',\n messages: {\n enforceUpdateWithWhere: \"Without `.where(...)` you will update all the rows in a table. If you didn't want to do it, please use `{{ drizzleObjName }}.update(...).set(...).where(...)` instead. Otherwise you can ignore this rule here\",\n },\n schema: [{\n type: 'object',\n properties: {\n drizzleObjectName: {\n type: ['string', 'array'],\n },\n },\n additionalProperties: false,\n }],\n },\n create(context, options) {\n return {\n MemberExpression: (node) => {\n if (node.property.type === 'Identifier') {\n if (lastNodeName !== 'where'\n && node.property.name === 'set'\n && node.object.type === 'CallExpression'\n && node.object.callee.type === 'MemberExpression'\n && node.object.callee.property.type === 'Identifier'\n && node.object.callee.property.name === 'update'\n && (0, options_1.isDrizzleObj)(node.object.callee, options)) {\n context.report({\n node,\n messageId: 'enforceUpdateWithWhere',\n data: {\n drizzleObjName: (0, ast_1.resolveMemberExpressionPath)(node.object.callee),\n },\n });\n }\n lastNodeName = node.property.name;\n }\n return;\n },\n };\n },\n});\nexports.default = updateRule;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.meta = exports.configs = exports.rules = void 0;\nconst package_json_1 = require(\"../package.json\");\nconst all_1 = __importDefault(require(\"./configs/all\"));\nconst recommended_1 = __importDefault(require(\"./configs/recommended\"));\nconst enforce_delete_with_where_1 = __importDefault(require(\"./enforce-delete-with-where\"));\nconst enforce_update_with_where_1 = __importDefault(require(\"./enforce-update-with-where\"));\nexports.rules = {\n 'enforce-delete-with-where': enforce_delete_with_where_1.default,\n 'enforce-update-with-where': enforce_update_with_where_1.default,\n};\nexports.configs = { all: all_1.default, recommended: recommended_1.default };\nexports.meta = { name: package_json_1.name, version: package_json_1.version };\n","import { configs, rules } from \"eslint-plugin-drizzle\";\n\nimport { plainRules, upstreamPlugin } from \"#/entities/upstream-plugin/index.ts\";\nimport type { UpstreamPlugin } from \"#/entities/upstream-plugin/index.ts\";\n\nexport type ConfigName = \"all\" | \"recommended\";\n\nconst plugin: UpstreamPlugin<ConfigName> = upstreamPlugin(\n \"drizzle\",\n { configs, rules },\n plainRules,\n);\n\nexport default plugin;\n"],"ignoreList":[0,1,2,3,4,5,6,7],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCCA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,UAAU;EACd,KAAK,EACD,QAAQ,KACZ;EACA,eAAe;GACX,aAAa;GACb,YAAY;EAChB;EACA,SAAS,CAAC,SAAS;EACnB,OAAO;GACH,qCAAqC;GACrC,qCAAqC;EACzC;CACJ;;;;CCdA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,UAAU;EACd,KAAK,EACD,QAAQ,KACZ;EACA,eAAe;GACX,aAAa;GACb,YAAY;EAChB;EACA,SAAS,CAAC,SAAS;EACnB,OAAO;GACH,qCAAqC;GACrC,qCAAqC;EACzC;CACJ;;;;CCdA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,8BAA8B,KAAK;CAC3C,MAAM,+BAA+B,SAAS;EAC1C,IAAI,mBAAmB,KAAK;EAC5B,IAAI,WAAW;EACf,MAAM,iBAAiB,SAAS;GAE5B,WAAW,GAAG,OADC,WAAW,MAAM,KACF;EAClC;EACA,OAAO,kBACH,IAAI,iBAAiB,SAAS,oBAAoB;GAC9C,IAAI,iBAAiB,SAAS,SAAS,cACnC,cAAc,iBAAiB,SAAS,IAAI;GAEhD,mBAAmB,iBAAiB;EACxC,OACK,IAAI,iBAAiB,SAAS,oBAAoB,iBA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BAA6B,4BAA4B;EACzD,6BAA6B,4BAA4B;CAC7D;CACA,QAAQ,UAAU;EAAE,KAAK,MAAM;EAAS,aAAa,cAAc;CAAQ;CAC3E,QAAQ,OAAO;EAAE,MAAM,eAAe;EAAM,SAAS,eAAe;CAAQ;;ACT5E,MAAM,SAAqC,eACzC,WACA;CAAE,SAAA,WAAA;CAAS,OAAA,WAAA;AAAM,GACjB,UACF"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Record, Schema } from "effect";
|
|
1
|
+
import { Option, Record as Record$1, Schema } from "effect";
|
|
2
2
|
import { CreateRule, Plugin } from "vite-plus/lint/plugins";
|
|
3
3
|
declare const Severities: Schema.Literals<readonly ["error", "warn", "off"]>;
|
|
4
4
|
type Severity = typeof Severities.Type;
|
|
5
5
|
interface Config {
|
|
6
|
-
readonly rules?: Readonly<Record<string, Severity>> | undefined;
|
|
6
|
+
readonly rules?: Readonly<Record$1<string, Severity>> | undefined;
|
|
7
7
|
}
|
|
8
8
|
type UpstreamPlugin<ConfigName extends string> = Plugin & {
|
|
9
9
|
readonly meta: {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
};
|
|
12
|
-
readonly configs: Readonly<Record<ConfigName, Config>>;
|
|
12
|
+
readonly configs: Readonly<Record$1<ConfigName, Config>>;
|
|
13
13
|
};
|
|
14
14
|
export { UpstreamPlugin as t };
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=index-D1qDt581.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Record } from "effect";
|
|
2
|
-
import { Node, SourceFile } from "typescript/ast";
|
|
3
2
|
import { CompilerOptions, Project, Signature, Symbol, SymbolFlags, Type, TypeFlags } from "typescript/sync";
|
|
3
|
+
import { Node, SourceFile } from "typescript/ast";
|
|
4
4
|
import { Context, CreateRule, Location, Range, RuleMeta, Visitor } from "vite-plus/lint/plugins";
|
|
5
5
|
interface LegacySymbol {
|
|
6
6
|
readonly getName: () => string;
|
|
@@ -102,7 +102,7 @@ interface TypedRule {
|
|
|
102
102
|
readonly meta: RuleMeta;
|
|
103
103
|
readonly create: (context: TypedContext) => Visitor;
|
|
104
104
|
}
|
|
105
|
-
declare const withTypeInformation: (rule: TypedRule) => CreateRule;
|
|
106
|
-
declare const typedRules: (rules: Record.ReadonlyRecord<string, unknown>) => Record.ReadonlyRecord<string, CreateRule>;
|
|
107
|
-
export {
|
|
105
|
+
export declare const withTypeInformation: (rule: TypedRule) => CreateRule;
|
|
106
|
+
export declare const typedRules: (rules: Record.ReadonlyRecord<string, unknown>) => Record.ReadonlyRecord<string, CreateRule>;
|
|
107
|
+
export type { ParserServices, TypedContext, TypedRule };
|
|
108
108
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as typedRules, a as withTypeInformation } from "./typed-rule-
|
|
1
|
+
export { r as typedRules, a as withTypeInformation } from "./typed-rule-DFpV2XgE.mjs";
|
package/dist/react.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Record } from "effect";
|
|
2
2
|
import { Plugin } from "vite-plus/lint/plugins";
|
|
3
|
-
interface Config {
|
|
3
|
+
export interface Config {
|
|
4
4
|
readonly rules?: Readonly<Record<string, unknown>> | undefined;
|
|
5
5
|
}
|
|
6
|
-
type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-experimental" | "disable-jsx" | "disable-naming-convention" | "disable-rsc" | "disable-type-checked" | "disable-web-api" | "dom" | "jsx" | "naming-convention" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "rsc" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x";
|
|
7
|
-
type Configs = Readonly<Record<ConfigName, Config>>;
|
|
8
|
-
type ReactPlugin = Plugin & {
|
|
6
|
+
export type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-experimental" | "disable-jsx" | "disable-naming-convention" | "disable-rsc" | "disable-type-checked" | "disable-web-api" | "dom" | "jsx" | "naming-convention" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "rsc" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x";
|
|
7
|
+
export type Configs = Readonly<Record<ConfigName, Config>>;
|
|
8
|
+
export type ReactPlugin = Plugin & {
|
|
9
9
|
readonly meta: {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
};
|
|
12
12
|
readonly configs: Configs;
|
|
13
13
|
};
|
|
14
14
|
declare const plugin: ReactPlugin;
|
|
15
|
-
export {
|
|
15
|
+
export { plugin as default };
|
|
16
16
|
//# sourceMappingURL=react.d.mts.map
|