weboptimizer 2.0.1489 → 2.0.1491
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/eslint.config.mjs +8 -7
- package/package.json +6 -6
package/eslint.config.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
|
|
3
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
1
4
|
import google from 'eslint-config-google';
|
|
2
5
|
import jsdoc from 'eslint-plugin-jsdoc';
|
|
3
6
|
import { readFile, stat } from 'fs/promises';
|
|
@@ -5,10 +8,6 @@ import globals from 'globals';
|
|
|
5
8
|
import { resolve } from 'path';
|
|
6
9
|
import { cwd } from 'process';
|
|
7
10
|
import typescript from 'typescript-eslint';
|
|
8
|
-
import js from '@eslint/js';
|
|
9
|
-
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
|
|
10
|
-
import typescriptParser from '@typescript-eslint/parser';
|
|
11
|
-
|
|
12
11
|
/**
|
|
13
12
|
* Checks if given path points to a valid file.
|
|
14
13
|
* @param filePath - Path to directory.
|
|
@@ -29,15 +28,17 @@ const googleRules = Object.keys(google.rules).filter(key => !unsuportedRules.inc
|
|
|
29
28
|
...object,
|
|
30
29
|
[key]: google.rules[key]
|
|
31
30
|
}), {});
|
|
32
|
-
const
|
|
31
|
+
const libraryIndicator = JSON.parse(await readFile(resolve(cwd(), './package.json'), {
|
|
33
32
|
encoding: 'utf-8'
|
|
34
|
-
})).default?.webOptimizer?.library
|
|
33
|
+
})).default?.webOptimizer?.library;
|
|
34
|
+
const isLibrary = libraryIndicator ?? true;
|
|
35
35
|
let tsConfigFilePath = '';
|
|
36
36
|
for (const filePath of ['./tsconfig.json', './node_modules/weboptimizer/tsconfig.' + `${isLibrary ? 'library' : 'application'}.json`]) if (await isFile(filePath)) {
|
|
37
37
|
tsConfigFilePath = filePath;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
40
|
export default [js.configs.recommended, ...typescript.configs.recommended, jsdoc.configs['flat/recommended'], {
|
|
41
|
+
files: ['**/*.{ts,tsx,html}'],
|
|
41
42
|
languageOptions: {
|
|
42
43
|
ecmaVersion: 'latest',
|
|
43
44
|
globals: {
|
|
@@ -55,7 +56,7 @@ export default [js.configs.recommended, ...typescript.configs.recommended, jsdoc
|
|
|
55
56
|
},
|
|
56
57
|
sourceType: 'module'
|
|
57
58
|
},
|
|
58
|
-
ignores: ['
|
|
59
|
+
ignores: ['*.compiled.*', '*.js', '**/*.js', '**/.git/**/*', '**/.cache/**/*', '**/.config/**/*', '**/.npm/**/*', '**/log/**/*', '**/node_modules/**/*', '**/backup/**/*', '**/exclude/**/*', '**/plugins/**/*', '*.d.ts', '**/*.d.ts'],
|
|
59
60
|
plugins: {
|
|
60
61
|
jsdoc
|
|
61
62
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1491",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"babel-loader": "^9.1.3",
|
|
101
101
|
"babel-plugin-transform-modern-regexp": "^0.0.6",
|
|
102
102
|
"babel-preset-minify": "^0.5.2",
|
|
103
|
-
"clientnode": "3.0.
|
|
103
|
+
"clientnode": "3.0.1166",
|
|
104
104
|
"ejs": "^3.1.10",
|
|
105
105
|
"exports-loader": "^5.0.0",
|
|
106
106
|
"extract-loader": "^5.1.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"@typescript-eslint/parser": "^7.16.1",
|
|
135
135
|
"css-loader": "^7.1.2",
|
|
136
136
|
"cssnano": "^7.0.4",
|
|
137
|
-
"documentation-website": "^1.0.
|
|
137
|
+
"documentation-website": "^1.0.329",
|
|
138
138
|
"eslint": "^9.7.0",
|
|
139
139
|
"eslint-config-google": "^0.14.0",
|
|
140
140
|
"eslint-plugin-jsdoc": "^48.7.0",
|
|
@@ -479,6 +479,9 @@
|
|
|
479
479
|
{
|
|
480
480
|
"__evaluate__": "`'${self.path.apiDocumentation}'`"
|
|
481
481
|
},
|
|
482
|
+
{
|
|
483
|
+
"__evaluate__": "filesystem.isFileSync(path.resolve(currentPath, 'tsconfig.json')) ? '--parser-options=project:tsconfig.json' : ''"
|
|
484
|
+
},
|
|
482
485
|
"--ignore-pattern",
|
|
483
486
|
"'**/.git/*'",
|
|
484
487
|
"--ignore-pattern",
|
|
@@ -499,9 +502,6 @@
|
|
|
499
502
|
"'**/plugins/*'",
|
|
500
503
|
"--ignore-pattern",
|
|
501
504
|
"'*.d.ts'",
|
|
502
|
-
{
|
|
503
|
-
"__evaluate__": "filesystem.isFileSync(path.resolve(currentPath, 'tsconfig.json')) ? '--parser-options=project:tsconfig.json' : ''"
|
|
504
|
-
},
|
|
505
505
|
"'**/*.{jsx,ts,tsx}'"
|
|
506
506
|
],
|
|
507
507
|
"command": "eslint",
|