@imranbarbhuiya/oxc-config 0.0.1 → 0.1.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/README.md +119 -156
- package/dist/api-error.d.ts +7 -2
- package/dist/api-error.js +6 -5
- package/dist/api-error.js.map +1 -1
- package/dist/central-icons.d.ts +7 -2
- package/dist/central-icons.js +6 -5
- package/dist/central-icons.js.map +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +523 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/common.d.ts +8 -2
- package/dist/common.js +36 -52
- package/dist/common.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.js +31 -0
- package/dist/config.js.map +1 -0
- package/dist/edge.d.ts +5 -2
- package/dist/edge.js +14 -10
- package/dist/edge.js.map +1 -1
- package/dist/i18n.d.ts +8 -2
- package/dist/i18n.js +6 -5
- package/dist/i18n.js.map +1 -1
- package/dist/jsdoc.d.ts +5 -2
- package/dist/jsdoc.js +18 -17
- package/dist/jsdoc.js.map +1 -1
- package/dist/jsx.d.ts +5 -2
- package/dist/jsx.js +24 -26
- package/dist/jsx.js.map +1 -1
- package/dist/module.d.ts +4 -2
- package/dist/module.js +6 -3
- package/dist/module.js.map +1 -1
- package/dist/native-tailwind.d.ts +7 -2
- package/dist/native-tailwind.js +6 -5
- package/dist/native-tailwind.js.map +1 -1
- package/dist/native.d.ts +51 -2
- package/dist/native.js +37 -43
- package/dist/native.js.map +1 -1
- package/dist/nest-plugin.d.ts +2 -0
- package/dist/nest-plugin.js +3 -0
- package/dist/nest.d.ts +5 -2
- package/dist/nest.js +7 -7
- package/dist/nest.js.map +1 -1
- package/dist/next.d.ts +4 -2
- package/dist/next.js +25 -25
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +8 -2
- package/dist/node.js +67 -74
- package/dist/node.js.map +1 -1
- package/dist/oxfmt.d.ts +13 -0
- package/dist/oxfmt.js +16 -0
- package/dist/oxfmt.js.map +1 -0
- package/dist/plugins/api-error.js +14 -14
- package/dist/plugins/api-error.js.map +1 -1
- package/dist/react.d.ts +14 -2
- package/dist/react.js +56 -58
- package/dist/react.js.map +1 -1
- package/dist/tailwind.d.ts +15 -2
- package/dist/tailwind.js +10 -9
- package/dist/tailwind.js.map +1 -1
- package/dist/tsdoc.d.ts +15 -2
- package/dist/tsdoc.js +14 -14
- package/dist/tsdoc.js.map +1 -1
- package/dist/typescript.d.ts +5 -2
- package/dist/typescript.js +155 -192
- package/dist/typescript.js.map +1 -1
- package/package.json +162 -178
- package/dist/mdx.d.ts +0 -6
- package/dist/mdx.js +0 -25
- package/dist/mdx.js.map +0 -1
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","names":[],"sources":["../src/module.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"module.js","names":[],"sources":["../src/module.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { nativePlugins } from './config.js';\n\nimport type { OxlintConfig } from 'oxlint';\n\nconst rules: NonNullable<OxlintConfig['rules']> = {\n\t'unicorn/prefer-module': 2,\n\t'unicorn/prefer-top-level-await': 2,\n};\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\trules,\n});\n\nexport default config;\n"],"mappings":";;;;AAWA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT;EANA,yBAAyB;EACzB,kCAAkC;CAK9B;AACL,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
2
1
|
//#region src/native-tailwind.d.ts
|
|
3
|
-
declare const config:
|
|
2
|
+
declare const config: {
|
|
3
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
4
|
+
jsPlugins: import("oxlint").ExternalPluginEntry[];
|
|
5
|
+
rules: {
|
|
6
|
+
'mahir-native-tailwind/class-name-rules': number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
4
9
|
//#endregion
|
|
5
10
|
export { config as default };
|
|
6
11
|
//# sourceMappingURL=native-tailwind.d.ts.map
|
package/dist/native-tailwind.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { localPlugin, nativePlugins } from "./config.js";
|
|
2
|
+
import { defineConfig } from "oxlint";
|
|
2
3
|
|
|
3
4
|
//#region src/native-tailwind.ts
|
|
4
|
-
const config =
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const config = defineConfig({
|
|
6
|
+
plugins: nativePlugins,
|
|
7
|
+
jsPlugins: [localPlugin("mahir-native-tailwind", "./plugins/native-tailwind.js")],
|
|
7
8
|
rules: { "mahir-native-tailwind/class-name-rules": 2 }
|
|
8
|
-
}
|
|
9
|
+
});
|
|
9
10
|
|
|
10
11
|
//#endregion
|
|
11
12
|
export { config as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-tailwind.js","names":[
|
|
1
|
+
{"version":3,"file":"native-tailwind.js","names":[],"sources":["../src/native-tailwind.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { localPlugin, nativePlugins } from './config.js';\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\tjsPlugins: [localPlugin('mahir-native-tailwind', './plugins/native-tailwind.js')],\n\trules: {\n\t\t'mahir-native-tailwind/class-name-rules': 2,\n\t},\n});\n\nexport default config;\n"],"mappings":";;;;AAIA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,WAAW,CAAC,YAAY,yBAAyB,8BAA8B,CAAC;CAChF,OAAO,EACN,0CAA0C,EAC3C;AACD,CAAC"}
|
package/dist/native.d.ts
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
2
1
|
//#region src/native.d.ts
|
|
3
|
-
declare const config:
|
|
2
|
+
declare const config: {
|
|
3
|
+
extends: {
|
|
4
|
+
extends: {
|
|
5
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
6
|
+
jsPlugins: import("oxlint").ExternalPluginEntry[];
|
|
7
|
+
rules: import("oxlint").DummyRuleMap;
|
|
8
|
+
}[];
|
|
9
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
10
|
+
jsPlugins: import("oxlint").ExternalPluginEntry[];
|
|
11
|
+
env: {
|
|
12
|
+
browser: true;
|
|
13
|
+
serviceworker: true;
|
|
14
|
+
};
|
|
15
|
+
rules: import("oxlint").DummyRuleMap;
|
|
16
|
+
}[];
|
|
17
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
18
|
+
globals: {
|
|
19
|
+
console: "readonly";
|
|
20
|
+
exports: "readonly";
|
|
21
|
+
global: "readonly";
|
|
22
|
+
module: "readonly";
|
|
23
|
+
require: "readonly";
|
|
24
|
+
__DEV__: "readonly";
|
|
25
|
+
Atomics: "readonly";
|
|
26
|
+
ErrorUtils: "readonly";
|
|
27
|
+
FormData: "readonly";
|
|
28
|
+
SharedArrayBuffer: "readonly";
|
|
29
|
+
XMLHttpRequest: "readonly";
|
|
30
|
+
alert: "readonly";
|
|
31
|
+
cancelAnimationFrame: "readonly";
|
|
32
|
+
cancelIdleCallback: "readonly";
|
|
33
|
+
clearImmediate: "readonly";
|
|
34
|
+
clearInterval: "readonly";
|
|
35
|
+
clearTimeout: "readonly";
|
|
36
|
+
fetch: "readonly";
|
|
37
|
+
navigator: "readonly";
|
|
38
|
+
process: "readonly";
|
|
39
|
+
requestAnimationFrame: "readonly";
|
|
40
|
+
requestIdleCallback: "readonly";
|
|
41
|
+
setImmediate: "readonly";
|
|
42
|
+
setInterval: "readonly";
|
|
43
|
+
setTimeout: "readonly";
|
|
44
|
+
window: "readonly";
|
|
45
|
+
};
|
|
46
|
+
overrides: {
|
|
47
|
+
files: string[];
|
|
48
|
+
env: {
|
|
49
|
+
browser: true;
|
|
50
|
+
};
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
4
53
|
//#endregion
|
|
5
54
|
export { config as default };
|
|
6
55
|
//# sourceMappingURL=native.d.ts.map
|
package/dist/native.js
CHANGED
|
@@ -1,50 +1,44 @@
|
|
|
1
|
+
import { nativePlugins } from "./config.js";
|
|
1
2
|
import config$1 from "./react.js";
|
|
2
|
-
import
|
|
3
|
-
import globals from "globals";
|
|
3
|
+
import { defineConfig } from "oxlint";
|
|
4
4
|
|
|
5
5
|
//#region src/native.ts
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
setTimeout: false,
|
|
37
|
-
window: false
|
|
38
|
-
} },
|
|
39
|
-
plugins: { tsdoc: eslintPluginTsdoc },
|
|
40
|
-
settings
|
|
6
|
+
const config = defineConfig({
|
|
7
|
+
extends: [config$1],
|
|
8
|
+
plugins: nativePlugins,
|
|
9
|
+
globals: {
|
|
10
|
+
console: "readonly",
|
|
11
|
+
exports: "readonly",
|
|
12
|
+
global: "readonly",
|
|
13
|
+
module: "readonly",
|
|
14
|
+
require: "readonly",
|
|
15
|
+
__DEV__: "readonly",
|
|
16
|
+
Atomics: "readonly",
|
|
17
|
+
ErrorUtils: "readonly",
|
|
18
|
+
FormData: "readonly",
|
|
19
|
+
SharedArrayBuffer: "readonly",
|
|
20
|
+
XMLHttpRequest: "readonly",
|
|
21
|
+
alert: "readonly",
|
|
22
|
+
cancelAnimationFrame: "readonly",
|
|
23
|
+
cancelIdleCallback: "readonly",
|
|
24
|
+
clearImmediate: "readonly",
|
|
25
|
+
clearInterval: "readonly",
|
|
26
|
+
clearTimeout: "readonly",
|
|
27
|
+
fetch: "readonly",
|
|
28
|
+
navigator: "readonly",
|
|
29
|
+
process: "readonly",
|
|
30
|
+
requestAnimationFrame: "readonly",
|
|
31
|
+
requestIdleCallback: "readonly",
|
|
32
|
+
setImmediate: "readonly",
|
|
33
|
+
setInterval: "readonly",
|
|
34
|
+
setTimeout: "readonly",
|
|
35
|
+
window: "readonly"
|
|
41
36
|
},
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
];
|
|
37
|
+
overrides: [{
|
|
38
|
+
files: ["**/*.web.*"],
|
|
39
|
+
env: { browser: true }
|
|
40
|
+
}]
|
|
41
|
+
});
|
|
48
42
|
|
|
49
43
|
//#endregion
|
|
50
44
|
export { config as default };
|
package/dist/native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","names":["react"],"sources":["../src/native.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"native.js","names":["react"],"sources":["../src/native.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { nativePlugins } from './config.js';\nimport react from './react.js';\n\nconst config = defineConfig({\n\textends: [react],\n\tplugins: nativePlugins,\n\tglobals: {\n\t\tconsole: 'readonly',\n\t\texports: 'readonly',\n\t\tglobal: 'readonly',\n\t\tmodule: 'readonly',\n\t\trequire: 'readonly',\n\t\t__DEV__: 'readonly',\n\t\tAtomics: 'readonly',\n\t\tErrorUtils: 'readonly',\n\t\tFormData: 'readonly',\n\t\tSharedArrayBuffer: 'readonly',\n\t\tXMLHttpRequest: 'readonly',\n\t\talert: 'readonly',\n\t\tcancelAnimationFrame: 'readonly',\n\t\tcancelIdleCallback: 'readonly',\n\t\tclearImmediate: 'readonly',\n\t\tclearInterval: 'readonly',\n\t\tclearTimeout: 'readonly',\n\t\tfetch: 'readonly',\n\t\tnavigator: 'readonly',\n\t\tprocess: 'readonly',\n\t\trequestAnimationFrame: 'readonly',\n\t\trequestIdleCallback: 'readonly',\n\t\tsetImmediate: 'readonly',\n\t\tsetInterval: 'readonly',\n\t\tsetTimeout: 'readonly',\n\t\twindow: 'readonly',\n\t},\n\toverrides: [\n\t\t{\n\t\t\tfiles: ['**/*.web.*'],\n\t\t\tenv: {\n\t\t\t\tbrowser: true,\n\t\t\t},\n\t\t},\n\t],\n});\n\nexport default config;\n"],"mappings":";;;;;AAKA,MAAM,SAAS,aAAa;CAC3B,SAAS,CAACA,QAAK;CACf,SAAS;CACT,SAAS;EACR,SAAS;EACT,SAAS;EACT,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,SAAS;EACT,SAAS;EACT,YAAY;EACZ,UAAU;EACV,mBAAmB;EACnB,gBAAgB;EAChB,OAAO;EACP,sBAAsB;EACtB,oBAAoB;EACpB,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,OAAO;EACP,WAAW;EACX,SAAS;EACT,uBAAuB;EACvB,qBAAqB;EACrB,cAAc;EACd,aAAa;EACb,YAAY;EACZ,QAAQ;CACT;CACA,WAAW,CACV;EACC,OAAO,CAAC,YAAY;EACpB,KAAK,EACJ,SAAS,KACV;CACD,CACD;AACD,CAAC"}
|
package/dist/nest.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
2
1
|
//#region src/nest.d.ts
|
|
3
|
-
declare const config:
|
|
2
|
+
declare const config: {
|
|
3
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
4
|
+
jsPlugins: import("oxlint").ExternalPluginEntry[];
|
|
5
|
+
rules: import("oxlint").DummyRuleMap;
|
|
6
|
+
};
|
|
4
7
|
//#endregion
|
|
5
8
|
export { config as default };
|
|
6
9
|
//# sourceMappingURL=nest.d.ts.map
|
package/dist/nest.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { localPlugin, nativePlugins } from "./config.js";
|
|
2
|
+
import { defineConfig } from "oxlint";
|
|
2
3
|
|
|
3
4
|
//#region src/nest.ts
|
|
4
|
-
const config =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}];
|
|
5
|
+
const config = defineConfig({
|
|
6
|
+
plugins: nativePlugins,
|
|
7
|
+
jsPlugins: [localPlugin("nestjs-typed", "./nest-plugin.js")],
|
|
8
|
+
rules: { "nestjs-typed/sort-module-metadata-arrays": 2 }
|
|
9
|
+
});
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
export { config as default };
|
package/dist/nest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nest.js","names":[],"sources":["../src/nest.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"nest.js","names":[],"sources":["../src/nest.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { localPlugin, nativePlugins } from './config.js';\n\nimport type { OxlintConfig } from 'oxlint';\n\nconst rules: NonNullable<OxlintConfig['rules']> = {\n\t'nestjs-typed/sort-module-metadata-arrays': 2,\n};\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\tjsPlugins: [localPlugin('nestjs-typed', './nest-plugin.js')],\n\trules,\n});\n\nexport default config;\n"],"mappings":";;;;AAUA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,WAAW,CAAC,YAAY,gBAAgB,kBAAkB,CAAC;CAC3D,SANA,4CAA4C,EAMxC;AACL,CAAC"}
|
package/dist/next.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
2
1
|
//#region src/next.d.ts
|
|
3
|
-
declare const config:
|
|
2
|
+
declare const config: {
|
|
3
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
4
|
+
rules: import("oxlint").DummyRuleMap;
|
|
5
|
+
};
|
|
4
6
|
//#endregion
|
|
5
7
|
export { config as default };
|
|
6
8
|
//# sourceMappingURL=next.d.ts.map
|
package/dist/next.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { nativePlugins } from "./config.js";
|
|
2
|
+
import { defineConfig } from "oxlint";
|
|
2
3
|
|
|
3
4
|
//#region src/next.ts
|
|
4
|
-
const config =
|
|
5
|
-
|
|
6
|
-
plugins: { "@next/next": eslintPluginNext },
|
|
5
|
+
const config = defineConfig({
|
|
6
|
+
plugins: nativePlugins,
|
|
7
7
|
rules: {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
8
|
+
"nextjs/google-font-display": 1,
|
|
9
|
+
"nextjs/google-font-preconnect": 1,
|
|
10
|
+
"nextjs/inline-script-id": 2,
|
|
11
|
+
"nextjs/next-script-for-ga": 1,
|
|
12
|
+
"nextjs/no-assign-module-variable": 2,
|
|
13
|
+
"nextjs/no-before-interactive-script-outside-document": 2,
|
|
14
|
+
"nextjs/no-css-tags": 1,
|
|
15
|
+
"nextjs/no-document-import-in-page": 2,
|
|
16
|
+
"nextjs/no-duplicate-head": 2,
|
|
17
|
+
"nextjs/no-head-element": 1,
|
|
18
|
+
"nextjs/no-head-import-in-document": 2,
|
|
19
|
+
"nextjs/no-html-link-for-pages": 1,
|
|
20
|
+
"nextjs/no-img-element": 1,
|
|
21
|
+
"nextjs/no-page-custom-font": 1,
|
|
22
|
+
"nextjs/no-script-component-in-head": 2,
|
|
23
|
+
"nextjs/no-styled-jsx-in-document": 2,
|
|
24
|
+
"nextjs/no-sync-scripts": 2,
|
|
25
|
+
"nextjs/no-title-in-document-head": 2,
|
|
26
|
+
"nextjs/no-typos": 2,
|
|
27
|
+
"nextjs/no-unwanted-polyfillio": 2
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
});
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
export { config as default };
|
package/dist/next.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","names":[],"sources":["../src/next.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"next.js","names":[],"sources":["../src/next.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { nativePlugins } from './config.js';\n\nimport type { OxlintConfig } from 'oxlint';\n\nconst rules: NonNullable<OxlintConfig['rules']> = {\n\t'nextjs/google-font-display': 1,\n\t'nextjs/google-font-preconnect': 1,\n\t'nextjs/inline-script-id': 2,\n\t'nextjs/next-script-for-ga': 1,\n\t'nextjs/no-assign-module-variable': 2,\n\t'nextjs/no-before-interactive-script-outside-document': 2,\n\t'nextjs/no-css-tags': 1,\n\t'nextjs/no-document-import-in-page': 2,\n\t'nextjs/no-duplicate-head': 2,\n\t'nextjs/no-head-element': 1,\n\t'nextjs/no-head-import-in-document': 2,\n\t'nextjs/no-html-link-for-pages': 1,\n\t'nextjs/no-img-element': 1,\n\t'nextjs/no-page-custom-font': 1,\n\t'nextjs/no-script-component-in-head': 2,\n\t'nextjs/no-styled-jsx-in-document': 2,\n\t'nextjs/no-sync-scripts': 2,\n\t'nextjs/no-title-in-document-head': 2,\n\t'nextjs/no-typos': 2,\n\t'nextjs/no-unwanted-polyfillio': 2,\n};\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\trules,\n});\n\nexport default config;\n"],"mappings":";;;;AA6BA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT;EAxBA,8BAA8B;EAC9B,iCAAiC;EACjC,2BAA2B;EAC3B,6BAA6B;EAC7B,oCAAoC;EACpC,wDAAwD;EACxD,sBAAsB;EACtB,qCAAqC;EACrC,4BAA4B;EAC5B,0BAA0B;EAC1B,qCAAqC;EACrC,iCAAiC;EACjC,yBAAyB;EACzB,8BAA8B;EAC9B,sCAAsC;EACtC,oCAAoC;EACpC,0BAA0B;EAC1B,oCAAoC;EACpC,mBAAmB;EACnB,iCAAiC;CAK7B;AACL,CAAC"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
2
1
|
//#region src/node.d.ts
|
|
3
|
-
declare const config:
|
|
2
|
+
declare const config: {
|
|
3
|
+
plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
4
|
+
jsPlugins: import("oxlint").ExternalPluginEntry[];
|
|
5
|
+
env: {
|
|
6
|
+
node: true;
|
|
7
|
+
};
|
|
8
|
+
rules: import("oxlint").DummyRuleMap;
|
|
9
|
+
};
|
|
4
10
|
//#endregion
|
|
5
11
|
export { config as default };
|
|
6
12
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.js
CHANGED
|
@@ -1,79 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { nativePlugins, packagePlugin } from "./config.js";
|
|
2
|
+
import { defineConfig } from "oxlint";
|
|
3
3
|
|
|
4
4
|
//#region src/node.ts
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
2,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
...globals.node
|
|
71
|
-
},
|
|
72
|
-
parserOptions: { ecmaFeatures: { globalReturn: true } }
|
|
73
|
-
},
|
|
74
|
-
plugins: { n },
|
|
75
|
-
rules
|
|
76
|
-
}];
|
|
5
|
+
const config = defineConfig({
|
|
6
|
+
plugins: nativePlugins,
|
|
7
|
+
jsPlugins: [packagePlugin("node-js", "eslint-plugin-n")],
|
|
8
|
+
env: { node: true },
|
|
9
|
+
rules: {
|
|
10
|
+
"node/callback-return": 2,
|
|
11
|
+
"node/handle-callback-err": 2,
|
|
12
|
+
"node-js/no-callback-literal": 2,
|
|
13
|
+
"node-js/no-deprecated-api": 2,
|
|
14
|
+
"node/no-exports-assign": 2,
|
|
15
|
+
"node/no-new-require": 2,
|
|
16
|
+
"node/no-path-concat": 2,
|
|
17
|
+
"node/no-sync": [2, {
|
|
18
|
+
allowAtRootLevel: true,
|
|
19
|
+
ignores: ["existsSync"]
|
|
20
|
+
}],
|
|
21
|
+
"node-js/no-unpublished-bin": 2,
|
|
22
|
+
"node-js/prefer-global/buffer": [2, "never"],
|
|
23
|
+
"node-js/prefer-global/console": [2, "always"],
|
|
24
|
+
"node-js/prefer-global/process": [2, "never"],
|
|
25
|
+
"node-js/prefer-global/text-decoder": [2, "never"],
|
|
26
|
+
"node-js/prefer-global/text-encoder": [2, "never"],
|
|
27
|
+
"node-js/prefer-global/url": [2, "never"],
|
|
28
|
+
"node-js/prefer-global/url-search-params": [2, "never"],
|
|
29
|
+
"node-js/process-exit-as-throw": 2,
|
|
30
|
+
"node-js/hashbang": [2, { convertPath: { "src/**/*.js": ["^src/(.+?)\\.js$", "dist/$1.js"] } }],
|
|
31
|
+
"no-restricted-globals": [
|
|
32
|
+
2,
|
|
33
|
+
{
|
|
34
|
+
name: "Buffer",
|
|
35
|
+
message: "Import Buffer from `node:buffer` instead"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "process",
|
|
39
|
+
message: "Import process from `node:process` instead"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "setTimeout",
|
|
43
|
+
message: "Import setTimeout from `node:timers` instead"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "setInterval",
|
|
47
|
+
message: "Import setInterval from `node:timers` instead"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "setImmediate",
|
|
51
|
+
message: "Import setImmediate from `node:timers` instead"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "clearTimeout",
|
|
55
|
+
message: "Import clearTimeout from `node:timers` instead"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "clearInterval",
|
|
59
|
+
message: "Import clearInterval from `node:timers` instead"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "clearImmediate",
|
|
63
|
+
message: "Import clearImmediate from `node:timers` instead"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"unicorn/prefer-node-protocol": 2,
|
|
67
|
+
"unicorn/require-post-message-target-origin": 0
|
|
68
|
+
}
|
|
69
|
+
});
|
|
77
70
|
|
|
78
71
|
//#endregion
|
|
79
72
|
export { config as default };
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","names":[],"sources":["../src/node.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"node.js","names":[],"sources":["../src/node.ts"],"sourcesContent":["import { defineConfig } from 'oxlint';\n\nimport { nativePlugins, packagePlugin } from './config.js';\n\nimport type { OxlintConfig } from 'oxlint';\n\nconst rules: NonNullable<OxlintConfig['rules']> = {\n\t'node/callback-return': 2,\n\t'node/handle-callback-err': 2,\n\t'node-js/no-callback-literal': 2,\n\t'node-js/no-deprecated-api': 2,\n\t'node/no-exports-assign': 2,\n\t'node/no-new-require': 2,\n\t'node/no-path-concat': 2,\n\t'node/no-sync': [\n\t\t2,\n\t\t{\n\t\t\tallowAtRootLevel: true,\n\t\t\tignores: ['existsSync'],\n\t\t},\n\t],\n\t'node-js/no-unpublished-bin': 2,\n\t'node-js/prefer-global/buffer': [2, 'never'],\n\t'node-js/prefer-global/console': [2, 'always'],\n\t'node-js/prefer-global/process': [2, 'never'],\n\t'node-js/prefer-global/text-decoder': [2, 'never'],\n\t'node-js/prefer-global/text-encoder': [2, 'never'],\n\t'node-js/prefer-global/url': [2, 'never'],\n\t'node-js/prefer-global/url-search-params': [2, 'never'],\n\t'node-js/process-exit-as-throw': 2,\n\t'node-js/hashbang': [\n\t\t2,\n\t\t{\n\t\t\tconvertPath: {\n\t\t\t\t'src/**/*.js': ['^src/(.+?)\\\\.js$', 'dist/$1.js'],\n\t\t\t},\n\t\t},\n\t],\n\t'no-restricted-globals': [\n\t\t2,\n\t\t{ name: 'Buffer', message: 'Import Buffer from `node:buffer` instead' },\n\t\t{ name: 'process', message: 'Import process from `node:process` instead' },\n\t\t{ name: 'setTimeout', message: 'Import setTimeout from `node:timers` instead' },\n\t\t{ name: 'setInterval', message: 'Import setInterval from `node:timers` instead' },\n\t\t{ name: 'setImmediate', message: 'Import setImmediate from `node:timers` instead' },\n\t\t{ name: 'clearTimeout', message: 'Import clearTimeout from `node:timers` instead' },\n\t\t{ name: 'clearInterval', message: 'Import clearInterval from `node:timers` instead' },\n\t\t{ name: 'clearImmediate', message: 'Import clearImmediate from `node:timers` instead' },\n\t],\n\t'unicorn/prefer-node-protocol': 2,\n\t'unicorn/require-post-message-target-origin': 0,\n};\n\nconst config = defineConfig({\n\tplugins: nativePlugins,\n\tjsPlugins: [packagePlugin('node-js', 'eslint-plugin-n')],\n\tenv: {\n\t\tnode: true,\n\t},\n\trules,\n});\n\nexport default config;\n"],"mappings":";;;;AAqDA,MAAM,SAAS,aAAa;CAC3B,SAAS;CACT,WAAW,CAAC,cAAc,WAAW,iBAAiB,CAAC;CACvD,KAAK,EACJ,MAAM,KACP;CACA;EApDA,wBAAwB;EACxB,4BAA4B;EAC5B,+BAA+B;EAC/B,6BAA6B;EAC7B,0BAA0B;EAC1B,uBAAuB;EACvB,uBAAuB;EACvB,gBAAgB,CACf,GACA;GACC,kBAAkB;GAClB,SAAS,CAAC,YAAY;EACvB,CACD;EACA,8BAA8B;EAC9B,gCAAgC,CAAC,GAAG,OAAO;EAC3C,iCAAiC,CAAC,GAAG,QAAQ;EAC7C,iCAAiC,CAAC,GAAG,OAAO;EAC5C,sCAAsC,CAAC,GAAG,OAAO;EACjD,sCAAsC,CAAC,GAAG,OAAO;EACjD,6BAA6B,CAAC,GAAG,OAAO;EACxC,2CAA2C,CAAC,GAAG,OAAO;EACtD,iCAAiC;EACjC,oBAAoB,CACnB,GACA,EACC,aAAa,EACZ,eAAe,CAAC,oBAAoB,YAAY,EACjD,EACD,CACD;EACA,yBAAyB;GACxB;GACA;IAAE,MAAM;IAAU,SAAS;GAA2C;GACtE;IAAE,MAAM;IAAW,SAAS;GAA6C;GACzE;IAAE,MAAM;IAAc,SAAS;GAA+C;GAC9E;IAAE,MAAM;IAAe,SAAS;GAAgD;GAChF;IAAE,MAAM;IAAgB,SAAS;GAAiD;GAClF;IAAE,MAAM;IAAgB,SAAS;GAAiD;GAClF;IAAE,MAAM;IAAiB,SAAS;GAAkD;GACpF;IAAE,MAAM;IAAkB,SAAS;GAAmD;EACvF;EACA,gCAAgC;EAChC,8CAA8C;CAS1C;AACL,CAAC"}
|
package/dist/oxfmt.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/oxfmt.d.ts
|
|
2
|
+
declare const _default: {
|
|
3
|
+
printWidth: number;
|
|
4
|
+
useTabs: true;
|
|
5
|
+
singleQuote: true;
|
|
6
|
+
quoteProps: "as-needed";
|
|
7
|
+
trailingComma: "all";
|
|
8
|
+
endOfLine: "lf";
|
|
9
|
+
ignorePatterns: string[];
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { _default as default };
|
|
13
|
+
//# sourceMappingURL=oxfmt.d.ts.map
|
package/dist/oxfmt.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from "oxfmt";
|
|
2
|
+
|
|
3
|
+
//#region src/oxfmt.ts
|
|
4
|
+
var oxfmt_default = defineConfig({
|
|
5
|
+
printWidth: 120,
|
|
6
|
+
useTabs: true,
|
|
7
|
+
singleQuote: true,
|
|
8
|
+
quoteProps: "as-needed",
|
|
9
|
+
trailingComma: "all",
|
|
10
|
+
endOfLine: "lf",
|
|
11
|
+
ignorePatterns: ["tests/fixtures/input"]
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { oxfmt_default as default };
|
|
16
|
+
//# sourceMappingURL=oxfmt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxfmt.js","names":[],"sources":["../src/oxfmt.ts"],"sourcesContent":["import { defineConfig } from 'oxfmt';\n\nexport default defineConfig({\n\tprintWidth: 120,\n\tuseTabs: true,\n\tsingleQuote: true,\n\tquoteProps: 'as-needed',\n\ttrailingComma: 'all',\n\tendOfLine: 'lf',\n\tignorePatterns: ['tests/fixtures/input'],\n});\n"],"mappings":";;;AAEA,oBAAe,aAAa;CAC3B,YAAY;CACZ,SAAS;CACT,aAAa;CACb,YAAY;CACZ,eAAe;CACf,WAAW;CACX,gBAAgB,CAAC,sBAAsB;AACxC,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
//#region src/plugins/api-error.ts
|
|
2
2
|
const DEFAULT_ALLOWED_ERRORS = ["ApiError", "FormValidationError"];
|
|
3
|
+
function getStaticFactoryCallee(arg) {
|
|
4
|
+
if (arg.type !== "CallExpression") return void 0;
|
|
5
|
+
const { callee } = arg;
|
|
6
|
+
if (callee.type !== "MemberExpression" || callee.computed) return void 0;
|
|
7
|
+
const { object, property } = callee;
|
|
8
|
+
if (object.type !== "Identifier" || property.type !== "Identifier") return void 0;
|
|
9
|
+
return {
|
|
10
|
+
callee,
|
|
11
|
+
name: object.name
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function isAstNode(value) {
|
|
15
|
+
return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
|
|
16
|
+
}
|
|
3
17
|
const plugin = {
|
|
4
18
|
meta: {
|
|
5
19
|
name: "eslint-plugin-mahir-api-error",
|
|
@@ -41,17 +55,6 @@ const plugin = {
|
|
|
41
55
|
if (!name || !body) return;
|
|
42
56
|
if (!moduleFns.has(name)) moduleFns.set(name, body);
|
|
43
57
|
}
|
|
44
|
-
function getStaticFactoryCallee(arg) {
|
|
45
|
-
if (arg.type !== "CallExpression") return void 0;
|
|
46
|
-
const { callee } = arg;
|
|
47
|
-
if (callee.type !== "MemberExpression" || callee.computed) return void 0;
|
|
48
|
-
const { object, property } = callee;
|
|
49
|
-
if (object.type !== "Identifier" || property.type !== "Identifier") return void 0;
|
|
50
|
-
return {
|
|
51
|
-
callee,
|
|
52
|
-
name: object.name
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
58
|
function isAllowedThrow(arg) {
|
|
56
59
|
if (arg.type === "NewExpression" && arg.callee.type === "Identifier") return allowedErrors.has(arg.callee.name);
|
|
57
60
|
const factory = getStaticFactoryCallee(arg);
|
|
@@ -95,9 +98,6 @@ const plugin = {
|
|
|
95
98
|
}
|
|
96
99
|
});
|
|
97
100
|
}
|
|
98
|
-
function isAstNode(value) {
|
|
99
|
-
return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
|
|
100
|
-
}
|
|
101
101
|
function walkThrows(node, fnType, visited = /* @__PURE__ */ new Set()) {
|
|
102
102
|
if (!node || visited.has(node)) return;
|
|
103
103
|
visited.add(node);
|