@docyrus/rules 0.0.6 → 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.
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",
3
+ "organizeImports": {
4
+ "enabled": true
5
+ },
6
+ "linter": {
7
+ "enabled": true,
8
+ "rules": {
9
+ "recommended": true
10
+ }
11
+ },
12
+ "formatter": {
13
+ "enabled": true,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2,
16
+ "lineWidth": 100
17
+ },
18
+ "javascript": {
19
+ "formatter": {
20
+ "quoteStyle": "single",
21
+ "semicolons": "always",
22
+ "trailingCommas": "es5"
23
+ }
24
+ },
25
+ "files": {
26
+ "ignore": [ "dist", "node_modules", ".astro", "**/*.astro" ]
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
3
+ "organizeImports": {
4
+ "enabled": true
5
+ },
6
+ "linter": {
7
+ "enabled": true,
8
+ "rules": {
9
+ "recommended": true
10
+ }
11
+ },
12
+ "formatter": {
13
+ "enabled": true,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2,
16
+ "lineWidth": 100
17
+ },
18
+ "javascript": {
19
+ "formatter": {
20
+ "quoteStyle": "single",
21
+ "semicolons": "always",
22
+ "trailingCommas": "es5"
23
+ }
24
+ },
25
+ "files": {
26
+ "ignore": [ "dist", "dist-electron", "release", "out", "node_modules" ]
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",
3
+ "organizeImports": {
4
+ "enabled": true
5
+ },
6
+ "linter": {
7
+ "enabled": true,
8
+ "rules": {
9
+ "recommended": true
10
+ }
11
+ },
12
+ "formatter": {
13
+ "enabled": true,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2,
16
+ "lineWidth": 100
17
+ },
18
+ "javascript": {
19
+ "formatter": {
20
+ "quoteStyle": "single",
21
+ "semicolons": "always",
22
+ "trailingCommas": "es5"
23
+ }
24
+ },
25
+ "files": {
26
+ "ignore": [ "dist", "node_modules", "**/*.vue" ]
27
+ }
28
+ }
@@ -0,0 +1,3 @@
1
+ import { type Linter } from 'eslint';
2
+ export declare const astroConfig: Linter.Config[];
3
+ //# sourceMappingURL=astro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro.d.ts","sourceRoot":"","sources":["../../src/eslint/astro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAA4D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import astroPlugin from 'eslint-plugin-astro';
2
+ export const astroConfig = [...astroPlugin.configs.recommended];
@@ -0,0 +1,3 @@
1
+ import { type Linter } from 'eslint';
2
+ export declare const electronConfig: Linter.Config[];
3
+ //# sourceMappingURL=electron.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"electron.d.ts","sourceRoot":"","sources":["../../src/eslint/electron.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMlD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EA2DzC,CAAC"}
@@ -0,0 +1,63 @@
1
+ import nodePlugin from 'eslint-plugin-n';
2
+ import reactHooksPlugin from 'eslint-plugin-react-hooks';
3
+ import reactRefreshPlugin from 'eslint-plugin-react-refresh';
4
+ export const electronConfig = [
5
+ // Main process (Node.js) rules
6
+ {
7
+ files: ['electron/**/*.{ts,js,mjs}'],
8
+ languageOptions: {
9
+ globals: {
10
+ __dirname: 'readonly',
11
+ __filename: 'readonly',
12
+ process: 'readonly',
13
+ Buffer: 'readonly',
14
+ console: 'readonly',
15
+ setTimeout: 'readonly',
16
+ clearTimeout: 'readonly',
17
+ setInterval: 'readonly',
18
+ clearInterval: 'readonly'
19
+ }
20
+ },
21
+ plugins: {
22
+ n: nodePlugin
23
+ },
24
+ rules: {
25
+ 'n/no-missing-import': 'off',
26
+ 'n/no-unsupported-features/es-syntax': 'off'
27
+ }
28
+ },
29
+ // Renderer process (React) rules
30
+ {
31
+ files: ['src/**/*.{ts,tsx,js,jsx}'],
32
+ ignores: [
33
+ '**/dist-electron/**',
34
+ '**/release/**',
35
+ '**/out/**'
36
+ ],
37
+ languageOptions: {
38
+ globals: {
39
+ window: 'readonly',
40
+ document: 'readonly',
41
+ console: 'readonly',
42
+ setTimeout: 'readonly',
43
+ clearTimeout: 'readonly',
44
+ setInterval: 'readonly',
45
+ clearInterval: 'readonly',
46
+ localStorage: 'readonly',
47
+ sessionStorage: 'readonly',
48
+ fetch: 'readonly',
49
+ URL: 'readonly',
50
+ URLSearchParams: 'readonly'
51
+ }
52
+ },
53
+ plugins: {
54
+ 'react-hooks': reactHooksPlugin,
55
+ 'react-refresh': reactRefreshPlugin
56
+ },
57
+ rules: {
58
+ 'react-hooks/rules-of-hooks': 'error',
59
+ 'react-hooks/exhaustive-deps': 'error',
60
+ 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }]
61
+ }
62
+ }
63
+ ];
@@ -3,4 +3,7 @@ export { reactConfig } from './react.js';
3
3
  export { nextjsConfig } from './nextjs.js';
