weboptimizer 2.0.1490 → 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.
Files changed (2) hide show
  1. package/eslint.config.mjs +8 -7
  2. package/package.json +21 -1
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 isLibrary = JSON.parse(await readFile(resolve(cwd(), './package.json'), {
31
+ const libraryIndicator = JSON.parse(await readFile(resolve(cwd(), './package.json'), {
33
32
  encoding: 'utf-8'
34
- })).default?.webOptimizer?.library ?? false;
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: ['*.compiled.*', '*.js', '**/*.js', '**/.git/*', '**/.cache/*', '**/.config/*', '**/.npm/*', '**/log/*', '**/node_modules/*', '**/backup/*', '**/exclude/*', '**/plugins/*', '*.d.ts', '**/*.d.ts'],
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.1490",
3
+ "version": "2.0.1491",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -482,6 +482,26 @@
482
482
  {
483
483
  "__evaluate__": "filesystem.isFileSync(path.resolve(currentPath, 'tsconfig.json')) ? '--parser-options=project:tsconfig.json' : ''"
484
484
  },
485
+ "--ignore-pattern",
486
+ "'**/.git/*'",
487
+ "--ignore-pattern",
488
+ "'**/.cache/*'",
489
+ "--ignore-pattern",
490
+ "'**/.config/*'",
491
+ "--ignore-pattern",
492
+ "'**/.npm/*'",
493
+ "--ignore-pattern",
494
+ "'**/log/*'",
495
+ "--ignore-pattern",
496
+ "'**/node_modules/*'",
497
+ "--ignore-pattern",
498
+ "'**/backup/*'",
499
+ "--ignore-pattern",
500
+ "'**/exclude/*'",
501
+ "--ignore-pattern",
502
+ "'**/plugins/*'",
503
+ "--ignore-pattern",
504
+ "'*.d.ts'",
485
505
  "'**/*.{jsx,ts,tsx}'"
486
506
  ],
487
507
  "command": "eslint",