@longzai-intelligence/oxlint-plugin-stylistic 0.0.1

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.
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e={"@longzai-intelligence/stylistic/multiline-comment-style":`error`,"@longzai-intelligence/stylistic/lines-around-comment":[`error`,{beforeBlockComment:!0,beforeLineComment:!1,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,allowInterfaceStart:!0,allowInterfaceEnd:!0,allowTypeStart:!0,allowTypeEnd:!0,allowEnumStart:!0,allowEnumEnd:!0,allowModuleStart:!0,allowModuleEnd:!0}],"@longzai-intelligence/stylistic/padding-line-between-statements":`error`};exports.recommended=e;
@@ -0,0 +1,6 @@
1
+ import { OxlintRules } from "@longzai-intelligence/oxlint-core";
2
+
3
+ //#region src/configs/recommended.config.d.ts
4
+ declare const recommended: OxlintRules;
5
+ //#endregion
6
+ export { recommended };
@@ -0,0 +1,6 @@
1
+ import { OxlintRules } from "@longzai-intelligence/oxlint-core";
2
+
3
+ //#region src/configs/recommended.config.d.ts
4
+ declare const recommended: OxlintRules;
5
+ //#endregion
6
+ export { recommended };
@@ -0,0 +1 @@
1
+ const e={"@longzai-intelligence/stylistic/multiline-comment-style":`error`,"@longzai-intelligence/stylistic/lines-around-comment":[`error`,{beforeBlockComment:!0,beforeLineComment:!1,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,allowInterfaceStart:!0,allowInterfaceEnd:!0,allowTypeStart:!0,allowTypeEnd:!0,allowEnumStart:!0,allowEnumEnd:!0,allowModuleStart:!0,allowModuleEnd:!0}],"@longzai-intelligence/stylistic/padding-line-between-statements":`error`};export{e as recommended};
package/dist/index.cjs ADDED
@@ -0,0 +1,4 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require(`@oxlint/plugins`);function t(){return{isBlockStart:!1,isBlockEnd:!1,isObjectStart:!1,isObjectEnd:!1,isArrayStart:!1,isArrayEnd:!1,isClassStart:!1,isClassEnd:!1,isInterfaceStart:!1,isInterfaceEnd:!1,isTypeStart:!1,isTypeEnd:!1,isEnumStart:!1,isEnumEnd:!1,isModuleStart:!1,isModuleEnd:!1,isFunctionStart:!1,isFunctionEnd:!1}}function n(e){return e.includes(`type `)||e.includes(`type{`)||e.includes(`Array<{`)||e.includes(`Promise<{`)||e.includes(`<{`)||e.includes(`| {`)||e.includes(`as {`)||e.includes(`Record<{`)||e.includes(`Partial<{`)||e.includes(`Required<{`)||e.includes(`Pick<{`)||e.includes(`Omit<{`)}function r(e,t){for(let n=2;n<=5&&t>n;n++){let r=e[t-n-1];if(r){let e=r.trimEnd();if(e.includes(`Record<{`)||e.includes(`Partial<{`)||e.includes(`Required<{`)||e.includes(`Pick<{`)||e.includes(`Omit<{`)||e.includes(`Array<{`)||e.includes(`Promise<{`)||e.includes(`type `)||e.includes(`interface `))return!0}}return!1}function i(e){return e.endsWith(`) {`)||e.endsWith(`){`)||/\)\s*(?::\s*\w+(?:<[^>]*>)*\s*)?\{/.test(e)||e.includes(`=> {`)}function a(e){return e.endsWith(`) {`)||e.endsWith(`){`)||e===`{`||/: \w+(?:<[^>]*>)? \{$/.test(e)||/\)\s*(?::\s*\w+(?:<[^>]*>)*\s*)?\{/.test(e)||e.endsWith(`}> {`)||e.includes(`try {`)||e.includes(`catch {`)||e.includes(`finally {`)||e.includes(`=> {`)}function o(e,t,o,s){n(t)?e.isTypeStart=!0:t.trim()===`{`?r(o,s)?e.isTypeStart=!0:e.isBlockStart=!0:t.includes(`interface `)||t.includes(`interface{`)?e.isInterfaceStart=!0:t.includes(`enum `)||t.includes(`enum{`)?e.isEnumStart=!0:t.includes(`module `)||t.includes(`module{`)?e.isModuleStart=!0:t.includes(`class `)||t.includes(`class{`)?e.isClassStart=!0:a(t)?(e.isBlockStart=!0,i(t)&&(e.isFunctionStart=!0)):t.includes(`: {`)||t.endsWith(`= {`)?e.isObjectStart=!0:t.includes(`: [`)||t.endsWith(`= [`)||t.endsWith(`[`)?e.isArrayStart=!0:e.isBlockStart=!0}function s(e,t,n){if(t<=1)return;let r=n[t-2];if(!r)return;let i=r.trimEnd();i.endsWith(`{`)||/>+\s*\{\s*$/.test(i)?o(e,i,n,t):i.endsWith(`[`)&&(e.isArrayStart=!0)}function c(e,t,n){if(t>=n.length)return;let r=n[t];if(!r)return;let i=r.trimStart();(i.startsWith(`}`)||i.startsWith(`];`))&&(i===`}`||i===`};`?(e.isBlockEnd=!0,e.isObjectEnd=!0,e.isClassEnd=!0,e.isInterfaceEnd=!0,e.isTypeEnd=!0,e.isEnumEnd=!0,e.isModuleEnd=!0,e.isFunctionEnd=!0):i.startsWith(`];`)&&(e.isArrayEnd=!0))}function l(e,n){let r=t(),i=e.loc.start.line,a=e.loc.end.line;return s(r,i,n),c(r,a,n),r}const u={beforeBlockComment:!0,afterBlockComment:!1,beforeLineComment:!1,afterLineComment:!1,allowBlockStart:!1,allowBlockEnd:!1,allowObjectStart:!1,allowObjectEnd:!1,allowArrayStart:!1,allowArrayEnd:!1,allowClassStart:!1,allowClassEnd:!1,allowInterfaceStart:!1,allowInterfaceEnd:!1,allowTypeStart:!1,allowTypeEnd:!1,allowEnumStart:!1,allowEnumEnd:!1,allowModuleStart:!1,allowModuleEnd:!1,allowFunctionStart:!1,allowFunctionEnd:!1};function d(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function f(e,t,n){let r=t[n];typeof r==`boolean`&&(e[n]=r)}function p(e,t){f(e,t,`beforeBlockComment`),f(e,t,`afterBlockComment`),f(e,t,`beforeLineComment`),f(e,t,`afterLineComment`),f(e,t,`allowBlockStart`),f(e,t,`allowBlockEnd`),f(e,t,`allowObjectStart`),f(e,t,`allowObjectEnd`),f(e,t,`allowArrayStart`),f(e,t,`allowArrayEnd`),f(e,t,`allowClassStart`),f(e,t,`allowClassEnd`),f(e,t,`allowInterfaceStart`),f(e,t,`allowInterfaceEnd`),f(e,t,`allowTypeStart`),f(e,t,`allowTypeEnd`),f(e,t,`allowEnumStart`),f(e,t,`allowEnumEnd`),f(e,t,`allowModuleStart`),f(e,t,`allowModuleEnd`),f(e,t,`allowFunctionStart`),f(e,t,`allowFunctionEnd`)}function m(e){let t={...u};return d(e)&&p(t,e),t}function h(e,t){return e<=1?!0:t[e-2]?.trim()===``}function g(e,t){return e>=t.length?!0:t[e]?.trim()===``}function _(e,t){return e.isBlockStart&&(t.allowBlockStart??!1)||e.isObjectStart&&(t.allowObjectStart??!1)||e.isArrayStart&&(t.allowArrayStart??!1)||e.isClassStart&&(t.allowClassStart??!1)||e.isInterfaceStart&&(t.allowInterfaceStart??!1)||e.isTypeStart&&(t.allowTypeStart??!1)||e.isEnumStart&&(t.allowEnumStart??!1)||e.isModuleStart&&(t.allowModuleStart??!1)||e.isFunctionStart&&(t.allowFunctionStart??!1)}function v(e,t){return e.isBlockEnd&&(t.allowBlockEnd??!1)||e.isObjectEnd&&(t.allowObjectEnd??!1)||e.isArrayEnd&&(t.allowArrayEnd??!1)||e.isClassEnd&&(t.allowClassEnd??!1)||e.isInterfaceEnd&&(t.allowInterfaceEnd??!1)||e.isTypeEnd&&(t.allowTypeEnd??!1)||e.isEnumEnd&&(t.allowEnumEnd??!1)||e.isModuleEnd&&(t.allowModuleEnd??!1)||e.isFunctionEnd&&(t.allowFunctionEnd??!1)}function y(e,t,n,r,i){let a=e.type===`Block`;if(a&&n.beforeBlockComment||!a&&n.beforeLineComment){if(_(i,n))return;let o=e.loc.start.line;h(o,t)||r.report({loc:{start:e.loc.start,end:e.loc.start},message:a?`块注释前需要空行`:`行注释前需要空行`})}}function b(e,t,n,r,i){let a=e.type===`Block`;if(a&&n.afterBlockComment||!a&&n.afterLineComment){if(v(i,n))return;let o=e.loc.end.line;g(o,t)||r.report({loc:{start:e.loc.end,end:e.loc.end},message:a?`块注释后需要空行`:`行注释后需要空行`})}}function x(e,t,n,r){let i=l(e,t);y(e,t,n,r,i),b(e,t,n,r,i)}const S=(0,e.defineRule)({meta:{type:`layout`,docs:{description:`要求在注释前后有空行`},schema:[{type:`object`,properties:{beforeBlockComment:{type:`boolean`},afterBlockComment:{type:`boolean`},beforeLineComment:{type:`boolean`},afterLineComment:{type:`boolean`},allowBlockStart:{type:`boolean`},allowBlockEnd:{type:`boolean`},allowObjectStart:{type:`boolean`},allowObjectEnd:{type:`boolean`},allowArrayStart:{type:`boolean`},allowArrayEnd:{type:`boolean`},allowClassStart:{type:`boolean`},allowClassEnd:{type:`boolean`},allowInterfaceStart:{type:`boolean`},allowInterfaceEnd:{type:`boolean`},allowTypeStart:{type:`boolean`},allowTypeEnd:{type:`boolean`},allowEnumStart:{type:`boolean`},allowEnumEnd:{type:`boolean`},allowModuleStart:{type:`boolean`},allowModuleEnd:{type:`boolean`},allowFunctionStart:{type:`boolean`},allowFunctionEnd:{type:`boolean`}},additionalProperties:!1}]},createOnce(e){let t=[];return{Program(){let n=m(e.options?.[0]);t=e.sourceCode.text.split(`
2
+ `);let r=e.sourceCode.getAllComments();for(let i of r)x(i,t,n,e)}}}}),C=(0,e.defineRule)({meta:{type:`layout`,docs:{description:`强制多行注释使用星号块样式`}},createOnce(e){return{Program(t){let n=e.sourceCode.getAllComments();for(let t of n){if(t.type!==`Block`)continue;let n=t.value;if(!n.startsWith(`*`))continue;let r=n.split(`
3
+ `);if(!(r.length<=1))for(let n=1;n<r.length-1;n++){let i=r[n]?.trim();if(i&&!i.startsWith(`*`)){e.report({loc:{start:t.loc.start,end:t.loc.end},message:`多行注释的中间行应以 "*" 开头`});break}}}}}}});function w(e){return e.type===`ExportNamedDeclaration`||e.type===`ExportDefaultDeclaration`||e.type===`ExportAllDeclaration`}function T(e,t,n){if(n-t<=1)return!1;for(let r=t+1;r<n;r++)if(e[r-1]?.trim()===``)return!0;return!1}function E(e){return e.type===`Program`}function D(e,t,n){for(let r=1;r<e.length;r++){let i=e[r-1],a=e[r];if(!(i===void 0||a===void 0)&&w(i)&&w(a)){let e=i.loc.end.line,r=a.loc.start.line;T(t,e,r)||n.report({loc:a.loc.start,message:`export 语句之间需要空行`})}}}const O={"multiline-comment-style":C,"lines-around-comment":S,"padding-line-between-statements":(0,e.defineRule)({meta:{type:`layout`,docs:{description:`要求在 export 语句之间有空行`}},createOnce(e){return{Program(t){let n=e.sourceCode.text.split(`
4
+ `),r=E(t)?t:null;r&&D(r.body,n,e)}}}})},k=(0,e.eslintCompatPlugin)({meta:{name:`@longzai-intelligence/stylistic`},rules:O});exports.default=k,exports.stylisticPlugin=k,exports.stylisticRules=O;
@@ -0,0 +1,8 @@
1
+ import * as _$_oxlint_plugins0 from "@oxlint/plugins";
2
+ import { Rule } from "@oxlint/plugins";
3
+
4
+ //#region src/index.d.ts
5
+ declare const stylisticRules: Record<string, Rule>;
6
+ declare const stylisticPlugin: _$_oxlint_plugins0.Plugin;
7
+ //#endregion
8
+ export { stylisticPlugin as default, stylisticPlugin, stylisticRules };
@@ -0,0 +1,8 @@
1
+ import * as _$_oxlint_plugins0 from "@oxlint/plugins";
2
+ import { Rule } from "@oxlint/plugins";
3
+
4
+ //#region src/index.d.ts
5
+ declare const stylisticRules: Record<string, Rule>;
6
+ declare const stylisticPlugin: _$_oxlint_plugins0.Plugin;
7
+ //#endregion
8
+ export { stylisticPlugin as default, stylisticPlugin, stylisticRules };
package/dist/index.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import{defineRule as e,eslintCompatPlugin as t}from"@oxlint/plugins";function n(){return{isBlockStart:!1,isBlockEnd:!1,isObjectStart:!1,isObjectEnd:!1,isArrayStart:!1,isArrayEnd:!1,isClassStart:!1,isClassEnd:!1,isInterfaceStart:!1,isInterfaceEnd:!1,isTypeStart:!1,isTypeEnd:!1,isEnumStart:!1,isEnumEnd:!1,isModuleStart:!1,isModuleEnd:!1,isFunctionStart:!1,isFunctionEnd:!1}}function r(e){return e.includes(`type `)||e.includes(`type{`)||e.includes(`Array<{`)||e.includes(`Promise<{`)||e.includes(`<{`)||e.includes(`| {`)||e.includes(`as {`)||e.includes(`Record<{`)||e.includes(`Partial<{`)||e.includes(`Required<{`)||e.includes(`Pick<{`)||e.includes(`Omit<{`)}function i(e,t){for(let n=2;n<=5&&t>n;n++){let r=e[t-n-1];if(r){let e=r.trimEnd();if(e.includes(`Record<{`)||e.includes(`Partial<{`)||e.includes(`Required<{`)||e.includes(`Pick<{`)||e.includes(`Omit<{`)||e.includes(`Array<{`)||e.includes(`Promise<{`)||e.includes(`type `)||e.includes(`interface `))return!0}}return!1}function a(e){return e.endsWith(`) {`)||e.endsWith(`){`)||/\)\s*(?::\s*\w+(?:<[^>]*>)*\s*)?\{/.test(e)||e.includes(`=> {`)}function o(e){return e.endsWith(`) {`)||e.endsWith(`){`)||e===`{`||/: \w+(?:<[^>]*>)? \{$/.test(e)||/\)\s*(?::\s*\w+(?:<[^>]*>)*\s*)?\{/.test(e)||e.endsWith(`}> {`)||e.includes(`try {`)||e.includes(`catch {`)||e.includes(`finally {`)||e.includes(`=> {`)}function s(e,t,n,s){r(t)?e.isTypeStart=!0:t.trim()===`{`?i(n,s)?e.isTypeStart=!0:e.isBlockStart=!0:t.includes(`interface `)||t.includes(`interface{`)?e.isInterfaceStart=!0:t.includes(`enum `)||t.includes(`enum{`)?e.isEnumStart=!0:t.includes(`module `)||t.includes(`module{`)?e.isModuleStart=!0:t.includes(`class `)||t.includes(`class{`)?e.isClassStart=!0:o(t)?(e.isBlockStart=!0,a(t)&&(e.isFunctionStart=!0)):t.includes(`: {`)||t.endsWith(`= {`)?e.isObjectStart=!0:t.includes(`: [`)||t.endsWith(`= [`)||t.endsWith(`[`)?e.isArrayStart=!0:e.isBlockStart=!0}function c(e,t,n){if(t<=1)return;let r=n[t-2];if(!r)return;let i=r.trimEnd();i.endsWith(`{`)||/>+\s*\{\s*$/.test(i)?s(e,i,n,t):i.endsWith(`[`)&&(e.isArrayStart=!0)}function l(e,t,n){if(t>=n.length)return;let r=n[t];if(!r)return;let i=r.trimStart();(i.startsWith(`}`)||i.startsWith(`];`))&&(i===`}`||i===`};`?(e.isBlockEnd=!0,e.isObjectEnd=!0,e.isClassEnd=!0,e.isInterfaceEnd=!0,e.isTypeEnd=!0,e.isEnumEnd=!0,e.isModuleEnd=!0,e.isFunctionEnd=!0):i.startsWith(`];`)&&(e.isArrayEnd=!0))}function u(e,t){let r=n(),i=e.loc.start.line,a=e.loc.end.line;return c(r,i,t),l(r,a,t),r}const d={beforeBlockComment:!0,afterBlockComment:!1,beforeLineComment:!1,afterLineComment:!1,allowBlockStart:!1,allowBlockEnd:!1,allowObjectStart:!1,allowObjectEnd:!1,allowArrayStart:!1,allowArrayEnd:!1,allowClassStart:!1,allowClassEnd:!1,allowInterfaceStart:!1,allowInterfaceEnd:!1,allowTypeStart:!1,allowTypeEnd:!1,allowEnumStart:!1,allowEnumEnd:!1,allowModuleStart:!1,allowModuleEnd:!1,allowFunctionStart:!1,allowFunctionEnd:!1};function f(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function p(e,t,n){let r=t[n];typeof r==`boolean`&&(e[n]=r)}function m(e,t){p(e,t,`beforeBlockComment`),p(e,t,`afterBlockComment`),p(e,t,`beforeLineComment`),p(e,t,`afterLineComment`),p(e,t,`allowBlockStart`),p(e,t,`allowBlockEnd`),p(e,t,`allowObjectStart`),p(e,t,`allowObjectEnd`),p(e,t,`allowArrayStart`),p(e,t,`allowArrayEnd`),p(e,t,`allowClassStart`),p(e,t,`allowClassEnd`),p(e,t,`allowInterfaceStart`),p(e,t,`allowInterfaceEnd`),p(e,t,`allowTypeStart`),p(e,t,`allowTypeEnd`),p(e,t,`allowEnumStart`),p(e,t,`allowEnumEnd`),p(e,t,`allowModuleStart`),p(e,t,`allowModuleEnd`),p(e,t,`allowFunctionStart`),p(e,t,`allowFunctionEnd`)}function h(e){let t={...d};return f(e)&&m(t,e),t}function g(e,t){return e<=1?!0:t[e-2]?.trim()===``}function _(e,t){return e>=t.length?!0:t[e]?.trim()===``}function v(e,t){return e.isBlockStart&&(t.allowBlockStart??!1)||e.isObjectStart&&(t.allowObjectStart??!1)||e.isArrayStart&&(t.allowArrayStart??!1)||e.isClassStart&&(t.allowClassStart??!1)||e.isInterfaceStart&&(t.allowInterfaceStart??!1)||e.isTypeStart&&(t.allowTypeStart??!1)||e.isEnumStart&&(t.allowEnumStart??!1)||e.isModuleStart&&(t.allowModuleStart??!1)||e.isFunctionStart&&(t.allowFunctionStart??!1)}function y(e,t){return e.isBlockEnd&&(t.allowBlockEnd??!1)||e.isObjectEnd&&(t.allowObjectEnd??!1)||e.isArrayEnd&&(t.allowArrayEnd??!1)||e.isClassEnd&&(t.allowClassEnd??!1)||e.isInterfaceEnd&&(t.allowInterfaceEnd??!1)||e.isTypeEnd&&(t.allowTypeEnd??!1)||e.isEnumEnd&&(t.allowEnumEnd??!1)||e.isModuleEnd&&(t.allowModuleEnd??!1)||e.isFunctionEnd&&(t.allowFunctionEnd??!1)}function b(e,t,n,r,i){let a=e.type===`Block`;if(a&&n.beforeBlockComment||!a&&n.beforeLineComment){if(v(i,n))return;let o=e.loc.start.line;g(o,t)||r.report({loc:{start:e.loc.start,end:e.loc.start},message:a?`块注释前需要空行`:`行注释前需要空行`})}}function x(e,t,n,r,i){let a=e.type===`Block`;if(a&&n.afterBlockComment||!a&&n.afterLineComment){if(y(i,n))return;let o=e.loc.end.line;_(o,t)||r.report({loc:{start:e.loc.end,end:e.loc.end},message:a?`块注释后需要空行`:`行注释后需要空行`})}}function S(e,t,n,r){let i=u(e,t);b(e,t,n,r,i),x(e,t,n,r,i)}const C=e({meta:{type:`layout`,docs:{description:`要求在注释前后有空行`},schema:[{type:`object`,properties:{beforeBlockComment:{type:`boolean`},afterBlockComment:{type:`boolean`},beforeLineComment:{type:`boolean`},afterLineComment:{type:`boolean`},allowBlockStart:{type:`boolean`},allowBlockEnd:{type:`boolean`},allowObjectStart:{type:`boolean`},allowObjectEnd:{type:`boolean`},allowArrayStart:{type:`boolean`},allowArrayEnd:{type:`boolean`},allowClassStart:{type:`boolean`},allowClassEnd:{type:`boolean`},allowInterfaceStart:{type:`boolean`},allowInterfaceEnd:{type:`boolean`},allowTypeStart:{type:`boolean`},allowTypeEnd:{type:`boolean`},allowEnumStart:{type:`boolean`},allowEnumEnd:{type:`boolean`},allowModuleStart:{type:`boolean`},allowModuleEnd:{type:`boolean`},allowFunctionStart:{type:`boolean`},allowFunctionEnd:{type:`boolean`}},additionalProperties:!1}]},createOnce(e){let t=[];return{Program(){let n=h(e.options?.[0]);t=e.sourceCode.text.split(`
2
+ `);let r=e.sourceCode.getAllComments();for(let i of r)S(i,t,n,e)}}}}),w=e({meta:{type:`layout`,docs:{description:`强制多行注释使用星号块样式`}},createOnce(e){return{Program(t){let n=e.sourceCode.getAllComments();for(let t of n){if(t.type!==`Block`)continue;let n=t.value;if(!n.startsWith(`*`))continue;let r=n.split(`
3
+ `);if(!(r.length<=1))for(let n=1;n<r.length-1;n++){let i=r[n]?.trim();if(i&&!i.startsWith(`*`)){e.report({loc:{start:t.loc.start,end:t.loc.end},message:`多行注释的中间行应以 "*" 开头`});break}}}}}}});function T(e){return e.type===`ExportNamedDeclaration`||e.type===`ExportDefaultDeclaration`||e.type===`ExportAllDeclaration`}function E(e,t,n){if(n-t<=1)return!1;for(let r=t+1;r<n;r++)if(e[r-1]?.trim()===``)return!0;return!1}function D(e){return e.type===`Program`}function O(e,t,n){for(let r=1;r<e.length;r++){let i=e[r-1],a=e[r];if(!(i===void 0||a===void 0)&&T(i)&&T(a)){let e=i.loc.end.line,r=a.loc.start.line;E(t,e,r)||n.report({loc:a.loc.start,message:`export 语句之间需要空行`})}}}const k={"multiline-comment-style":w,"lines-around-comment":C,"padding-line-between-statements":e({meta:{type:`layout`,docs:{description:`要求在 export 语句之间有空行`}},createOnce(e){return{Program(t){let n=e.sourceCode.text.split(`
4
+ `),r=D(t)?t:null;r&&O(r.body,n,e)}}}})},A=t({meta:{name:`@longzai-intelligence/stylistic`},rules:k});export{A as default,A as stylisticPlugin,k as stylisticRules};
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@longzai-intelligence/oxlint-plugin-stylistic",
3
+ "version": "0.0.1",
4
+ "description": "Oxlint stylistic 兼容插件,提供 @stylistic 规则的 Oxlint 实现",
5
+ "license": "UNLICENSED",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "type": "module",
10
+ "main": "./dist/index.cjs",
11
+ "module": "./dist/index.mjs",
12
+ "types": "./dist/index.d.mts",
13
+ "exports": {
14
+ ".": {
15
+ "types": {
16
+ "import": "./dist/index.d.mts",
17
+ "require": "./dist/index.d.cts"
18
+ },
19
+ "import": "./dist/index.mjs",
20
+ "require": "./dist/index.cjs"
21
+ },
22
+ "./configs/recommended": {
23
+ "types": {
24
+ "import": "./dist/configs/recommended.d.mts",
25
+ "require": "./dist/configs/recommended.d.cts"
26
+ },
27
+ "import": "./dist/configs/recommended.mjs",
28
+ "require": "./dist/configs/recommended.cjs"
29
+ }
30
+ },
31
+ "scripts": {
32
+ "build": "tsdown",
33
+ "build:prod": "NODE_ENV=production tsdown",
34
+ "prepublishOnly": "bun run build:prod",
35
+ "dev": "tsdown --watch",
36
+ "clean": "rimraf dist",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest",
39
+ "test:coverage": "vitest run --coverage",
40
+ "lint": "bun run lint:oxlint",
41
+ "lint:oxlint": "oxlint",
42
+ "lint:eslint": "eslint .",
43
+ "lint:fix": "bun run oxc:fix",
44
+ "lint:fix:oxlint": "oxlint --fix",
45
+ "lint:fix:eslint": "eslint . --fix",
46
+ "typecheck": "bun run typecheck:app && bun run typecheck:node",
47
+ "typecheck:app": "tsc --noEmit -p tsconfig/app.json",
48
+ "typecheck:node": "tsc --noEmit -p tsconfig/node.json",
49
+ "lint:file": "bun run lint:file:oxlint",
50
+ "lint:file:oxlint": "oxlint",
51
+ "lint:file:eslint": "eslint",
52
+ "fmt": "oxfmt",
53
+ "fmt:check": "oxfmt --check",
54
+ "oxc": "bun run lint:oxlint && bun run fmt:check",
55
+ "oxc:fix": "bun run lint:fix:oxlint && bun run fmt"
56
+ },
57
+ "dependencies": {
58
+ "@longzai-intelligence/oxlint-core": "0.0.1",
59
+ "@oxlint/plugins": "^1.64.0"
60
+ },
61
+ "devDependencies": {
62
+ "@longzai-intelligence/eslint-preset-library": "0.2.13",
63
+ "@longzai-intelligence/oxlint-config": "0.0.1",
64
+ "@longzai-intelligence/oxlint-plugin-architecture": "0.0.1",
65
+ "@longzai-intelligence/oxlint-plugin-code-style": "0.0.1",
66
+ "@longzai-intelligence/oxlint-plugin-package-json": "0.0.1",
67
+ "@longzai-intelligence/oxlint-plugin-perfectionist": "0.0.1",
68
+ "@longzai-intelligence/oxlint-plugin-schema-type-separation": "0.0.1",
69
+ "@longzai-intelligence/oxlint-plugin-stylistic": "0.0.1",
70
+ "@longzai-intelligence/oxlint-plugin-tsdoc": "0.0.1",
71
+ "@longzai-intelligence/oxlint-plugin-typescript-eslint": "0.0.1",
72
+ "@longzai-intelligence/oxlint-plugin-zod": "0.0.1",
73
+ "@longzai-intelligence/oxlint-testing": "0.0.1",
74
+ "@longzai-intelligence/oxlint-utils": "0.0.1",
75
+ "@longzai-intelligence/tsdown-config": "0.0.1",
76
+ "@longzai-intelligence/typescript-config": "0.0.3",
77
+ "@longzai-intelligence/vitest-config": "0.0.10",
78
+ "@types/node": "^25.7.0",
79
+ "oxlint": "^1.64.0",
80
+ "rimraf": "^6.1.3",
81
+ "tsdown": "^0.21.10",
82
+ "typescript": "^6.0.3",
83
+ "vitest": "^4.1.6"
84
+ },
85
+ "peerDependencies": {
86
+ "oxlint": ">=1.0.0"
87
+ }
88
+ }