4
4
  export { expoConfig } from './expo.js';
5
5
  export { aiConfig } from './ai.js';
6
+ export { vueConfig } from './vue.js';
7
+ export { astroConfig } from './astro.js';
8
+ export { electronConfig } from './electron.js';
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -3,3 +3,6 @@ export { reactConfig } from './react.js';
3
3
  export { nextjsConfig } from './nextjs.js';
4
4
  export { expoConfig } from './expo.js';
5
5
  export { aiConfig } from './ai.js';
6
+ export { vueConfig } from './vue.js';
7
+ export { astroConfig } from './astro.js';
8
+ export { electronConfig } from './electron.js';
@@ -0,0 +1,3 @@
1
+ import { type Linter } from 'eslint';
2
+ export declare const vueConfig: Linter.Config[];
3
+ //# sourceMappingURL=vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/eslint/vue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKrC,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAepC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import vuePlugin from 'eslint-plugin-vue';
2
+ import vueParser from 'vue-eslint-parser';
3
+ export const vueConfig = [
4
+ ...vuePlugin.configs['flat/recommended'],
5
+ {
6
+ files: ['**/*.vue'],
7
+ languageOptions: {
8
+ parser: vueParser,
9
+ parserOptions: {
10
+ ecmaVersion: 'latest',
11
+ sourceType: 'module'
12
+ }
13
+ },
14
+ rules: {
15
+ 'vue/multi-word-component-names': 'off'
16
+ }
17
+ }
18
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/rules",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Docyrus/docyrus-devkit.git",
@@ -33,42 +33,52 @@
33
33
  "types": "./dist/eslint/ai.d.ts",
34
34
  "default": "./dist/eslint/ai.js"
35
35
  },
36
+ "./eslint/vue": {
37
+ "types": "./dist/eslint/vue.d.ts",
38
+ "default": "./dist/eslint/vue.js"
39
+ },
40
+ "./eslint/astro": {
41
+ "types": "./dist/eslint/astro.d.ts",
42
+ "default": "./dist/eslint/astro.js"
43
+ },
44
+ "./eslint/electron": {
45
+ "types": "./dist/eslint/electron.d.ts",
46
+ "default": "./dist/eslint/electron.js"
47
+ },
36
48
  "./biome/base": "./dist/biome/base.json",
37
49
  "./biome/cloudflare": "./dist/biome/cloudflare.json",
38
50
  "./biome/react": "./dist/biome/react.json",
39
- "./biome/nextjs": "./dist/biome/nextjs.json"
51
+ "./biome/nextjs": "./dist/biome/nextjs.json",
52
+ "./biome/electron": "./dist/biome/electron.json",
53
+ "./biome/astro": "./dist/biome/astro.json",
54
+ "./biome/vue": "./dist/biome/vue.json"
40
55
  },
