@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.
Files changed (69) hide show
  1. package/README.md +119 -156
  2. package/dist/api-error.d.ts +7 -2
  3. package/dist/api-error.js +6 -5
  4. package/dist/api-error.js.map +1 -1
  5. package/dist/central-icons.d.ts +7 -2
  6. package/dist/central-icons.js +6 -5
  7. package/dist/central-icons.js.map +1 -1
  8. package/dist/cli/index.d.ts +1 -0
  9. package/dist/cli/index.js +523 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/common.d.ts +8 -2
  12. package/dist/common.js +36 -52
  13. package/dist/common.js.map +1 -1
  14. package/dist/config.d.ts +8 -0
  15. package/dist/config.js +31 -0
  16. package/dist/config.js.map +1 -0
  17. package/dist/edge.d.ts +5 -2
  18. package/dist/edge.js +14 -10
  19. package/dist/edge.js.map +1 -1
  20. package/dist/i18n.d.ts +8 -2
  21. package/dist/i18n.js +6 -5
  22. package/dist/i18n.js.map +1 -1
  23. package/dist/jsdoc.d.ts +5 -2
  24. package/dist/jsdoc.js +18 -17
  25. package/dist/jsdoc.js.map +1 -1
  26. package/dist/jsx.d.ts +5 -2
  27. package/dist/jsx.js +24 -26
  28. package/dist/jsx.js.map +1 -1
  29. package/dist/module.d.ts +4 -2
  30. package/dist/module.js +6 -3
  31. package/dist/module.js.map +1 -1
  32. package/dist/native-tailwind.d.ts +7 -2
  33. package/dist/native-tailwind.js +6 -5
  34. package/dist/native-tailwind.js.map +1 -1
  35. package/dist/native.d.ts +51 -2
  36. package/dist/native.js +37 -43
  37. package/dist/native.js.map +1 -1
  38. package/dist/nest-plugin.d.ts +2 -0
  39. package/dist/nest-plugin.js +3 -0
  40. package/dist/nest.d.ts +5 -2
  41. package/dist/nest.js +7 -7
  42. package/dist/nest.js.map +1 -1
  43. package/dist/next.d.ts +4 -2
  44. package/dist/next.js +25 -25
  45. package/dist/next.js.map +1 -1
  46. package/dist/node.d.ts +8 -2
  47. package/dist/node.js +67 -74
  48. package/dist/node.js.map +1 -1
  49. package/dist/oxfmt.d.ts +13 -0
  50. package/dist/oxfmt.js +16 -0
  51. package/dist/oxfmt.js.map +1 -0
  52. package/dist/plugins/api-error.js +14 -14
  53. package/dist/plugins/api-error.js.map +1 -1
  54. package/dist/react.d.ts +14 -2
  55. package/dist/react.js +56 -58
  56. package/dist/react.js.map +1 -1
  57. package/dist/tailwind.d.ts +15 -2
  58. package/dist/tailwind.js +10 -9
  59. package/dist/tailwind.js.map +1 -1
  60. package/dist/tsdoc.d.ts +15 -2
  61. package/dist/tsdoc.js +14 -14
  62. package/dist/tsdoc.js.map +1 -1
  63. package/dist/typescript.d.ts +5 -2
  64. package/dist/typescript.js +155 -192
  65. package/dist/typescript.js.map +1 -1
  66. package/package.json +162 -178
  67. package/dist/mdx.d.ts +0 -6
  68. package/dist/mdx.js +0 -25
  69. package/dist/mdx.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","names":[],"sources":["../src/module.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'unicorn/prefer-module': 2,\n\t'unicorn/prefer-top-level-await': 2,\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/module',\n\t\trules,\n\t},\n];\n\nexport default config;\n"],"mappings":";AAOA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN;EAPD,yBAAyB;EACzB,kCAAkC;CAM7B;AACL,CACD"}
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: TSESLint.FlatConfig.ConfigArray;
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
@@ -1,11 +1,12 @@
1
- import plugin from "./plugins/native-tailwind.js";
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
- name: "mahir/native-tailwind",
6
- plugins: { "mahir-native-tailwind": plugin },
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":["pluginNativeTailwind"],"sources":["../src/native-tailwind.ts"],"sourcesContent":["import pluginNativeTailwind from './plugins/native-tailwind.js';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/native-tailwind',\n\t\tplugins: {\n\t\t\t'mahir-native-tailwind': pluginNativeTailwind,\n\t\t},\n\t\trules: {\n\t\t\t'mahir-native-tailwind/class-name-rules': 2,\n\t\t},\n\t},\n];\n\nexport default config;\n"],"mappings":";;;AAIA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,SAAS,EACR,yBAAyBA,OAC1B;CACA,OAAO,EACN,0CAA0C,EAC3C;AACD,CACD"}
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: TSESLint.FlatConfig.ConfigArray;
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 eslintPluginTsdoc from "eslint-plugin-tsdoc";
3
- import globals from "globals";
3
+ import { defineConfig } from "oxlint";
4
4
 
