mwts 1.2.2 → 2.0.0

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/README.md CHANGED
@@ -23,12 +23,15 @@ The easiest way to get started is to run:
23
23
  npx mwts init
24
24
  ```
25
25
 
26
+ Use `--formatter stylistic` to opt into `ESLint + Stylistic` instead of the default `Prettier + ESLint`.
27
+ Use `--formatter biome` to use Biome as formatter while keeping mwts lint/check commands.
28
+
26
29
  ## How it works
27
30
  When you run the `npx mwts init` command, it's going to do a few things for you:
28
31
  - Adds an opinionated `tsconfig.json` file to your project that uses the MidwayJS TypeScript Style.
29
32
  - Adds the necessary devDependencies to your `package.json`.
30
33
  - Adds scripts to your `package.json`:
31
- - `check`: Lints and checks for formatting problems.
34
+ - `lint`/`check`: Lints and checks for formatting problems.
32
35
  - `fix`: Automatically fixes formatting and linting problems (if possible).
33
36
  - `clean`: Removes output files.
34
37
  - `build`: Compiles the source code using TypeScript compiler.
@@ -44,13 +47,42 @@ mwts check one.ts two.ts three.ts
44
47
  mwts check *.ts
45
48
  ```
46
49
 
50
+ `mwts lint/check/fix` all support file arguments.
51
+ If you run them without `mwts init`, mwts will fall back to its built-in default ESLint config.
52
+
53
+ ### Built-in formatter modes
54
+ `mwts` has built-in formatter modes:
55
+ - default: `Prettier + ESLint`
56
+ - `--formatter stylistic`: `ESLint + Stylistic`
57
+ - `--formatter biome`: `Biome + ESLint` (Biome handles formatting)
58
+
59
+ ### Custom formatter example
60
+ If you want a formatter outside built-in modes, install and wire it in your project yourself.
61
+
62
+ Example:
63
+
64
+ ```sh
65
+ npm i -D dprint
66
+ ```
67
+
68
+ ```json
69
+ {
70
+ "scripts": {
71
+ "format": "dprint fmt",
72
+ "check:format": "dprint check"
73
+ }
74
+ }
75
+ ```
76
+
77
+ You can keep `mwts lint/check/fix` for linting and use another formatter only for formatting.
78
+
47
79
  ### Working with eslint
48
- Under the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. To use the shared `eslint` configuration, create an `.eslintrc` in your project directory, and extend the shared config:
80
+ Under the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. To use the shared `eslint` configuration, create an `eslint.config.js` in your project directory, and extend the shared config:
49
81
 
50
- ```yml
51
- ---
52
- extends:
53
- - './node_modules/mwts'
82
+ ```js
83
+ module.exports = [
84
+ ...require('mwts'),
85
+ ];
54
86
  ```
55
87
 
56
88
  If you don't want to use the `mwts` CLI, you can drop down to using the module as a basic `eslint` config, and just use the `eslint` cli:
@@ -73,7 +105,17 @@ Show your love for `mwts` and include a badge!
73
105
  ```
74
106
 
75
107
  ## Supported Node.js Versions
76
- Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js.
108
+ `mwts` 2.x requires Node.js 20+.
109
+
110
+ ## Migrating from mwts 1.x to 2.x
111
+ - Upgrade runtime/tooling baseline:
112
+ - Node.js >= 20
113
+ - TypeScript >= 5
114
+ - `mwts init` now generates `eslint.config.js` and `eslint.ignores.js` (flat config), instead of `.eslintrc.json` and `.eslintignore`.
115
+ - Default formatter mode stays `Prettier + ESLint`.
116
+ - Optional formatter mode: `mwts init --formatter stylistic`.
117
+ - Optional formatter mode: `mwts init --formatter biome`.
118
+ - `mwts lint/check/fix` support per-file arguments and can run without `mwts init` by falling back to mwts built-in config.
77
119
 
78
120
  ## License
79
121
  [Apache-2.0](LICENSE)
