@naturalcycles/dev-lib 19.34.0 → 19.34.2

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.
@@ -30,7 +30,7 @@ export default config
30
30
  * This function only exists, because typescript-eslint started to have an issue with auto-detecting tsconfigRootDir.
31
31
  * If the issue is fixed - we can remove this and come back to having just a single config.
32
32
  */
33
- export function getEslintConfigForDir(cwd) {
33
+ export function getEslintConfigForDir(dir) {
34
34
  return [
35
35
  {
36
36
  ...eslint.configs.recommended,
@@ -74,7 +74,7 @@ export function getEslintConfigForDir(cwd) {
74
74
  },
75
75
  {
76
76
  files: defaultFiles,
77
- ...getConfig(cwd),
77
+ ...getConfig(dir),
78
78
  },
79
79
  {
80
80
  ignores: ['**/__exclude/**', '**/*.scss', '**/*.js'],
@@ -82,7 +82,7 @@ export function getEslintConfigForDir(cwd) {
82
82
  ].filter(Boolean)
83
83
  }
84
84
 
85
- function getConfig(cwd) {
85
+ function getConfig(dir) {
86
86
  return {
87
87
  plugins: {
88
88
  '@typescript-eslint': tseslint.plugin,
@@ -102,7 +102,7 @@ function getConfig(cwd) {
102
102
  },
103
103
  // parser: tseslint.parser,
104
104
  parserOptions: {
105
- project: `${cwd}/tsconfig.json`,
105
+ project: `${dir}/tsconfig.json`,
106
106
  // tsconfigRootDir: cwd,
107
107
  parser: tseslint.parser,
108
108
  extraFileExtensions: ['.vue', '.html'],
@@ -5,7 +5,11 @@
5
5
  //
6
6
  {
7
7
  "extends": "./tsconfig.json",
8
- "compilerOptions": {}
8
+ "compilerOptions": {
9
+ "paths": {
10
+ "@src/*": ["${configDir}/src/*"]
11
+ }
12
+ }
9
13
  // Need to be specified in the project tsconfig
10
14
  // "include": ["src"],
11
15
  // "exclude": ["**/__exclude"]
@@ -9,7 +9,10 @@
9
9
  "target": "es2023", // es2023+ browsers, adjust to your requirements!
10
10
  "lib": ["esnext", "dom", "dom.iterable"],
11
11
  "module": "esnext",
12
- "moduleResolution": "bundler"
12
+ "moduleResolution": "bundler",
13
+ "paths": {
14
+ "@src/*": ["${configDir}/src/*"]
15
+ }
13
16
  }
14
17
  // Need to be specified in the project tsconfig
15
18
  // "include": ["src"],
package/cfg/tsconfig.json CHANGED
@@ -8,9 +8,6 @@
8
8
  "rootDir": "${configDir}/src",
9
9
  "baseUrl": "${configDir}/src",
10
10
  "outDir": "${configDir}/dist",
11
- "paths": {
12
- "@src/*": ["${configDir}/src/*"]
13
- },
14
11
  // Target/module
15
12
  "target": "es2023",
16
13
  "lib": ["esnext"], // add "dom" if needed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "19.34.0",
4
+ "version": "19.34.2",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@commitlint/cli": "^19",
@@ -50,8 +50,6 @@
50
50
  "./cfg/biome.jsonc": "./cfg/biome.jsonc",
51
51
  "./cfg/commitlint.config.js": "./cfg/commitlint.config.js",
52
52
  "./cfg/eslint.config.js": "./cfg/eslint.config.js",
53
- "./cfg/eslint.scripts.config.js": "./cfg/eslint.scripts.config.js",
54
- "./cfg/eslint.e2e.config.js": "./cfg/eslint.e2e.config.js",
55
53
  "./cfg/prettier.config.js": "./cfg/prettier.config.js",
56
54
  "./cfg/stylelint.config.js": "./cfg/stylelint.config.js",
57
55
  "./cfg/tsconfig.json": "./cfg/tsconfig.json",
@@ -1,4 +0,0 @@
1
- import { getEslintConfigForDir } from './eslint.config.js'
2
-
3
- const config = getEslintConfigForDir(`${process.cwd()}/e2e`)
4
- export default config
@@ -1,4 +0,0 @@
1
- import { getEslintConfigForDir } from './eslint.config.js'
2
-
3
- const config = getEslintConfigForDir(`${process.cwd()}/scripts`)
4
- export default config