easy-soft-develop 2.0.161 → 2.0.162

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-develop",
3
- "version": "2.0.161",
3
+ "version": "2.0.162",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kityandhero/easy-soft-develop#readme",
6
6
  "bugs": {
@@ -65,7 +65,7 @@ const contentFile = {
65
65
 
66
66
  const configFileContent = `${fileGlobalHeader}
67
67
  const { rules } = require('./items/rules');
68
- const { parserOptions } = require('./items/parser');
68
+ const { parserJsOptions, parserTsOptions } = require('./items/parser');
69
69
  const { pluginCollection } = require('./items/plugins');
70
70
  const { extendCollection } = require('./items/extends');
71
71
  const { settings } = require('./items/settings');
@@ -84,11 +84,16 @@ module.exports = {
84
84
  shelljs: true,
85
85
  node: true,
86
86
  },
87
- plugins: [
88
- ...pluginCollection,
87
+ plugins: [...pluginCollection],
88
+ parser: '@babel/eslint-parser',
89
+ parserOptions: parserJsOptions,
90
+ overrides: [
91
+ {
92
+ files: ['*.ts', '*.tsx'],
93
+ parser: '@typescript-eslint/parser',
94
+ parserOptions: parserTsOptions,
95
+ },
89
96
  ],
90
- parser: '@typescript-eslint/parser',
91
- parserOptions: parserOptions,
92
97
  rules: rules,
93
98
  settings: settings,
94
99
  },
@@ -437,10 +442,26 @@ const pluginFile = {
437
442
  };
438
443
 
439
444
  const parserEmbedFileContent = `${fileGlobalHeader}
440
- const parserOptions = {};
445
+ const parserJsOptions = {
446
+ requireConfigFile: false,
447
+ babelOptions: {
448
+ presets: ['@babel/preset-react'],
449
+ plugins: [
450
+ ['@babel/plugin-proposal-decorators', { legacy: true }],
451
+ ['@babel/plugin-proposal-class-properties', { loose: true }],
452
+ ],
453
+ },
454
+ };
455
+
456
+ const parserTsOptions = {
457
+ ecmaFeatures: {
458
+ jsx: true,
459
+ },
460
+ };
441
461
 
442
462
  module.exports = {
443
- parserOptions: { ...parserOptions },
463
+ parserJsOptions: { ...parserJsOptions },
464
+ parserTsOptions: { ...parserTsOptions },
444
465
  };
445
466
  `;
446
467
 
@@ -452,10 +473,13 @@ const parserEmbedFile = {
452
473
  };
453
474
 
454
475
  const parserCustomFileContent = `${fileGlobalHeader}
455
- const parserOptions = {};
476
+ const parserJsOptions = {};
477
+
478
+ const parserTsOptions = {};
456
479
 
457
480
  module.exports = {
458
- parserOptions: { ...parserOptions },
481
+ parserJsOptions: { ...parserJsOptions },
482
+ parserTsOptions: { ...parserTsOptions },
459
483
  };
460
484
  `;
461
485
 
@@ -467,11 +491,18 @@ const parserCustomFile = {
467
491
  };
468
492
 
469
493
  const parserFileContent = `${fileGlobalHeader}
470
- const { parserOptions: embedParserOptions } = require('./embed');
471
- const { parserOptions: customParserOptions } = require('./custom');
494
+ const {
495
+ parserJsOptions: embedParserJsOptions,
496
+ parserTsOptions: embedParserTsOptions,
497
+ } = require('./embed');
498
+ const {
499
+ parserJsOptions: customParserJsOptions,
500
+ parserTsOptions: customParserTsOptions,
501
+ } = require('./custom');
472
502
 
473
503
  module.exports = {
474
- parserOptions: { ...embedParserOptions, ...customParserOptions },
504
+ parserJsOptions: { ...embedParserJsOptions, ...customParserJsOptions },
505
+ parserTsOptions: { ...embedParserTsOptions, ...customParserTsOptions },
475
506
  };
476
507
  `;
477
508