@dpuse/dpuse-development 0.3.623 → 0.3.625
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 +3 -3
- package/dist/dpuse-development.es.js +136 -135
- package/dist/dpuse-development.es.js.map +1 -1
- package/eslint.config.default.ts +73 -0
- package/package.json +2 -1
- package/vite.config.default.ts +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// ── External Dependencies & Registrations
|
|
2
|
+
import type { Linter } from 'eslint';
|
|
3
|
+
import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';
|
|
4
|
+
import { flatConfigs as pluginImportFlatConfigs } from 'eslint-plugin-import-x';
|
|
5
|
+
import { configs as pluginRegexpConfigs } from 'eslint-plugin-regexp';
|
|
6
|
+
import pluginSecurity from 'eslint-plugin-security';
|
|
7
|
+
import pluginSonarJS from 'eslint-plugin-sonarjs';
|
|
8
|
+
import pluginUnicorn from 'eslint-plugin-unicorn';
|
|
9
|
+
import skipFormatting from 'eslint-config-prettier';
|
|
10
|
+
import tseslint from 'typescript-eslint';
|
|
11
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
12
|
+
|
|
13
|
+
// ── ESLint Configuration ─────────────────────────────────────────────────────────────────────────────────────────────
|
|
14
|
+
|
|
15
|
+
export default defineConfig(
|
|
16
|
+
// Linting scope, strict TypeScript type-checking, and module resolver.
|
|
17
|
+
{
|
|
18
|
+
files: ['eslint.config.ts', 'src/**/*.ts', 'vite.config.ts', 'vitest.config.ts'],
|
|
19
|
+
extends: [...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parserOptions: { project: './tsconfig.json' }
|
|
22
|
+
},
|
|
23
|
+
settings: {
|
|
24
|
+
'import-x/core-modules': ['cloudflare:workers'],
|
|
25
|
+
'import-x/resolver': {
|
|
26
|
+
typescript: { project: ['./tsconfig.json'] }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// Ignores.
|
|
32
|
+
globalIgnores(['bundle-analysis-reports/**', 'dependency-check-bin/**', 'dependency-check-reports/**', 'dist/**', 'licenses/**', 'rust/**/pkg/**']),
|
|
33
|
+
|
|
34
|
+
// Plugin configurations.
|
|
35
|
+
{
|
|
36
|
+
// '@eslint-community/eslint-comments' only ships a legacy config; manually convert to flat format.
|
|
37
|
+
plugins: { '@eslint-community/eslint-comments': pluginComments },
|
|
38
|
+
rules: {
|
|
39
|
+
'@eslint-community/eslint-comments/disable-enable-pair': 'error',
|
|
40
|
+
'@eslint-community/eslint-comments/no-aggregating-enable': 'error',
|
|
41
|
+
'@eslint-community/eslint-comments/no-duplicate-disable': 'error',
|
|
42
|
+
'@eslint-community/eslint-comments/no-unlimited-disable': 'error',
|
|
43
|
+
'@eslint-community/eslint-comments/no-unused-enable': 'error'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
pluginImportFlatConfigs.recommended,
|
|
47
|
+
pluginRegexpConfigs['flat/recommended'],
|
|
48
|
+
pluginSecurity.configs.recommended,
|
|
49
|
+
(pluginSonarJS.configs?.['recommended'] ?? {}) as Linter.Config,
|
|
50
|
+
pluginUnicorn.configs.recommended,
|
|
51
|
+
skipFormatting,
|
|
52
|
+
|
|
53
|
+
// Rule overrides.
|
|
54
|
+
{
|
|
55
|
+
rules: {
|
|
56
|
+
'sort-imports': ['warn', { allowSeparatedGroups: true, ignoreCase: true, memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'] }],
|
|
57
|
+
|
|
58
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
59
|
+
|
|
60
|
+
'@eslint-community/eslint-comments/require-description': 'warn',
|
|
61
|
+
|
|
62
|
+
'security/detect-object-injection': 'off',
|
|
63
|
+
|
|
64
|
+
'sonarjs/no-commented-code': 'warn',
|
|
65
|
+
'sonarjs/no-dead-store': 'warn',
|
|
66
|
+
'sonarjs/no-unused-vars': 'warn',
|
|
67
|
+
'sonarjs/todo-tag': 'warn',
|
|
68
|
+
|
|
69
|
+
'unicorn/no-null': 'off',
|
|
70
|
+
'unicorn/switch-case-braces': ['warn', 'avoid']
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-development",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.625",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Actions for managing DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
".ncurc.json",
|
|
35
35
|
".prettierrc.json",
|
|
36
36
|
"dist",
|
|
37
|
+
"eslint.config.default.ts",
|
|
37
38
|
"LICENSE",
|
|
38
39
|
"tsconfig.scripts.json",
|
|
39
40
|
"vite.config.default.ts",
|
package/vite.config.default.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { fileURLToPath, URL } from 'node:url';
|
|
|
8
8
|
// ── Data
|
|
9
9
|
import config from './config.json';
|
|
10
10
|
|
|
11
|
-
// ──
|
|
11
|
+
// ── Vite Configuration ───────────────────────────────────────────────────────────────────────────────────────────────
|
|
12
12
|
|
|
13
13
|
export default defineConfig({
|
|
14
14
|
build: {
|