@@ -0,0 +1,88 @@
1
+ 'use strict';
2
+ const eslint = require('@eslint/js');
3
+ const tseslint = require('typescript-eslint');
4
+ const prettierConfig = require('eslint-config-prettier');
5
+ const pluginN = require('eslint-plugin-n');
6
+ const pluginPrettier = require('eslint-plugin-prettier');
7
+ const globals = require('globals');
8
+ const ignores = require('./eslint.ignores.js');
9
+ const defineConfig = require('eslint/config').defineConfig;
10
+ module.exports = defineConfig([
11
+ { ignores },
12
+ eslint.configs.recommended,
13
+ prettierConfig,
14
+ {
15
+ languageOptions: {
16
+ globals: globals.node,
17
+ },
18
+ plugins: {
19
+ n: pluginN,
20
+ prettier: pluginPrettier,
21
+ },
22
+ rules: {
23
+ 'prettier/prettier': 'error',
24
+ 'block-scoped-var': 'error',
25
+ eqeqeq: 'error',
26
+ 'no-var': 'error',
27
+ 'prefer-const': 'error',
28
+ 'eol-last': 'error',
29
+ 'prefer-arrow-callback': 'error',
30
+ 'no-trailing-spaces': 'error',
31
+ quotes: ['warn', 'single', { avoidEscape: true }],
32
+ 'no-restricted-properties': [
33
+ 'error',
34
+ {
35
+ object: 'describe',
36
+ property: 'only',
37
+ },
38
+ {
39
+ object: 'it',
40
+ property: 'only',
41
+ },
42
+ ],
43
+ },
44
+ },
45
+ {
46
+ files: ['**/.prettierrc.js', '**/eslint.config.js', '**/eslint.ignores.js'],
47
+ languageOptions: {
48
+ sourceType: 'commonjs',
49
+ globals: globals.node,
50
+ },
51
+ },
52
+ {
53
+ files: ['**/*.ts', '**/*.tsx'],
54
+ extends: [tseslint.configs.recommended],
55
+ languageOptions: {
56
+ parser: tseslint.parser,
57
+ parserOptions: {
58
+ ecmaVersion: 2018,
59
+ sourceType: 'module',
60
+ project: './tsconfig.json',
61
+ },
62
+ },
63
+ rules: {
64
+ '@typescript-eslint/ban-ts-comment': 'warn',
65
+ '@typescript-eslint/no-floating-promises': 'error',
66
+ '@typescript-eslint/no-non-null-assertion': 'off',
67
+ '@typescript-eslint/no-use-before-define': 'off',
68
+ '@typescript-eslint/no-warning-comments': 'off',
69
+ '@typescript-eslint/no-empty-function': 'off',
70
+ '@typescript-eslint/no-unused-vars': 'warn',
71
+ '@typescript-eslint/no-var-requires': 'off',
72
+ '@typescript-eslint/no-require-imports': 'off',
73
+ '@typescript-eslint/no-empty-object-type': 'off',
74
+ '@typescript-eslint/explicit-function-return-type': 'off',
75
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
76
+ '@typescript-eslint/ban-types': 'off',
77
+ '@typescript-eslint/camelcase': 'off',
78
+ 'n/no-missing-import': 'off',
79
+ 'n/no-empty-function': 'off',
80
+ 'n/no-unsupported-features/es-syntax': 'off',
81
+ 'n/no-missing-require': 'off',
82
+ 'n/shebang': 'off',
83
+ 'no-dupe-class-members': 'off',
84
+ 'require-atomic-updates': 'off',
85
+ },
86
+ },
87
+ ]);
88
+ //# sourceMappingURL=eslint.config.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ module.exports = ['dist/', '**/node_modules/', 'template/', 'test/fixtures/'];
3
+ //# sourceMappingURL=eslint.ignores.js.map
@@ -3,4 +3,3 @@ import { Options } from './cli';
3
3
  * Remove files generated by the build.
4
4
  */
5
5
  export declare function clean(options: Options): Promise<boolean>;
6
- //# sourceMappingURL=clean.d.ts.map
package/dist/src/clean.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clean = void 0;
3
+ exports.clean = clean;
4
4
  const chalk = require("chalk");
5
5
  const util_1 = require("./util");
6
6
  /**
7
7
  * Remove files generated by the build.
8
8
  */
