weboptimizer 2.0.1601 → 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.
@@ -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("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
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 UNSUPORTED_RULES = ['require-jsdoc', 'valid-jsdoc'];
27
- const GOOGLE_RULES = Object.keys(google.rules).filter(key => !UNSUPORTED_RULES.includes(key)).reduce((object, 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 PROJECT_SPECIFIG_CONFIGURATION = [];
42
+ let PROJECT_SPECIFIC_CONFIGURATION = [];
42
43
  if (PACKAGE_CONFIGURATION.name !== 'weboptimizer') try {
43
- // @ts-expect-error Need to create polomorphic type.
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
- PROJECT_SPECIFIG_CONFIGURATION = PROJECT_SPECIFIG_CONFIGURATION.concat(resolvedConfig);
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 = typescript.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 strcit for now but could be actvated in future maybe.
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
- }, ...PROJECT_SPECIFIG_CONFIGURATION);
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.1601",
3
+ "version": "2.0.1602",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",