easy-soft-develop 2.0.160 → 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.160",
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,
89
- ],
87
+ plugins: [...pluginCollection],
90
88
  parser: '@babel/eslint-parser',
91
- parserOptions: parserOptions,
89
+ parserOptions: parserJsOptions,
90
+ overrides: [
91
+ {
92
+ files: ['*.ts', '*.tsx'],
93
+ parser: '@typescript-eslint/parser',
94
+ parserOptions: parserTsOptions,
95
+ },
96
+ ],
92
97
  rules: rules,
93
98
  settings: settings,
94
99
  },
@@ -437,7 +442,7 @@ const pluginFile = {
437
442
  };
438
443
 
439
444
  const parserEmbedFileContent = `${fileGlobalHeader}
440
- const parserOptions = {
445
+ const parserJsOptions = {
441
446
  requireConfigFile: false,
442
447
  babelOptions: {
443
448
  presets: ['@babel/preset-react'],
@@ -448,8 +453,15 @@ const parserOptions = {
448
453
  },
449
454
  };
450
455
 
456
+ const parserTsOptions = {
457
+ ecmaFeatures: {
458
+ jsx: true,
459
+ },
460
+ };
461
+
451
462
  module.exports = {
452
- parserOptions: { ...parserOptions },
463
+ parserJsOptions: { ...parserJsOptions },
464
+ parserTsOptions: { ...parserTsOptions },
453
465
  };
454
466
  `;
455
467
 
@@ -461,10 +473,13 @@ const parserEmbedFile = {
461
473
  };
462
474
 
463
475
  const parserCustomFileContent = `${fileGlobalHeader}
464
- const parserOptions = {};
476
+ const parserJsOptions = {};
477
+
478
+ const parserTsOptions = {};
465
479
 
466
480
  module.exports = {
467
- parserOptions: { ...parserOptions },
481
+ parserJsOptions: { ...parserJsOptions },
482
+ parserTsOptions: { ...parserTsOptions },
468
483
  };
469
484
  `;
470
485
 
@@ -476,11 +491,18 @@ const parserCustomFile = {
476
491
  };
477
492
 
478
493
  const parserFileContent = `${fileGlobalHeader}
479
- const { parserOptions: embedParserOptions } = require('./embed');
480
- 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');
481
502
 
482
503
  module.exports = {
483
- parserOptions: { ...embedParserOptions, ...customParserOptions },
504
+ parserJsOptions: { ...embedParserJsOptions, ...customParserJsOptions },
505
+ parserTsOptions: { ...embedParserTsOptions, ...customParserTsOptions },
484
506
  };
485
507
  `;
486
508
 
@@ -64,6 +64,8 @@ function getGlobalPackages() {
64
64
 
65
65
  packages = packages.concat(['@typescript-eslint/parser']);
66
66
 
67
+ packages = packages.concat(['@types/node']);
68
+
67
69
  packages = packages.concat('rimraf', 'lint-staged', 'husky');
68
70
 
69
71
  packages = packages.concat('easy-soft-develop');