@diia-inhouse/oxc-config 2.1.7 → 3.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.
- package/dist/oxlint/config.d.ts.map +1 -1
- package/dist/oxlint/config.js +13 -2
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../oxlint/config.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../oxlint/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,QAAQ,CAAA;AAE9E,KAAK,MAAM,GAAG,YAAY,GAAG;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAiezD,eAAO,MAAM,IAAI,EAAE,MAAiD,CAAA;AAEpE,eAAO,MAAM,UAAU,EAAE,MAKb,CAAA;AAIZ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,KAAG,YAOnD,CAAA"}
|
package/dist/oxlint/config.js
CHANGED
|
@@ -3,6 +3,9 @@ import { defineConfig as defineOxlintConfig } from 'oxlint';
|
|
|
3
3
|
const require = createRequire(import.meta.url);
|
|
4
4
|
const resolve = (pkg) => require.resolve(pkg).replace(/\/[^/]+$/, '');
|
|
5
5
|
const resolveFile = (path) => new URL(path, import.meta.url).pathname;
|
|
6
|
+
// A package that ships `exports` without `main` cannot be loaded from its directory,
|
|
7
|
+
// so it is pointed at its entry file instead of being stripped back by `resolve`.
|
|
8
|
+
const resolveEntry = (pkg) => require.resolve(pkg);
|
|
6
9
|
const baseConfig = {
|
|
7
10
|
plugins: ['unicorn', 'typescript', 'import', 'promise', 'node', 'vitest', 'oxc'],
|
|
8
11
|
jsPlugins: [
|
|
@@ -10,6 +13,7 @@ const baseConfig = {
|
|
|
10
13
|
resolve('eslint-plugin-regexp'),
|
|
11
14
|
{ name: '@stylistic/js', specifier: resolve('@stylistic/eslint-plugin') },
|
|
12
15
|
resolve('@diia-inhouse/eslint-plugin'),
|
|
16
|
+
{ name: 'ts-eslint', specifier: resolveEntry('@typescript-eslint/eslint-plugin') },
|
|
13
17
|
{ name: '@diia-inhouse/package', specifier: resolveFile('./plugins/packageCheck.mjs') },
|
|
14
18
|
{ name: '@diia-inhouse/locale', specifier: resolveFile('./plugins/noHardcodedCyrillic.mjs') },
|
|
15
19
|
{ name: '@diia-inhouse/test', specifier: resolveFile('./plugins/testConventions.mjs') },
|
|
@@ -200,6 +204,9 @@ const baseConfig = {
|
|
|
200
204
|
'@diia-inhouse/mongoose/sub-schema-id-false': 'off',
|
|
201
205
|
'@diia-inhouse/class/no-module-level-const': 'warn',
|
|
202
206
|
'@diia-inhouse/class/no-interface-in-implementation': 'warn',
|
|
207
|
+
// Carried by the ESLint config until the oxc migration; oxlint has no native
|
|
208
|
+
// equivalent, so the original rule runs as a JS plugin at its original severity.
|
|
209
|
+
'ts-eslint/member-ordering': 'error',
|
|
203
210
|
'@diia-inhouse/temporal/workflow-single-param': 'error',
|
|
204
211
|
'@diia-inhouse/temporal/async-activity': 'error',
|
|
205
212
|
'@diia-inhouse/temporal/no-node-imports': 'error',
|
|
@@ -264,6 +271,7 @@ const boundariesExtension = {
|
|
|
264
271
|
{ type: 'services', pattern: 'src/services/**' },
|
|
265
272
|
{ type: 'configsTypes', pattern: 'src/configs/*types.ts', mode: 'file' },
|
|
266
273
|
{ type: 'configs', pattern: 'src/configs/**' },
|
|
274
|
+
{ type: 'localesPdf', pattern: 'src/locales/*/pdf/**' },
|
|
267
275
|
{ type: 'locales', pattern: 'src/locales/**' },
|
|
268
276
|
{ type: 'eventListenersTypes', pattern: 'src/eventListeners/*.types.ts', mode: 'file', capture: ['eventName'] },
|
|
269
277
|
{ type: 'eventListeners', pattern: 'src/eventListeners/*.ts', mode: 'file', capture: ['eventName'] },
|
|
@@ -292,7 +300,6 @@ const boundariesExtension = {
|
|
|
292
300
|
{
|
|
293
301
|
default: 'disallow',
|
|
294
302
|
rules: [
|
|
295
|
-
{ from: { type: ['viewsTypes', 'servicesTypes'] }, allow: { to: [{ type: 'locales' }] } },
|
|
296
303
|
{
|
|
297
304
|
from: { type: 'actions' },
|
|
298
305
|
allow: {
|
|
@@ -340,6 +347,7 @@ const boundariesExtension = {
|
|
|
340
347
|
from: { type: 'views' },
|
|
341
348
|
allow: { to: [{ type: 'viewsTypes' }, { type: 'servicesTypes' }, { type: 'modelsTypes' }, { type: 'generated' }] },
|
|
342
349
|
},
|
|
350
|
+
{ from: { type: 'viewsTypes' }, allow: { to: [{ type: 'locales' }] } },
|
|
343
351
|
{
|
|
344
352
|
from: { type: 'repositories' },
|
|
345
353
|
allow: { to: [{ type: 'models' }, { type: 'configsTypes' }, { type: 'modelsTypes' }] },
|
|
@@ -349,7 +357,10 @@ const boundariesExtension = {
|
|
|
349
357
|
allow: { to: [{ type: 'modelsTypes', captured: { modelName: '{{ from.captured.modelName }}' } }] },
|
|
350
358
|
},
|
|
351
359
|
{ from: { type: 'tests' }, allow: { to: [{ type: '*' }] } },
|
|
352
|
-
{
|
|
360
|
+
{
|
|
361
|
+
from: { type: 'servicesTypes' },
|
|
362
|
+
allow: { to: [{ type: 'servicesTypes' }, { type: 'modelsTypes' }, { type: 'localesPdf' }] },
|
|
363
|
+
},
|
|
353
364
|
{
|
|
354
365
|
from: { type: 'srcRoot' },
|
|
355
366
|
allow: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diia-inhouse/oxc-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "OXC toolchain configs for Diia services: oxlint, oxfmt, oxc transformer",
|
|
5
5
|
"author": "Diia",
|
|
6
6
|
"type": "module",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@boundaries/eslint-plugin": "6.0.2",
|
|
34
34
|
"@diia-inhouse/eslint-plugin": "1.9.11",
|
|
35
35
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "8.60.1",
|
|
36
37
|
"eslint-import-resolver-oxc": "0.15.0",
|
|
37
38
|
"eslint-plugin-regexp": "3.1.0",
|
|
38
39
|
"eslint-plugin-security": "4.0.0",
|