5
5
  //#region src/native.ts
6
- const settings = { "import-x/ignore": ["node_modules[\\\\/]+@?react-native"] };
7
- const config = [
8
- ...config$1,
9
- {
10
- name: "mahir/native",
11
- languageOptions: { globals: {
12
- console: false,
13
- exports: false,
14
- global: false,
15
- module: false,
16
- require: false,
17
- __DEV__: false,
18
- Atomics: false,
19
- ErrorUtils: false,
20
- FormData: false,
21
- SharedArrayBuffer: false,
22
- XMLHttpRequest: false,
23
- alert: false,
24
- cancelAnimationFrame: false,
25
- cancelIdleCallback: false,
26
- clearImmediate: false,
27
- clearInterval: false,
28
- clearTimeout: false,
29
- fetch: false,
30
- navigator: false,
31
- process: false,
32
- requestAnimationFrame: false,
33
- requestIdleCallback: false,
34
- setImmediate: false,
35
- setInterval: false,
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
- name: "mahir/native-web",
44
- files: ["*.web.*"],
45
- languageOptions: { globals: { ...globals.browser } }
46
- }
47
- ];
37
+ overrides: [{
38
+ files: ["**/*.web.*"],
39
+ env: { browser: true }
40
+ }]
41
+ });
48
42
 
49
43
  //#endregion
50
44
  export { config as default };
@@ -1 +1 @@
1
- {"version":3,"file":"native.js","names":["react"],"sources":["../src/native.ts"],"sourcesContent":["import eslintPluginTsdoc from 'eslint-plugin-tsdoc';\nimport globals from 'globals';\n\nimport react from './react.js';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst settings: TSESLint.FlatConfig.Settings = {\n\t'import-x/ignore': [\n\t\t// react-native's main module is Flow, not JavaScript, and raises parse errors. Additionally,\n\t\t// several other react-native-related packages still publish Flow code as their main source.\n\t\t'node_modules[\\\\\\\\/]+@?react-native',\n\t],\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t...react,\n\t{\n\t\tname: 'mahir/native',\n\t\tlanguageOptions: {\n\t\t\tglobals: {\n\t\t\t\tconsole: false,\n\t\t\t\texports: false,\n\t\t\t\tglobal: false,\n\t\t\t\tmodule: false,\n\t\t\t\trequire: false,\n\t\t\t\t__DEV__: false,\n\t\t\t\tAtomics: false,\n\t\t\t\tErrorUtils: false,\n\t\t\t\tFormData: false,\n\t\t\t\tSharedArrayBuffer: false,\n\t\t\t\tXMLHttpRequest: false,\n\t\t\t\talert: false,\n\t\t\t\tcancelAnimationFrame: false,\n\t\t\t\tcancelIdleCallback: false,\n\t\t\t\tclearImmediate: false,\n\t\t\t\tclearInterval: false,\n\t\t\t\tclearTimeout: false,\n\t\t\t\tfetch: false,\n\t\t\t\tnavigator: false,\n\t\t\t\tprocess: false,\n\t\t\t\trequestAnimationFrame: false,\n\t\t\t\trequestIdleCallback: false,\n\t\t\t\tsetImmediate: false,\n\t\t\t\tsetInterval: false,\n\t\t\t\tsetTimeout: false,\n\t\t\t\twindow: false,\n\t\t\t},\n\t\t},\n\t\tplugins: {\n\t\t\ttsdoc: eslintPluginTsdoc,\n\t\t},\n\t\tsettings,\n\t},\n\t{\n\t\tname: 'mahir/native-web',\n\t\tfiles: ['*.web.*'],\n\t\tlanguageOptions: {\n\t\t\tglobals: {\n\t\t\t\t...globals.browser,\n\t\t\t},\n\t\t},\n\t},\n];\n\nexport default config;\n"],"mappings":";;;;;AAOA,MAAM,WAAyC,EAC9C,mBAAmB,CAGlB,oCACD,EACD;AAEA,MAAM,SAA0C;CAC/C,GAAGA;CACH;EACC,MAAM;EACN,iBAAiB,EAChB,SAAS;GACR,SAAS;GACT,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,SAAS;GACT,SAAS;GACT,YAAY;GACZ,UAAU;GACV,mBAAmB;GACnB,gBAAgB;GAChB,OAAO;GACP,sBAAsB;GACtB,oBAAoB;GACpB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACd,OAAO;GACP,WAAW;GACX,SAAS;GACT,uBAAuB;GACvB,qBAAqB;GACrB,cAAc;GACd,aAAa;GACb,YAAY;GACZ,QAAQ;EACT,EACD;EACA,SAAS,EACR,OAAO,kBACR;EACA;CACD;CACA;EACC,MAAM;EACN,OAAO,CAAC,SAAS;EACjB,iBAAiB,EAChB,SAAS,EACR,GAAG,QAAQ,QACZ,EACD;CACD;AACD"}
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"}
@@ -0,0 +1,2 @@
1
+ import { plugin as eslint_plugin_nestjs_typed_default } from "@darraghor/eslint-plugin-nestjs-typed";
2
+ export { eslint_plugin_nestjs_typed_default as default };
@@ -0,0 +1,3 @@
1
+ import { plugin as eslint_plugin_nestjs_typed_default } from "@darraghor/eslint-plugin-nestjs-typed";
2
+
3
+ export { eslint_plugin_nestjs_typed_default as default };
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: TSESLint.FlatConfig.ConfigArray;
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 eslintNestJs from "@darraghor/eslint-plugin-nestjs-typed";
1
+ import { localPlugin, nativePlugins } from "./config.js";
2
+ import { defineConfig } from "oxlint";
2
3
 
