@diia-inhouse/oxc-config 2.1.6 → 3.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../oxlint/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE9E,KAAK,MAAM,GAAG,YAAY,GAAG;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAqdzD,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"}
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;AA6dzD,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"}
@@ -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',
@@ -292,6 +299,7 @@ const boundariesExtension = {
292
299
  {
293
300
  default: 'disallow',
294
301
  rules: [
302
+ { from: { type: ['viewsTypes', 'servicesTypes'] }, allow: { to: [{ type: 'locales' }] } },
295
303
  {
296
304
  from: { type: 'actions' },
297
305
  allow: {
@@ -339,7 +347,6 @@ const boundariesExtension = {
339
347
  from: { type: 'views' },
340
348
  allow: { to: [{ type: 'viewsTypes' }, { type: 'servicesTypes' }, { type: 'modelsTypes' }, { type: 'generated' }] },
341
349
  },
342
- { from: { type: 'viewsTypes' }, allow: { to: [{ type: 'locales' }] } },
343
350
  {
344
351
  from: { type: 'repositories' },
345
352
  allow: { to: [{ type: 'models' }, { type: 'configsTypes' }, { type: 'modelsTypes' }] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diia-inhouse/oxc-config",
3
- "version": "2.1.6",
3
+ "version": "3.0.0",
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",