9
9
  async function clean(options) {
10
- const tsconfig = (await util_1.getTSConfig(options.targetRootDir));
10
+ const tsconfig = (await (0, util_1.getTSConfig)(options.targetRootDir));
11
11
  if (tsconfig.compilerOptions && tsconfig.compilerOptions.outDir) {
12
12
  const outDir = tsconfig.compilerOptions.outDir;
13
13
  if (outDir === '.') {
@@ -17,7 +17,7 @@ async function clean(options) {
17
17
  }
18
18
  const message = `${chalk.red('Removing')} ${outDir} ...`;
19
19
  options.logger.log(message);
20
- await util_1.rimrafp(outDir);
20
+ await (0, util_1.rimrafp)(outDir);
21
21
  return true;
22
22
  }
23
23
  else {
@@ -27,5 +27,4 @@ async function clean(options) {
27
27
  return false;
28
28
  }
29
29
  }
30
- exports.clean = clean;
31
30
  //# sourceMappingURL=clean.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/clean.ts"],"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,GAAG,CAAC,MAAM,IAAA,kBAAW,EAAC,OAAO,CAAC,aAAa,CAAC,CAAa,CAAC;IACxE,IAAI,QAAQ,CAAC,eAAe,IAAI,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;QAChE,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC;QAC/C,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,GAAG;gBAC/D,kEAAkE,CACrE,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,OAAO,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,MAAM,MAAM,CAAC;QACzD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,MAAM,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU;YACzD,aAAa,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,oBAAoB;YACrE,gBAAgB,CACnB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
package/dist/src/cli.d.ts CHANGED
@@ -12,8 +12,10 @@ export interface Options {
12
12
  no: boolean;
13
13
  logger: Logger;
14
14
  yarn?: boolean;
15
+ formatterMode?: FormatterMode;
15
16
  }
16
- export declare type VerbFilesFunction = (options: Options, files: string[], fix?: boolean) => Promise<boolean>;
17
+ export type FormatterMode = 'prettier' | 'stylistic' | 'biome';
18
+ export type VerbFilesFunction = (options: Options, files: string[], fix?: boolean) => Promise<boolean>;
17
19
  /**
18
20
  * Get the current version of node.js being run.
19
21
  * Exported purely for stubbing purposes.
@@ -23,4 +25,3 @@ export declare function getNodeVersion(): string;
23
25
  export declare function getEslintVersion(): string;
24
26
  export declare function getPrettierVersion(): string;
25
27
  export declare function run(verb: string, files: string[]): Promise<boolean>;
26
- //# sourceMappingURL=cli.d.ts.map
package/dist/src/cli.js CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.run = exports.getPrettierVersion = exports.getEslintVersion = exports.getNodeVersion = void 0;
4
+ exports.getNodeVersion = getNodeVersion;
5
+ exports.getEslintVersion = getEslintVersion;
6
+ exports.getPrettierVersion = getPrettierVersion;
7
+ exports.run = run;
8
+ const fs = require("fs");
5
9
  const path = require("path");
6
10
  const meow = require("meow");
7
- const updateNotifier = require("update-notifier");
8
11
  const init_1 = require("./init");
9
12
  const clean_1 = require("./clean");
10
13
  const util_1 = require("./util");
11
14
  const execa = require("execa");
12
- // eslint-disable-next-line @typescript-eslint/no-var-requires
13
15
  const packageJson = require('../../package.json');
14
- const eslint = require.resolve('eslint/bin/eslint');
16
+ const updateNotifier = require('update-notifier').default;
15
17
  const logger = console;
16
18
  const cli = meow({
17
19
  help: `
@@ -31,6 +33,7 @@ const cli = meow({
31
33
  -n, --no Assume a no answer for every prompt.
32
34
  --dry-run Don't make any actual changes.
33
35
  --yarn Use yarn instead of npm.
36
+ --formatter Formatter strategy: prettier (default), stylistic, or biome.
34
37
 
35
38
  Examples
36
39
  $ mwts init -y
@@ -44,6 +47,7 @@ const cli = meow({
44
47
  no: { type: 'boolean', alias: 'n' },
45
48
  dryRun: { type: 'boolean' },
46
49
  yarn: { type: 'boolean' },
50
+ formatter: { type: 'string' },
47
51
  },
48
52
  });
49
53
  /**
@@ -54,31 +58,45 @@ const cli = meow({
54
58
  function getNodeVersion() {
55
59
  return process.version;
56
60
  }
57
- exports.getNodeVersion = getNodeVersion;
58
61
  function getEslintVersion() {
59
- const packageJson = util_1.readJSON(require.resolve('eslint/package.json'));
62
+ const packageJson = (0, util_1.readJSON)(require.resolve('eslint/package.json'));
60
63
  return packageJson.version;
61
64
  }
62
- exports.getEslintVersion = getEslintVersion;
63
65
  function getPrettierVersion() {
64
- const packageJson = util_1.readJSON(require.resolve('prettier/package.json'));
66
+ const packageJson = (0, util_1.readJSON)(require.resolve('prettier/package.json'));
65
67
  return packageJson.version;
66
68
  }
67
- exports.getPrettierVersion = getPrettierVersion;
69
+ function parseFormatterMode(value) {
70
+ if (value === null || value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === 'prettier' || value === 'stylistic' || value === 'biome') {
74
+ return value;
75
+ }
76
+ throw new Error(`Unsupported formatter mode '${String(value)}'. Use 'prettier', 'stylistic', or 'biome'.`);
77
+ }
78
+ function hasLocalBiomeConfig(targetRootDir) {
79
+ return fs.existsSync(path.join(targetRootDir, 'biome.json'));
80
+ }
68
81
  function usage(msg) {
69
82
  if (msg) {
70
83
  logger.error(msg);
71
84
  }
72
85
  cli.showHelp(1);
73
86
  }
87
+ function hasLocalEslintConfig(targetRootDir) {
88
+ return (fs.existsSync(path.join(targetRootDir, 'eslint.config.js')) ||
89
+ fs.existsSync(path.join(targetRootDir, 'eslint.config.cjs')) ||
90
+ fs.existsSync(path.join(targetRootDir, 'eslint.config.mjs')));
91
+ }
74
92
  async function run(verb, files) {
75
93
  // throw if running on an old version of nodejs
76
94
  const nodeMajorVersion = Number(getNodeVersion().slice(1).split('.')[0]);
77
95
  console.log(`Node.js Version: ${nodeMajorVersion}`);
78
96
  console.log(`ESLint Version: ${getEslintVersion()}`);
79
- console.log(`Pretteir Version: ${getPrettierVersion()}`);
80
- if (nodeMajorVersion < 10) {
81
- throw new Error(`mwts requires node.js 10.x or up. You are currently running
97
+ console.log(`Prettier Version: ${getPrettierVersion()}`);
98
+ if (nodeMajorVersion < 20) {
99
+ throw new Error(`mwts requires node.js 20.x or up. You are currently running
82
100
  ${process.version}, which is not supported. Please upgrade to
83
101
  a safe, secure version of nodejs!`);
84
102
  }
@@ -90,35 +108,58 @@ async function run(verb, files) {
90
108
  yes: cli.flags.yes || cli.flags.y || false,
91
109
  no: cli.flags.no || cli.flags.n || false,
92
110
  logger,
93
- yarn: cli.flags.yarn || util_1.isYarnUsed(),
111
+ yarn: cli.flags.yarn || (0, util_1.isYarnUsed)(),
112
+ formatterMode: parseFormatterMode(cli.flags.formatter),
94
113
  };
95
114
  // Linting/formatting depend on typescript. We don't want to load the
96
115
  // typescript module during init, since it might not exist.
97
116
  // See: https://github.com/google/gts/issues/48
98
117
  if (verb === 'init') {
99
- return init_1.init(options);
118
+ return (0, init_1.init)(options);
100
119
  }
101
- const flags = Object.assign([], files);
120
+ const flags = [...files];
102
121
  if (flags.length === 0) {
103
122
  flags.push('**/*.ts', '**/*.js', '**/*.tsx', '**/*.jsx', '--no-error-on-unmatched-pattern');
104
123
  }
105
124
  switch (verb) {
106
125
  case 'lint':
107
126
  case 'check': {
127
+ const eslintFlags = [...flags];
128
+ if (!hasLocalEslintConfig(options.targetRootDir)) {
129
+ eslintFlags.unshift('--config', path.join(options.mwtsRootDir, 'eslint.config.js'));
130
+ }
108
131
  try {
109
- await execa('node', [eslint, ...flags], {
132
+ await execa('eslint', eslintFlags, {
110
133
  stdio: 'inherit',
111
134
  });
112
135
  return true;
113
136
  }
114
- catch (e) {
137
+ catch {
115
138
  return false;
116
139
  }
117
140
  }
118
141
  case 'fix': {
142
+ const fixTargets = files.length === 0 ? ['.'] : files;
143
+ if (hasLocalBiomeConfig(options.targetRootDir)) {
144
+ try {
145
+ const biomeFlags = ['format', '--write', ...fixTargets];
146
+ await execa('biome', biomeFlags, {
147
+ stdio: 'inherit',
148
+ });
149
+ return true;
150
+ }
151
+ catch (e) {
152
+ console.error(e);
153
+ return false;
154
+ }
155
+ }
119
156
  const fixFlag = options.dryRun ? '--fix-dry-run' : '--fix';
157
+ const eslintFlags = [fixFlag, ...flags];
158
+ if (!hasLocalEslintConfig(options.targetRootDir)) {
159
+ eslintFlags.unshift('--config', path.join(options.mwtsRootDir, 'eslint.config.js'));
160
+ }
120
161
  try {
121
- await execa('node', [eslint, fixFlag, ...flags], {
162
+ await execa('eslint', eslintFlags, {
122
163
  stdio: 'inherit',
123
164
  });
124
165
  return true;
@@ -129,21 +170,24 @@ async function run(verb, files) {
129
170
  }
130
171
  }
131
172
  case 'clean':
132
- return clean_1.clean(options);
173
+ return (0, clean_1.clean)(options);
133
174
  default:
134
175
  usage(`Unknown verb: ${verb}`);
135
176
  return false;
136
177
  }
137
178
  }
138
- exports.run = run;
139
179
  updateNotifier({ pkg: packageJson }).notify();
140
180
  if (cli.input.length < 1) {
141
181
  usage();
142
182
  }
143
- run(cli.input[0], cli.input.slice(1)).then(success => {
183
+ run(cli.input[0], cli.input.slice(1))
184
+ .then(success => {
144
185
  if (!success) {
145
- // eslint-disable-next-line no-process-exit
146
186
  process.exit(1);
147
187
  }
188
+ })
189
+ .catch(e => {
190
+ console.error(e);
191
+ process.exit(1);
148
192
  });
149
193
  //# sourceMappingURL=cli.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,kDAAkD;AAClD,iCAA8B;AAC9B,mCAAgC;AAChC,iCAA8C;AAC9C,+BAA+B;AAG/B,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAgB,CAAC;AACjE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAwBpD,MAAM,MAAM,GAAW,OAAiB,CAAC;AAEzC,MAAM,GAAG,GAAG,IAAI,CAAC;IACf,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;iBAuBS;IACf,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;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2
- //# sourceMappingURL=index.d.ts.map
1
+ declare const eslint: any;
2
+ declare const tseslint: any;
3
+ declare const prettierConfig: any;
4
+ declare const pluginN: any;
5
+ declare const pluginPrettier: any;
6
+ declare const globals: any;
7
+ declare const defineConfig: any;
package/dist/src/index.js CHANGED
@@ -1,5 +1,86 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const cfg = require("../.eslintrc.json");
4
- module.exports = cfg;
2
+ const eslint = require('@eslint/js');
3
+ const tseslint = require('typescript-eslint');
4
+ const prettierConfig = require('eslint-config-prettier');
5
+ const pluginN = require('eslint-plugin-n');
6
+ const pluginPrettier = require('eslint-plugin-prettier');
7
+ const globals = require('globals');
8
+ const defineConfig = require('eslint/config').defineConfig;
9
+ module.exports = defineConfig([
10
+ eslint.configs.recommended,
11
+ prettierConfig,
12
+ {
13
+ languageOptions: {
14
+ globals: globals.node,
15
+ },
16
+ plugins: {
17
+ n: pluginN,
18
+ prettier: pluginPrettier,
19
+ },
20
+ rules: {
21
+ 'prettier/prettier': 'error',
22
+ 'block-scoped-var': 'error',
23
+ eqeqeq: 'error',
24
+ 'no-var': 'error',
25
+ 'prefer-const': 'error',
26
+ 'eol-last': 'error',
27
+ 'prefer-arrow-callback': 'error',
28
+ 'no-trailing-spaces': 'error',
29
+ quotes: ['warn', 'single', { avoidEscape: true }],
30
+ 'no-restricted-properties': [
31
+ 'error',
32
+ {
33
+ object: 'describe',
34
+ property: 'only',
35
+ },
36
+ {
37
+ object: 'it',
38
+ property: 'only',
39
+ },
40
+ ],
41
+ },
42
+ },
43
+ {
44
+ files: ['**/.prettierrc.js', '**/eslint.config.js', '**/eslint.ignores.js'],
45
+ languageOptions: {
46
+ sourceType: 'commonjs',
47
+ globals: globals.node,
48
+ },
49
+ },
50
+ {
51
+ files: ['**/*.ts', '**/*.tsx'],
52
+ extends: [tseslint.configs.recommended],
53
+ languageOptions: {
54
+ parser: tseslint.parser,
55
+ parserOptions: {
56
+ ecmaVersion: 2018,
57
+ sourceType: 'module',
58
+ project: './tsconfig.json',
59
+ },
60
+ },
61
+ rules: {
62
+ '@typescript-eslint/ban-ts-comment': 'warn',
63
+ '@typescript-eslint/no-floating-promises': 'error',
64
+ '@typescript-eslint/no-non-null-assertion': 'off',
65
+ '@typescript-eslint/no-use-before-define': 'off',
66
+ '@typescript-eslint/no-warning-comments': 'off',
67
+ '@typescript-eslint/no-empty-function': 'off',
68
+ '@typescript-eslint/no-unused-vars': 'warn',
69
+ '@typescript-eslint/no-var-requires': 'off',
70
+ '@typescript-eslint/no-require-imports': 'off',
71
+ '@typescript-eslint/no-empty-object-type': 'off',
72
+ '@typescript-eslint/explicit-function-return-type': 'off',
73
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
74
+ '@typescript-eslint/ban-types': 'off',
75
+ '@typescript-eslint/camelcase': 'off',
76
+ 'n/no-missing-import': 'off',
77
+ 'n/no-empty-function': 'off',
78
+ 'n/no-unsupported-features/es-syntax': 'off',
79
+ 'n/no-missing-require': 'off',
80
+ 'n/shebang': 'off',
81
+ 'no-dupe-class-members': 'off',
82
+ 'require-atomic-updates': 'off',
83
+ },
84
+ },
85
+ ]);
5
86
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,yCAAyC;AACzC,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC9C,MAAM,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACzD,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC3C,MAAM,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAA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ACpB,OAAO,EAAE,iBAAiB;aAC3B;SACF;QACD,KAAK,EAAE;YACL,mCAAmC,EAAE,MAAM;YAC3C,yCAAyC,EAAE,OAAO;YAClD,0CAA0C,EAAE,KAAK;YACjD,yCAAyC,EAAE,KAAK;YAChD,wCAAwC,EAAE,KAAK;YAC/C,sCAAsC,EAAE,KAAK;YAC7C,mCAAmC,EAAE,MAAM;YAC3C,oCAAoC,EAAE,KAAK;YAC3C,uCAAuC,EAAE,KAAK;YAC9C,yCAAyC,EAAE,KAAK;YAChD,kDAAkD,EAAE,KAAK;YACzD,mDAAmD,EAAE,KAAK;YAC1D,8BAA8B,EAAE,KAAK;YACrC,8BAA8B,EAAE,KAAK;YACrC,qBAAqB,EAAE,KAAK;YAC5B,qBAAqB,EAAE,KAAK;YAC5B,qCAAqC,EAAE,KAAK;YAC5C,sBAAsB,EAAE,KAAK;YAC7B,WAAW,EAAE,KAAK;YAClB,uBAAuB,EAAE,KAAK;YAC9B,wBAAwB,EAAE,KAAK;SAChC;KACF;CACF,CAAC,CAAC"}
@@ -1,11 +1,7 @@
1
1
  import { Options } from './cli';
2
- import { PackageJson } from '@npm/types';
2
+ import { PackageJSON as PackageJson } from '@npm/types';
3
+ export declare const ESLINT_IGNORE = "module.exports = ['dist/', '**/node_modules/']\n";
3
4
  export declare function addScripts(packageJson: PackageJson, options: Options): Promise<boolean>;
4
5
  export declare function addDependencies(packageJson: PackageJson, options: Options): Promise<boolean>;
5
- export declare const ESLINT_CONFIG: {
6
- extends: string;
7
- };
8
- export declare const ESLINT_IGNORE = "dist/\n";
9
6
  export declare function installDefaultTemplate(options: Options): Promise<boolean>;
10
7
  export declare function init(options: Options): Promise<boolean>;
11
- //# sourceMappingURL=init.d.ts.map