3
4
  //#region src/nest.ts
4
- const config = [{
5
- name: "mahir/nest",
6
- plugins: { "@darraghor/nestjs-typed": eslintNestJs.plugin },
7
- languageOptions: { parserOptions: { emitDecoratorMetadata: true } },
8
- rules: { "@darraghor/nestjs-typed/sort-module-metadata-arrays": 2 }
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 eslintNestJs from '@darraghor/eslint-plugin-nestjs-typed';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'@darraghor/nestjs-typed/sort-module-metadata-arrays': 2,\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/nest',\n\t\tplugins: {\n\t\t\t'@darraghor/nestjs-typed': eslintNestJs.plugin,\n\t\t},\n\t\tlanguageOptions: {\n\t\t\tparserOptions: {\n\t\t\t\temitDecoratorMetadata: true,\n\t\t\t},\n\t\t},\n\t\trules,\n\t},\n];\n\nexport default config;\n"],"mappings":";;;AAQA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,SAAS,EACR,2BAA2B,aAAa,OACzC;CACA,iBAAiB,EAChB,eAAe,EACd,uBAAuB,KACxB,EACD;CACA,SAdD,uDAAuD,EAclD;AACL,CACD"}
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: TSESLint.FlatConfig.ConfigArray;
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 eslintPluginNext from "@next/eslint-plugin-next";
1
+ import { nativePlugins } from "./config.js";
2
+ import { defineConfig } from "oxlint";
2
3
 
3
4
  //#region src/next.ts
4
- const config = [{
5
- name: "mahir/next",
6
- plugins: { "@next/next": eslintPluginNext },
5
+ const config = defineConfig({
6
+ plugins: nativePlugins,
7
7
  rules: {
8
- "@next/next/google-font-display": 1,
9
- "@next/next/google-font-preconnect": 1,
10
- "@next/next/inline-script-id": 2,
11
- "@next/next/next-script-for-ga": 1,
12
- "@next/next/no-assign-module-variable": 2,
13
- "@next/next/no-before-interactive-script-outside-document": 2,
14
- "@next/next/no-css-tags": 1,
15
- "@next/next/no-document-import-in-page": 2,
16
- "@next/next/no-duplicate-head": 2,
17
- "@next/next/no-head-element": 1,
18
- "@next/next/no-head-import-in-document": 2,
19
- "@next/next/no-html-link-for-pages": 1,
20
- "@next/next/no-img-element": 1,
21
- "@next/next/no-page-custom-font": 1,
22
- "@next/next/no-script-component-in-head": 2,
23
- "@next/next/no-styled-jsx-in-document": 2,
24
- "@next/next/no-sync-scripts": 2,
25
- "@next/next/no-title-in-document-head": 2,
26
- "@next/next/no-typos": 2,
27
- "@next/next/no-unwanted-polyfillio": 2
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 eslintPluginNext from '@next/eslint-plugin-next';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'@next/next/google-font-display': 1,\n\t'@next/next/google-font-preconnect': 1,\n\t'@next/next/inline-script-id': 2,\n\t'@next/next/next-script-for-ga': 1,\n\t'@next/next/no-assign-module-variable': 2,\n\t'@next/next/no-before-interactive-script-outside-document': 2,\n\t'@next/next/no-css-tags': 1,\n\t'@next/next/no-document-import-in-page': 2,\n\t'@next/next/no-duplicate-head': 2,\n\t'@next/next/no-head-element': 1,\n\t'@next/next/no-head-import-in-document': 2,\n\t'@next/next/no-html-link-for-pages': 1,\n\t'@next/next/no-img-element': 1,\n\t'@next/next/no-page-custom-font': 1,\n\t'@next/next/no-script-component-in-head': 2,\n\t'@next/next/no-styled-jsx-in-document': 2,\n\t'@next/next/no-sync-scripts': 2,\n\t'@next/next/no-title-in-document-head': 2,\n\t'@next/next/no-typos': 2,\n\t'@next/next/no-unwanted-polyfillio': 2,\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/next',\n\t\tplugins: {\n\t\t\t'@next/next': eslintPluginNext,\n\t\t},\n\t\trules,\n\t},\n];\n\nexport default config;\n"],"mappings":";;;AA2BA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,SAAS,EACR,cAAc,iBACf;CACA;EA5BD,kCAAkC;EAClC,qCAAqC;EACrC,+BAA+B;EAC/B,iCAAiC;EACjC,wCAAwC;EACxC,4DAA4D;EAC5D,0BAA0B;EAC1B,yCAAyC;EACzC,gCAAgC;EAChC,8BAA8B;EAC9B,yCAAyC;EACzC,qCAAqC;EACrC,6BAA6B;EAC7B,kCAAkC;EAClC,0CAA0C;EAC1C,wCAAwC;EACxC,8BAA8B;EAC9B,wCAAwC;EACxC,uBAAuB;EACvB,qCAAqC;CAShC;AACL,CACD"}
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: TSESLint.FlatConfig.ConfigArray;
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 globals from "globals";
2
- import n from "eslint-plugin-n";
1
+ import { nativePlugins, packagePlugin } from "./config.js";
2
+ import { defineConfig } from "oxlint";
3
3
 
4
4
  //#region src/node.ts
5
- const rules = {
6
- "n/callback-return": 2,
7
- "n/handle-callback-err": 2,
8
- "n/no-callback-literal": 2,
9
- "n/no-deprecated-api": 2,
10
- "n/no-exports-assign": 2,
11
- "n/no-new-require": 2,
12
- "n/no-path-concat": 2,
13
- "n/no-sync": [2, {
14
- allowAtRootLevel: true,
15
- ignores: ["existsSync"]
16
- }],
17
- "n/no-unpublished-bin": 2,
18
- "n/prefer-global/buffer": [2, "never"],
19
- "n/prefer-global/console": [2, "always"],
20
- "n/prefer-global/process": [2, "never"],
21
- "n/prefer-global/text-decoder": [2, "never"],
22
- "n/prefer-global/text-encoder": [2, "never"],
23
- "n/prefer-global/url": [2, "never"],
24
- "n/prefer-global/url-search-params": [2, "never"],
25
- "n/process-exit-as-throw": 2,
26
- "n/hashbang": [2, { convertPath: { "src/**/*.js": ["^src/(.+?)\\.js$", "dist/$1.js"] } }],
27
- "no-restricted-globals": [
28
- 2,
29
- {
30
- name: "Buffer",
31
- message: "Import Buffer from `node:buffer` instead"
32
- },
33
- {
34
- name: "process",
35
- message: "Import process from `node:process` instead"
36
- },
37
- {
38
- name: "setTimeout",
39
- message: "Import setTimeout from `node:timers` instead"
40
- },
41
- {
42
- name: "setInterval",
43
- message: "Import setInterval from `node:timers` instead"
44
- },
45
- {
46
- name: "setImmediate",
47
- message: "Import setImmediate from `node:timers` instead"
48
- },
49
- {
50
- name: "clearTimeout",
51
- message: "Import clearTimeout from `node:timers` instead"
52
- },
53
- {
54
- name: "clearInterval",
55
- message: "Import clearInterval from `node:timers` instead"
56
- },
57
- {
58
- name: "clearImmediate",
59
- message: "Import clearImmediate from `node:timers` instead"
60
- }
61
- ],
62
- "unicorn/prefer-node-protocol": 2,
63
- "unicorn/require-post-message-target-origin": 0
64
- };
65
- const config = [{
66
- name: "mahir/node",
67
- languageOptions: {
68
- globals: {
69
- ...n.configs["recommended-module"].globals,
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 n from 'eslint-plugin-n';\nimport globals from 'globals';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'n/callback-return': 2,\n\t'n/handle-callback-err': 2,\n\t'n/no-callback-literal': 2,\n\t'n/no-deprecated-api': 2,\n\t'n/no-exports-assign': 2,\n\t'n/no-new-require': 2,\n\t'n/no-path-concat': 2,\n\t'n/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'n/no-unpublished-bin': 2,\n\t'n/prefer-global/buffer': [2, 'never'],\n\t'n/prefer-global/console': [2, 'always'],\n\t'n/prefer-global/process': [2, 'never'],\n\t'n/prefer-global/text-decoder': [2, 'never'],\n\t'n/prefer-global/text-encoder': [2, 'never'],\n\t'n/prefer-global/url': [2, 'never'],\n\t'n/prefer-global/url-search-params': [2, 'never'],\n\t'n/process-exit-as-throw': 2,\n\t'n/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: TSESLint.FlatConfig.ConfigArray = [\n\t{\n\t\tname: 'mahir/node',\n\t\tlanguageOptions: {\n\t\t\tglobals: {\n\t\t\t\t...n.configs['recommended-module'].globals,\n\t\t\t\t...globals.node,\n\t\t\t},\n\t\t\tparserOptions: {\n\t\t\t\tecmaFeatures: {\n\t\t\t\t\tglobalReturn: true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tplugins: {\n\t\t\tn,\n\t\t},\n\t\trules,\n\t},\n];\n\nexport default config;\n"],"mappings":";;;;AAKA,MAAM,QAAmC;CACxC,qBAAqB;CACrB,yBAAyB;CACzB,yBAAyB;CACzB,uBAAuB;CACvB,uBAAuB;CACvB,oBAAoB;CACpB,oBAAoB;CACpB,aAAa,CACZ,GACA;EACC,kBAAkB;EAClB,SAAS,CAAC,YAAY;CACvB,CACD;CACA,wBAAwB;CACxB,0BAA0B,CAAC,GAAG,OAAO;CACrC,2BAA2B,CAAC,GAAG,QAAQ;CACvC,2BAA2B,CAAC,GAAG,OAAO;CACtC,gCAAgC,CAAC,GAAG,OAAO;CAC3C,gCAAgC,CAAC,GAAG,OAAO;CAC3C,uBAAuB,CAAC,GAAG,OAAO;CAClC,qCAAqC,CAAC,GAAG,OAAO;CAChD,2BAA2B;CAC3B,cAAc,CACb,GACA,EACC,aAAa,EACZ,eAAe,CAAC,oBAAoB,YAAY,EACjD,EACD,CACD;CACA,yBAAyB;EACxB;EACA;GAAE,MAAM;GAAU,SAAS;EAA2C;EACtE;GAAE,MAAM;GAAW,SAAS;EAA6C;EACzE;GAAE,MAAM;GAAc,SAAS;EAA+C;EAC9E;GAAE,MAAM;GAAe,SAAS;EAAgD;EAChF;GAAE,MAAM;GAAgB,SAAS;EAAiD;EAClF;GAAE,MAAM;GAAgB,SAAS;EAAiD;EAClF;GAAE,MAAM;GAAiB,SAAS;EAAkD;EACpF;GAAE,MAAM;GAAkB,SAAS;EAAmD;CACvF;CACA,gCAAgC;CAChC,8CAA8C;AAC/C;AAEA,MAAM,SAA0C,CAC/C;CACC,MAAM;CACN,iBAAiB;EAChB,SAAS;GACR,GAAG,EAAE,QAAQ,qBAAqB,CAAC;GACnC,GAAG,QAAQ;EACZ;EACA,eAAe,EACd,cAAc,EACb,cAAc,KACf,EACD;CACD;CACA,SAAS,EACR,EACD;CACA;AACD,CACD"}
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"}
@@ -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);