eslint-plugin-ore-ui 1.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.
- package/Changelog.md +3 -0
- package/LICENSE +21 -0
- package/README.md +604 -0
- package/dist/index.cjs +121 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +274 -0
- package/dist/rules/no-bugged.cjs +621 -0
- package/dist/rules/no-bugged.cjs.map +1 -0
- package/dist/rules/no-bugged.d.cts +9 -0
- package/dist/rules/no-critically-bugged.cjs +623 -0
- package/dist/rules/no-critically-bugged.cjs.map +1 -0
- package/dist/rules/no-critically-bugged.d.cts +9 -0
- package/dist/rules/no-illegal-constructors.cjs +516 -0
- package/dist/rules/no-illegal-constructors.cjs.map +1 -0
- package/dist/rules/no-illegal-constructors.d.cts +9 -0
- package/dist/rules/no-regex-unicode-properties.cjs +34 -0
- package/dist/rules/no-regex-unicode-properties.cjs.map +1 -0
- package/dist/rules/no-regex-unicode-properties.d.cts +17 -0
- package/dist/rules/no-regex-v-flag.cjs +26 -0
- package/dist/rules/no-regex-v-flag.cjs.map +1 -0
- package/dist/rules/no-regex-v-flag.d.cts +17 -0
- package/dist/rules/no-using-keyword.cjs +57 -0
- package/dist/rules/no-using-keyword.cjs.map +1 -0
- package/dist/rules/no-using-keyword.d.cts +35 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-regex-unicode-properties.cjs","sourceRoot":"","sources":["../../src/rules/no-regex-unicode-properties.cts"],"names":[],"mappings":";AAEA,iBAAS;IACL,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACF,WAAW,EAAE,yCAAyC;YACtD,WAAW,EAAE,IAAI;SACpB;QACD,QAAQ,EAAE;YACN,qCAAqC,EACjC,sIAAsI;SAC7I;KACJ;IACD,IAAI;IACJ,oGAAoG;IACpG,wJAAwJ;IACxJ,IAAI;IACJ,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO,CAAC,IAAI;gBACR,IACI,OAAO,IAAI,IAAI;oBACf,IAAI,CAAC,KAAK,EAAE,OAAO;oBACnB,IAAI,CAAC,KAAK,EAAE,KAAK;oBACjB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC7B,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EACrD,CAAC;oBACC,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI;wBACJ,SAAS,EAAE,uCAAuC;qBACrD,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;CACsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Rule } from "eslint";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
meta: {
|
|
4
|
+
type: "problem";
|
|
5
|
+
docs: {
|
|
6
|
+
description: string;
|
|
7
|
+
recommended: boolean;
|
|
8
|
+
};
|
|
9
|
+
messages: {
|
|
10
|
+
noSupportedUnicodePropertyIdentifiers: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
create(context: Rule.RuleContext): {
|
|
14
|
+
Literal(node: (import("estree").SimpleLiteral & Rule.NodeParentExtension) | (import("estree").RegExpLiteral & Rule.NodeParentExtension) | (import("estree").BigIntLiteral & Rule.NodeParentExtension)): void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
meta: {
|
|
4
|
+
type: "problem",
|
|
5
|
+
docs: {
|
|
6
|
+
description: "Disallow the `v` regex flag",
|
|
7
|
+
recommended: true,
|
|
8
|
+
},
|
|
9
|
+
messages: {
|
|
10
|
+
regexVFlagUnsupported: "The `v` regex flag is not supported by CoHTML (Ore UI).",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
create(context) {
|
|
14
|
+
return {
|
|
15
|
+
Literal(node) {
|
|
16
|
+
if ("regex" in node && node.regex?.flags?.includes("v")) {
|
|
17
|
+
context.report({
|
|
18
|
+
node,
|
|
19
|
+
messageId: "regexVFlagUnsupported",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=no-regex-v-flag.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-regex-v-flag.cjs","sourceRoot":"","sources":["../../src/rules/no-regex-v-flag.cts"],"names":[],"mappings":";AAEA,iBAAS;IACL,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACF,WAAW,EAAE,6BAA6B;YAC1C,WAAW,EAAE,IAAI;SACpB;QACD,QAAQ,EAAE;YACN,qBAAqB,EAAE,yDAAyD;SACnF;KACJ;IACD,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO,CAAC,IAAI;gBACR,IAAI,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;oBACtD,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI;wBACJ,SAAS,EAAE,uBAAuB;qBACrC,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;CACsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Rule } from "eslint";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
meta: {
|
|
4
|
+
type: "problem";
|
|
5
|
+
docs: {
|
|
6
|
+
description: string;
|
|
7
|
+
recommended: boolean;
|
|
8
|
+
};
|
|
9
|
+
messages: {
|
|
10
|
+
regexVFlagUnsupported: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
create(context: Rule.RuleContext): {
|
|
14
|
+
Literal(node: (import("estree").SimpleLiteral & Rule.NodeParentExtension) | (import("estree").RegExpLiteral & Rule.NodeParentExtension) | (import("estree").BigIntLiteral & Rule.NodeParentExtension)): void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
meta: {
|
|
4
|
+
type: "problem",
|
|
5
|
+
docs: {
|
|
6
|
+
description: "Disallow the `using` keyword",
|
|
7
|
+
recommended: true,
|
|
8
|
+
},
|
|
9
|
+
schema: [
|
|
10
|
+
{
|
|
11
|
+
type: "object",
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
properties: {
|
|
14
|
+
allow: {
|
|
15
|
+
type: "array",
|
|
16
|
+
items: { type: "string", enum: ["using", "await using"] },
|
|
17
|
+
description: "Types of using variable declarations that can be allowed. Should be one of `using` or `await using`. Defaults to an empty array.",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
defaultOptions: [
|
|
23
|
+
{
|
|
24
|
+
allow: [],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
messages: {
|
|
28
|
+
usingKeywordUnsupported: "The `using` keyword is not supported by CoHTML (Ore UI).",
|
|
29
|
+
awaitUsingVariableDeclarationsUnsupported: "`await using` variable declarations are not supported by CoHTML (Ore UI).",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
create(context) {
|
|
33
|
+
const allowUsing = context.options[0]?.allow?.includes("using") ?? false;
|
|
34
|
+
const allowAwaitUsing = context.options[0]?.allow?.includes("await using") ?? false;
|
|
35
|
+
return {
|
|
36
|
+
VariableDeclaration(node) {
|
|
37
|
+
if (node.kind === "using") {
|
|
38
|
+
if (allowUsing)
|
|
39
|
+
return;
|
|
40
|
+
context.report({
|
|
41
|
+
node,
|
|
42
|
+
messageId: "usingKeywordUnsupported",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
else if (node.kind === "await using") {
|
|
46
|
+
if (allowAwaitUsing)
|
|
47
|
+
return;
|
|
48
|
+
context.report({
|
|
49
|
+
node,
|
|
50
|
+
messageId: "awaitUsingVariableDeclarationsUnsupported",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=no-using-keyword.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-using-keyword.cjs","sourceRoot":"","sources":["../../src/rules/no-using-keyword.cts"],"names":[],"mappings":";AASA,iBAAS;IACL,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACF,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EAAE,IAAI;SACpB;QACD,MAAM,EAAE;YACJ;gBACI,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACR,KAAK,EAAE;wBACH,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,EAAE;wBACzD,WAAW,EACP,kIAAkI;qBACzI;iBACJ;aACJ;SACJ;QACD,cAAc,EAAE;YACZ;gBACI,KAAK,EAAE,EAAE;aACZ;SACJ;QACD,QAAQ,EAAE;YACN,uBAAuB,EAAE,0DAA0D;YACnF,yCAAyC,EAAE,2EAA2E;SACzH;KACJ;IACD,MAAM,CAAC,OAAO;QACV,MAAM,UAAU,GAAa,OAAO,CAAC,OAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC;QAC/F,MAAM,eAAe,GAAa,OAAO,CAAC,OAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC;QAC1G,OAAO;YACH,mBAAmB,CAAC,IAAI;gBACpB,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;oBACxB,IAAI,UAAU;wBAAE,OAAO;oBACvB,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI;wBACJ,SAAS,EAAE,yBAAyB;qBACvC,CAAC,CAAC;gBACP,CAAC;qBAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oBACrC,IAAI,eAAe;wBAAE,OAAO;oBAC5B,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI;wBACJ,SAAS,EAAE,2CAA2C;qBACzD,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;CACsB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Rule } from "eslint";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
meta: {
|
|
4
|
+
type: "problem";
|
|
5
|
+
docs: {
|
|
6
|
+
description: string;
|
|
7
|
+
recommended: boolean;
|
|
8
|
+
};
|
|
9
|
+
schema: {
|
|
10
|
+
type: "object";
|
|
11
|
+
additionalProperties: false;
|
|
12
|
+
properties: {
|
|
13
|
+
allow: {
|
|
14
|
+
type: "array";
|
|
15
|
+
items: {
|
|
16
|
+
type: "string";
|
|
17
|
+
enum: string[];
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
defaultOptions: {
|
|
24
|
+
allow: never[];
|
|
25
|
+
}[];
|
|
26
|
+
messages: {
|
|
27
|
+
usingKeywordUnsupported: string;
|
|
28
|
+
awaitUsingVariableDeclarationsUnsupported: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
create(context: Rule.RuleContext): {
|
|
32
|
+
VariableDeclaration(node: import("estree").VariableDeclaration & Rule.NodeParentExtension): void;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export = _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eslint-plugin-ore-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "An ESLint plugin to be used on Minecraft Bedrock Edition Ore UI scripts.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Ore UI",
|
|
7
|
+
"ore ui",
|
|
8
|
+
"OreUI",
|
|
9
|
+
"oreui",
|
|
10
|
+
"Minecraft",
|
|
11
|
+
"minecraft",
|
|
12
|
+
"MCBE",
|
|
13
|
+
"mcbe",
|
|
14
|
+
"MC",
|
|
15
|
+
"Coherent",
|
|
16
|
+
"coherent",
|
|
17
|
+
"Coherent Gameface",
|
|
18
|
+
"coherent gameface",
|
|
19
|
+
"Gameface",
|
|
20
|
+
"gameface",
|
|
21
|
+
"CoHTML",
|
|
22
|
+
"Cohtml",
|
|
23
|
+
"coHTML",
|
|
24
|
+
"cohtml",
|
|
25
|
+
"ESLint",
|
|
26
|
+
"eslint",
|
|
27
|
+
"plugin"
|
|
28
|
+
],
|
|
29
|
+
"homepage": "https://github.com/8Crafter-Studios/Ore-UI-Utils.eslint-plugin-ore-ui#readme",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"email": "8crafteryt@gmail.com",
|
|
32
|
+
"url": "https://github.com/8Crafter-Studios/Ore-UI-Utils.eslint-plugin-ore-ui/issues"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/8Crafter-Studios/Ore-UI-Utils.eslint-plugin-ore-ui.git"
|
|
37
|
+
},
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"author": {
|
|
40
|
+
"email": "8crafteryt@gmail.com",
|
|
41
|
+
"name": "8Crafter",
|
|
42
|
+
"url": "https://www.8crafter.com"
|
|
43
|
+
},
|
|
44
|
+
"directories": {
|
|
45
|
+
"lib": "dist",
|
|
46
|
+
"src": "src"
|
|
47
|
+
},
|
|
48
|
+
"type": "commonjs",
|
|
49
|
+
"main": "./index.cjs",
|
|
50
|
+
"types": "./index.d.ts",
|
|
51
|
+
"exports": {
|
|
52
|
+
".": {
|
|
53
|
+
"types": "./dist/index.d.cts",
|
|
54
|
+
"default": "./dist/index.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./packge.json": "./package.json",
|
|
57
|
+
"./*": {
|
|
58
|
+
"types": "./dist/*.d.cts",
|
|
59
|
+
"default": "./dist/*.cjs"
|
|
60
|
+
},
|
|
61
|
+
"./*.cjs": {
|
|
62
|
+
"types": "./dist/*.d.cts",
|
|
63
|
+
"default": "./dist/*.cjs"
|
|
64
|
+
},
|
|
65
|
+
"./*.d.cts": "./dist/*.d.cts"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@eslint/core": "*",
|
|
69
|
+
"@typescript-eslint/type-utils": "*",
|
|
70
|
+
"@typescript-eslint/utils": "*",
|
|
71
|
+
"eslint": "*",
|
|
72
|
+
"eslint-plugin-no-import-attributes": "*",
|
|
73
|
+
"ts-api-utils": "*",
|
|
74
|
+
"typescript": "*"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@eslint/core": "^0.17.0",
|
|
78
|
+
"@eslint/js": "^9.39.2",
|
|
79
|
+
"@types/node": "18.19.52",
|
|
80
|
+
"eslint": "^9.39.2",
|
|
81
|
+
"eslint-plugin-eslint-plugin": "^7.3.0",
|
|
82
|
+
"eslint-plugin-import": "^2.32.0",
|
|
83
|
+
"globals": "^17.0.0",
|
|
84
|
+
"jiti": "^2.6.1",
|
|
85
|
+
"prettier": "^3.7.4",
|
|
86
|
+
"prettier-plugin-markdown-list-tabwidth": "^1.2.0",
|
|
87
|
+
"typescript-eslint": "^8.52.0"
|
|
88
|
+
},
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
91
|
+
},
|
|
92
|
+
"devEngines": {
|
|
93
|
+
"packageManager": {
|
|
94
|
+
"name": "npm",
|
|
95
|
+
"version": "*",
|
|
96
|
+
"onFail": "warn"
|
|
97
|
+
},
|
|
98
|
+
"runtime": {
|
|
99
|
+
"name": "node",
|
|
100
|
+
"version": "^18.18.0 || ^20.9.0 || >=21.1.0",
|
|
101
|
+
"onFail": "warn"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"scripts": {
|
|
105
|
+
"addGitTagToCommit": "node -e \"import { exec } from 'node:child_process'; import { stderr } from 'node:process'; for (const command of ['git tag v' + process.env.npm_package_version, 'git push --tags']) await new Promise((resolve, reject) => ((childProcess) => (childProcess.stdout.pipe(process.stdout), childProcess.stderr.pipe(stderr)))((console.log('> ' + command), exec(command, (error) => (error ? reject(error) : resolve())))));\"",
|
|
106
|
+
"addGitTagToCommit:bash": "git tag v$npm_package_version && git push --tags",
|
|
107
|
+
"addGitTagToCommit:cmd": "git tag v%npm_package_version% && git push --tags"
|
|
108
|
+
}
|
|
109
|
+
}
|