weboptimizer 2.0.1600 → 2.0.1602
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.d.ts +1 -1
- package/eslint.config.mjs +10 -9
- package/package.json +7 -7
package/eslint.config.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* @returns A promise holding a boolean which indicates directory existence.
|
|
5
5
|
*/
|
|
6
6
|
export declare const isFile: (filePath: string) => Promise<boolean>;
|
|
7
|
-
export declare const config: import("
|
|
7
|
+
export declare const config: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
8
8
|
export default config;
|
package/eslint.config.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineConfig } from 'eslint/config';
|
|
1
2
|
import eslintjs from '@eslint/js';
|
|
2
3
|
import javascriptPlugin from '@stylistic/eslint-plugin';
|
|
3
4
|
import typescriptParser from '@typescript-eslint/parser';
|
|
@@ -23,8 +24,8 @@ export const isFile = async filePath => {
|
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
// Remove unsupported rules.
|
|
26
|
-
const
|
|
27
|
-
const GOOGLE_RULES = Object.keys(google.rules).filter(key => !
|
|
27
|
+
const UNSUPPORTED_RULES = ['require-jsdoc', 'valid-jsdoc'];
|
|
28
|
+
const GOOGLE_RULES = Object.keys(google.rules).filter(key => !UNSUPPORTED_RULES.includes(key)).reduce((object, key) => ({
|
|
28
29
|
...object,
|
|
29
30
|
[key]: google.rules[key]
|
|
30
31
|
}), {});
|
|
@@ -38,16 +39,16 @@ for (const filePath of ['./tsconfig.json', './node_modules/weboptimizer/tsconfig
|
|
|
38
39
|
TSCONFIG_FILE_PATH = filePath;
|
|
39
40
|
break;
|
|
40
41
|
}
|
|
41
|
-
let
|
|
42
|
+
let PROJECT_SPECIFIC_CONFIGURATION = [];
|
|
42
43
|
if (PACKAGE_CONFIGURATION.name !== 'weboptimizer') try {
|
|
43
|
-
// @ts-expect-error Need to create
|
|
44
|
+
// @ts-expect-error Need to create polymorphic type.
|
|
44
45
|
const config = await import('../../eslint.config.mjs');
|
|
45
46
|
const resolvedConfig = config.config ?? config.default ?? config.configuration ?? config;
|
|
46
|
-
|
|
47
|
+
PROJECT_SPECIFIC_CONFIGURATION = PROJECT_SPECIFIC_CONFIGURATION.concat(resolvedConfig);
|
|
47
48
|
} catch {
|
|
48
49
|
// Ignore regardless of an error.
|
|
49
50
|
}
|
|
50
|
-
export const config =
|
|
51
|
+
export const config = defineConfig({
|
|
51
52
|
extends: [eslintjs.configs.recommended, ...typescript.configs.strictTypeChecked, ...typescript.configs.strict, ...typescript.configs.stylistic, jsdoc.configs['flat/recommended']],
|
|
52
53
|
files: ['**/*.{ts,tsx,html}'],
|
|
53
54
|
languageOptions: {
|
|
@@ -64,7 +65,7 @@ export const config = typescript.config({
|
|
|
64
65
|
},
|
|
65
66
|
impliedStrict: true,
|
|
66
67
|
project: TSCONFIG_FILE_PATH,
|
|
67
|
-
tsconfigRootDir: dirname(TSCONFIG_FILE_PATH)
|
|
68
|
+
tsconfigRootDir: resolve(dirname(TSCONFIG_FILE_PATH))
|
|
68
69
|
},
|
|
69
70
|
sourceType: 'module'
|
|
70
71
|
},
|
|
@@ -93,7 +94,7 @@ export const config = typescript.config({
|
|
|
93
94
|
ignoreRestSiblings: false,
|
|
94
95
|
reportUsedIgnorePattern: false
|
|
95
96
|
}],
|
|
96
|
-
// NOTE: Too
|
|
97
|
+
// NOTE: Too strict for now but could be activated in the future.
|
|
97
98
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
|
|
98
99
|
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
|
|
99
100
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
@@ -151,5 +152,5 @@ export const config = typescript.config({
|
|
|
151
152
|
// given configuration objects.
|
|
152
153
|
{
|
|
153
154
|
ignores: ['*.compiled.*', '*.js', '**/*.js', '**/.git/**/*', '**/.cache/**/*', '**/.config/**/*', '**/.npm/**/*', '**/log/**/*', '**/node_modules/**/*', '**/backup/**/*', '**/exclude/**/*', '**/*.d.ts', '!**/declarations.d.ts']
|
|
154
|
-
}, ...
|
|
155
|
+
}, ...PROJECT_SPECIFIC_CONFIGURATION);
|
|
155
156
|
export default config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1602",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"babel-loader": "^10.0.0",
|
|
99
99
|
"babel-plugin-transform-modern-regexp": "^0.0.6",
|
|
100
100
|
"babel-preset-minify": "^0.5.2",
|
|
101
|
-
"clientnode": "3.0.
|
|
101
|
+
"clientnode": "3.0.1304",
|
|
102
102
|
"ejs": "^3.1.10",
|
|
103
103
|
"exports-loader": "^5.0.0",
|
|
104
104
|
"extract-loader": "^5.1.0",
|
|
@@ -129,16 +129,16 @@
|
|
|
129
129
|
"@types/postcss-url": "^10.0.4",
|
|
130
130
|
"@types/webpack-env": "^1.18.8",
|
|
131
131
|
"@types/webpack-sources": "^3.2.3",
|
|
132
|
-
"@typescript-eslint/parser": "^8.
|
|
132
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
133
133
|
"css-loader": "^7.1.2",
|
|
134
134
|
"cssnano": "^7.1.1",
|
|
135
135
|
"documentation-website": "^1.0.394",
|
|
136
136
|
"eslint": "^9.35.0",
|
|
137
137
|
"eslint-config-google": "^0.14.0",
|
|
138
|
-
"eslint-plugin-jsdoc": "^
|
|
138
|
+
"eslint-plugin-jsdoc": "^55.3.0",
|
|
139
139
|
"favicons": "^7.2.0",
|
|
140
140
|
"favicons-webpack-plugin": "^6.0.1",
|
|
141
|
-
"globals": "^16.
|
|
141
|
+
"globals": "^16.4.0",
|
|
142
142
|
"image-minimizer-webpack-plugin": "^4.1.4",
|
|
143
143
|
"jest": "^30.1.3",
|
|
144
144
|
"jsdoc": "^4.0.4",
|
|
@@ -154,10 +154,10 @@
|
|
|
154
154
|
"postcss-url": "^10.1.3",
|
|
155
155
|
"shx": "^0.4.0",
|
|
156
156
|
"style-loader": "^4.0.0",
|
|
157
|
-
"stylelint": "^16.
|
|
157
|
+
"stylelint": "^16.24.0",
|
|
158
158
|
"stylelint-config-standard": "^39.0.0",
|
|
159
159
|
"stylelint-config-standard-scss": "^15.0.1",
|
|
160
|
-
"typescript-eslint": "^8.
|
|
160
|
+
"typescript-eslint": "^8.43.0",
|
|
161
161
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
162
162
|
"workbox-webpack-plugin": "^7.3.0"
|
|
163
163
|
},
|