@conorroberts/utils 0.0.57 → 0.0.59
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/config.json +1 -2
- package/dist/oxlint/index.d.mts +7 -0
- package/dist/oxlint/index.mjs +35 -0
- package/dist/oxlint/index.mjs.map +1 -0
- package/dist/oxlint/jsx-component-pascal-case.d.mts +7 -7
- package/dist/oxlint/no-component-date-instantiation.d.mts +7 -7
- package/dist/oxlint/no-emoji.d.mts +3 -3
- package/dist/oxlint/no-finally.d.mts +3 -3
- package/dist/oxlint/no-function-call-in-jsx.d.mts +6 -6
- package/dist/oxlint/no-inline-components.d.mts +10 -10
- package/dist/oxlint/no-react-namespace.d.mts +3 -3
- package/dist/oxlint/no-switch-plugin.d.mts +3 -3
- package/dist/oxlint/no-top-level-let.d.mts +3 -3
- package/dist/oxlint/no-type-cast.d.mts +3 -3
- package/dist/oxlint/pretty-props.d.mts +6 -6
- package/package.json +5 -1
package/dist/oxlint/config.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxComponentPascalCaseRule } from "./jsx-component-pascal-case.mjs";
|
|
2
|
+
import { noComponentDateInstantiationRule } from "./no-component-date-instantiation.mjs";
|
|
3
|
+
import { noEmojiRule } from "./no-emoji.mjs";
|
|
4
|
+
import { noFinallyRule } from "./no-finally.mjs";
|
|
5
|
+
import { noFunctionCallInJsxRule } from "./no-function-call-in-jsx.mjs";
|
|
6
|
+
import { noInlineComponentsRule } from "./no-inline-components.mjs";
|
|
7
|
+
import { noReactNamespaceRule } from "./no-react-namespace.mjs";
|
|
8
|
+
import { noSwitchRule } from "./no-switch-plugin.mjs";
|
|
9
|
+
import { noTopLevelLetRule } from "./no-top-level-let.mjs";
|
|
10
|
+
import { noTypeCastRule } from "./no-type-cast.mjs";
|
|
11
|
+
import { prettyPropsRule } from "./pretty-props.mjs";
|
|
12
|
+
import { definePlugin } from "oxlint";
|
|
13
|
+
|
|
14
|
+
//#region src/oxlint-plugins/index.js
|
|
15
|
+
const plugin = definePlugin({
|
|
16
|
+
meta: { name: "conorroberts" },
|
|
17
|
+
rules: {
|
|
18
|
+
"jsx-component-pascal-case": jsxComponentPascalCaseRule,
|
|
19
|
+
"no-component-date-instantiation": noComponentDateInstantiationRule,
|
|
20
|
+
"no-emoji": noEmojiRule,
|
|
21
|
+
"no-finally": noFinallyRule,
|
|
22
|
+
"no-function-call-in-jsx": noFunctionCallInJsxRule,
|
|
23
|
+
"no-inline-components": noInlineComponentsRule,
|
|
24
|
+
"no-react-namespace": noReactNamespaceRule,
|
|
25
|
+
"no-switch": noSwitchRule,
|
|
26
|
+
"no-top-level-let": noTopLevelLetRule,
|
|
27
|
+
"no-type-cast": noTypeCastRule,
|
|
28
|
+
"pretty-props": prettyPropsRule
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var oxlint_plugins_default = plugin;
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { oxlint_plugins_default as default };
|
|
35
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/oxlint-plugins/index.js"],"sourcesContent":["import { definePlugin } from \"oxlint\";\n\nimport { jsxComponentPascalCaseRule } from \"./jsx-component-pascal-case.js\";\nimport { noComponentDateInstantiationRule } from \"./no-component-date-instantiation.js\";\nimport { noEmojiRule } from \"./no-emoji.js\";\nimport { noFinallyRule } from \"./no-finally.js\";\nimport { noFunctionCallInJsxRule } from \"./no-function-call-in-jsx.js\";\nimport { noInlineComponentsRule } from \"./no-inline-components.js\";\nimport { noReactNamespaceRule } from \"./no-react-namespace.js\";\nimport { noSwitchRule } from \"./no-switch-plugin.js\";\nimport { noTopLevelLetRule } from \"./no-top-level-let.js\";\nimport { noTypeCastRule } from \"./no-type-cast.js\";\nimport { prettyPropsRule } from \"./pretty-props.js\";\n\nconst plugin = definePlugin({\n meta: {\n name: \"conorroberts\",\n },\n rules: {\n \"jsx-component-pascal-case\": jsxComponentPascalCaseRule,\n \"no-component-date-instantiation\": noComponentDateInstantiationRule,\n \"no-emoji\": noEmojiRule,\n \"no-finally\": noFinallyRule,\n \"no-function-call-in-jsx\": noFunctionCallInJsxRule,\n \"no-inline-components\": noInlineComponentsRule,\n \"no-react-namespace\": noReactNamespaceRule,\n \"no-switch\": noSwitchRule,\n \"no-top-level-let\": noTopLevelLetRule,\n \"no-type-cast\": noTypeCastRule,\n \"pretty-props\": prettyPropsRule,\n },\n});\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,SAAS,aAAa;CAC1B,MAAM,EACJ,MAAM,gBACP;CACD,OAAO;EACL,6BAA6B;EAC7B,mCAAmC;EACnC,YAAY;EACZ,cAAc;EACd,2BAA2B;EAC3B,wBAAwB;EACxB,sBAAsB;EACtB,aAAa;EACb,oBAAoB;EACpB,gBAAgB;EAChB,gBAAgB;EACjB;CACF,CAAC;AAEF,6BAAe"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint6 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/jsx-component-pascal-case.d.ts
|
|
4
|
-
declare const jsxComponentPascalCaseRule:
|
|
5
|
-
type RuleContext =
|
|
6
|
-
type ESTNode =
|
|
7
|
-
type ESTExpression =
|
|
8
|
-
type ReturnStatementNode =
|
|
9
|
-
type FunctionLikeNode =
|
|
4
|
+
declare const jsxComponentPascalCaseRule: oxlint6.Rule;
|
|
5
|
+
type RuleContext = oxlint6.Context;
|
|
6
|
+
type ESTNode = oxlint6.ESTree.Node;
|
|
7
|
+
type ESTExpression = oxlint6.ESTree.Expression;
|
|
8
|
+
type ReturnStatementNode = oxlint6.ESTree.ReturnStatement;
|
|
9
|
+
type FunctionLikeNode = oxlint6.ESTree.Function | oxlint6.ESTree.ArrowFunctionExpression;
|
|
10
10
|
type FunctionContext = {
|
|
11
11
|
node: FunctionLikeNode;
|
|
12
12
|
name: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint15 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-component-date-instantiation.d.ts
|
|
4
|
-
declare const noComponentDateInstantiationRule:
|
|
5
|
-
type RuleContext =
|
|
6
|
-
type ESTNode =
|
|
7
|
-
type NewExpressionNode =
|
|
8
|
-
type ReturnStatementNode =
|
|
9
|
-
type FunctionLikeNode =
|
|
4
|
+
declare const noComponentDateInstantiationRule: oxlint15.Rule;
|
|
5
|
+
type RuleContext = oxlint15.Context;
|
|
6
|
+
type ESTNode = oxlint15.ESTree.Node;
|
|
7
|
+
type NewExpressionNode = oxlint15.ESTree.NewExpression;
|
|
8
|
+
type ReturnStatementNode = oxlint15.ESTree.ReturnStatement;
|
|
9
|
+
type FunctionLikeNode = oxlint15.ESTree.Function | oxlint15.ESTree.ArrowFunctionExpression;
|
|
10
10
|
type FunctionContext = {
|
|
11
11
|
node: FunctionLikeNode;
|
|
12
12
|
parent: FunctionContext | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint13 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-emoji.d.ts
|
|
4
|
-
declare const noEmojiRule:
|
|
5
|
-
type ESTNode =
|
|
4
|
+
declare const noEmojiRule: oxlint13.Rule;
|
|
5
|
+
type ESTNode = oxlint13.ESTree.Node;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ESTNode, noEmojiRule };
|
|
8
8
|
//# sourceMappingURL=no-emoji.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint4 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-finally.d.ts
|
|
4
|
-
declare const noFinallyRule:
|
|
5
|
-
type ESTNode =
|
|
4
|
+
declare const noFinallyRule: oxlint4.Rule;
|
|
5
|
+
type ESTNode = oxlint4.ESTree.Node;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ESTNode, noFinallyRule };
|
|
8
8
|
//# sourceMappingURL=no-finally.d.mts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint0 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-function-call-in-jsx.d.ts
|
|
4
|
-
declare const noFunctionCallInJsxRule:
|
|
5
|
-
type RuleContext =
|
|
6
|
-
type ESTNode =
|
|
7
|
-
type JSXExpressionContainer =
|
|
8
|
-
type CallExpression =
|
|
4
|
+
declare const noFunctionCallInJsxRule: oxlint0.Rule;
|
|
5
|
+
type RuleContext = oxlint0.Context;
|
|
6
|
+
type ESTNode = oxlint0.ESTree.Node;
|
|
7
|
+
type JSXExpressionContainer = oxlint0.ESTree.JSXExpressionContainer;
|
|
8
|
+
type CallExpression = oxlint0.ESTree.CallExpression;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { CallExpression, ESTNode, JSXExpressionContainer, RuleContext, noFunctionCallInJsxRule };
|
|
11
11
|
//# sourceMappingURL=no-function-call-in-jsx.d.mts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint26 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-inline-components.d.ts
|
|
4
4
|
declare function isComponentName(name: unknown): name is string;
|
|
5
5
|
declare function isHookName(name: unknown): name is string;
|
|
6
6
|
declare function getEnclosingFunction(node: ESTNode | null | undefined): FunctionLikeNode | null;
|
|
7
7
|
declare function getFunctionName(node: FunctionLikeNode): string;
|
|
8
|
-
declare const noInlineComponentsRule:
|
|
9
|
-
type RuleContext =
|
|
10
|
-
type ESTNode =
|
|
11
|
-
type ESTExpression =
|
|
12
|
-
type ESTPattern =
|
|
13
|
-
type ReturnStatementNode =
|
|
14
|
-
type VariableDeclaratorNode =
|
|
15
|
-
type AssignmentExpressionNode =
|
|
16
|
-
type FunctionLikeNode =
|
|
8
|
+
declare const noInlineComponentsRule: oxlint26.Rule;
|
|
9
|
+
type RuleContext = oxlint26.Context;
|
|
10
|
+
type ESTNode = oxlint26.ESTree.Node;
|
|
11
|
+
type ESTExpression = oxlint26.ESTree.Expression;
|
|
12
|
+
type ESTPattern = oxlint26.ESTree.Pattern;
|
|
13
|
+
type ReturnStatementNode = oxlint26.ESTree.ReturnStatement;
|
|
14
|
+
type VariableDeclaratorNode = oxlint26.ESTree.VariableDeclarator;
|
|
15
|
+
type AssignmentExpressionNode = oxlint26.ESTree.AssignmentExpression;
|
|
16
|
+
type FunctionLikeNode = oxlint26.ESTree.Function | oxlint26.ESTree.ArrowFunctionExpression;
|
|
17
17
|
type RecordedAssignment = {
|
|
18
18
|
node: ESTExpression;
|
|
19
19
|
names: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint45 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-react-namespace.d.ts
|
|
4
|
-
declare const noReactNamespaceRule:
|
|
5
|
-
type ESTNode =
|
|
4
|
+
declare const noReactNamespaceRule: oxlint45.Rule;
|
|
5
|
+
type ESTNode = oxlint45.ESTree.Node;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ESTNode, noReactNamespaceRule };
|
|
8
8
|
//# sourceMappingURL=no-react-namespace.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint24 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-switch-plugin.d.ts
|
|
4
4
|
/** @typedef {import("oxlint").ESTree.Node} ESTNode */
|
|
5
|
-
declare const noSwitchRule:
|
|
6
|
-
type ESTNode =
|
|
5
|
+
declare const noSwitchRule: oxlint24.Rule;
|
|
6
|
+
type ESTNode = oxlint24.ESTree.Node;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ESTNode, noSwitchRule };
|
|
9
9
|
//# sourceMappingURL=no-switch-plugin.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint22 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-top-level-let.d.ts
|
|
4
|
-
declare const noTopLevelLetRule:
|
|
5
|
-
type ESTNode =
|
|
4
|
+
declare const noTopLevelLetRule: oxlint22.Rule;
|
|
5
|
+
type ESTNode = oxlint22.ESTree.Node;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ESTNode, noTopLevelLetRule };
|
|
8
8
|
//# sourceMappingURL=no-top-level-let.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint36 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/no-type-cast.d.ts
|
|
4
|
-
declare const noTypeCastRule:
|
|
5
|
-
type ESTNode =
|
|
4
|
+
declare const noTypeCastRule: oxlint36.Rule;
|
|
5
|
+
type ESTNode = oxlint36.ESTree.Node;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ESTNode, noTypeCastRule };
|
|
8
8
|
//# sourceMappingURL=no-type-cast.d.mts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as oxlint38 from "oxlint";
|
|
2
2
|
|
|
3
3
|
//#region src/oxlint-plugins/pretty-props.d.ts
|
|
4
|
-
declare const prettyPropsRule:
|
|
5
|
-
type RuleContext =
|
|
6
|
-
type ESTNode =
|
|
7
|
-
type ESTExpression =
|
|
8
|
-
type FunctionLikeNode =
|
|
4
|
+
declare const prettyPropsRule: oxlint38.Rule;
|
|
5
|
+
type RuleContext = oxlint38.Context;
|
|
6
|
+
type ESTNode = oxlint38.ESTree.Node;
|
|
7
|
+
type ESTExpression = oxlint38.ESTree.Expression;
|
|
8
|
+
type FunctionLikeNode = oxlint38.ESTree.Function | oxlint38.ESTree.ArrowFunctionExpression;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { ESTExpression, ESTNode, FunctionLikeNode, RuleContext, prettyPropsRule };
|
|
11
11
|
//# sourceMappingURL=pretty-props.d.mts.map
|
package/package.json
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"./oxlint/config": {
|
|
23
23
|
"default": "./dist/oxlint/config.mjson"
|
|
24
24
|
},
|
|
25
|
+
"./oxlint": {
|
|
26
|
+
"types": "./dist/oxlint/index.d.mts",
|
|
27
|
+
"default": "./dist/oxlint/index.mjs"
|
|
28
|
+
},
|
|
25
29
|
"./oxlint/jsx-component-pascal-case": {
|
|
26
30
|
"types": "./dist/oxlint/jsx-component-pascal-case.d.mts",
|
|
27
31
|
"default": "./dist/oxlint/jsx-component-pascal-case.mjs"
|
|
@@ -90,7 +94,7 @@
|
|
|
90
94
|
"typescript": "5.9.3",
|
|
91
95
|
"vitest": "4.0.15"
|
|
92
96
|
},
|
|
93
|
-
"version": "0.0.
|
|
97
|
+
"version": "0.0.59",
|
|
94
98
|
"scripts": {
|
|
95
99
|
"dev": "tsdown --watch",
|
|
96
100
|
"build": "tsc --noEmit && tsdown",
|