41
56
  "files": [
42
57
  "dist"
43
58
  ],
44
- "scripts": {
45
- "build": "tsc && cp -r src/biome dist/biome",
46
- "clean": "rm -rf dist",
47
- "verify": "node --input-type=module -e \"import { baseConfig, reactConfig, nextjsConfig, expoConfig, aiConfig } from '@docyrus/rules/eslint'; console.log('All exports OK');\"",
48
- "lint": "eslint src",
49
- "format": "eslint src --fix",
50
- "typecheck": "eslint src && tsc --noEmit",
51
- "deploy": "pnpm run clean && pnpm run build && pnpm publish --access public"
52
- },
53
59
  "dependencies": {
54
- "@next/eslint-plugin-next": "catalog:",
55
- "@stylistic/eslint-plugin": "catalog:",
56
- "@typescript-eslint/eslint-plugin": "catalog:",
57
- "@typescript-eslint/parser": "catalog:",
58
- "enhanced-resolve": "catalog:",
59
- "eslint-config-expo": "catalog:",
60
- "eslint-import-resolver-typescript": "catalog:",
61
- "eslint-plugin-import-x": "catalog:",
62
- "eslint-plugin-react": "catalog:",
63
- "eslint-plugin-react-hooks": "catalog:",
64
- "eslint-plugin-react-native": "catalog:",
65
- "eslint-plugin-react-refresh": "catalog:",
66
- "eslint-plugin-unused-imports": "catalog:",
67
- "eslint-plugin-vercel-ai-security": "catalog:"
60
+ "@next/eslint-plugin-next": "16.1.6",
61
+ "@stylistic/eslint-plugin": "5.8.0",
62
+ "@typescript-eslint/eslint-plugin": "8.55.0",
63
+ "@typescript-eslint/parser": "8.55.0",
64
+ "enhanced-resolve": "5.19.0",
65
+ "eslint-config-expo": "10.0.0",
66
+ "eslint-import-resolver-typescript": "4.4.4",
67
+ "eslint-plugin-astro": "1.5.0",
68
+ "eslint-plugin-import-x": "4.16.1",
69
+ "eslint-plugin-n": "17.23.2",
70
+ "eslint-plugin-react": "7.37.5",
71
+ "eslint-plugin-react-hooks": "7.0.1",
72
+ "eslint-plugin-react-native": "5.0.0",
73
+ "eslint-plugin-react-refresh": "0.5.0",
74
+ "eslint-plugin-unused-imports": "4.4.1",
75
+ "eslint-plugin-vercel-ai-security": "1.3.5",
76
+ "eslint-plugin-vue": "10.7.0",
77
+ "vue-eslint-parser": "10.2.0"
68
78
  },
69
79
  "devDependencies": {
70
- "eslint": "catalog:",
71
- "typescript": "catalog:"
80
+ "eslint": "10.0.0",
81
+ "typescript": "5.9.3"
72
82
  },
73
83
  "peerDependencies": {
74
84
  "@biomejs/biome": "^2.3.0",
@@ -79,5 +89,14 @@
79
89
  "@biomejs/biome": {
80
90
  "optional": true
81
91
  }
92
+ },
93
+ "scripts": {
94
+ "build": "tsc && rm -rf dist/biome && cp -r src/biome dist/biome",
95
+ "clean": "rm -rf dist",
96
+ "verify": "node --input-type=module -e \"import { baseConfig, reactConfig, nextjsConfig, expoConfig, aiConfig, vueConfig, astroConfig, electronConfig } from '@docyrus/rules/eslint'; console.log('All exports OK');\"",
97
+ "lint": "eslint src",
98
+ "format": "eslint src --fix",
99
+ "typecheck": "eslint src && tsc --noEmit",
100
+ "deploy": "pnpm run clean && pnpm run build && pnpm publish --access public"
82
101
  }
83
- }
102
+ }