mwts 1.3.0 → 2.0.1

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,21 @@ 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
+
29
+ For legacy mwts 1.x projects, run:
30
+
31
+ ```sh
32
+ npx mwts migrate
33
+ ```
34
+
26
35
  ## How it works
27
36
  When you run the `npx mwts init` command, it's going to do a few things for you:
28
37
  - Adds an opinionated `tsconfig.json` file to your project that uses the MidwayJS TypeScript Style.
29
38
  - Adds the necessary devDependencies to your `package.json`.
30
39
  - Adds scripts to your `package.json`:
31
- - `check`: Lints and checks for formatting problems.
40
+ - `lint`/`check`: Lints and checks for formatting problems.
32
41
  - `fix`: Automatically fixes formatting and linting problems (if possible).
33
42
  - `clean`: Removes output files.
34
43
  - `build`: Compiles the source code using TypeScript compiler.
@@ -44,13 +53,42 @@ mwts check one.ts two.ts three.ts
44
53
  mwts check *.ts
45
54
  ```
46
55
 
56
+ `mwts lint/check/fix` all support file arguments.
57
+ If you run them without `mwts init`, mwts will fall back to its built-in default ESLint config.
58
+
59
+ ### Built-in formatter modes
60
+ `mwts` has built-in formatter modes:
61
+ - default: `Prettier + ESLint`
62
+ - `--formatter stylistic`: `ESLint + Stylistic`
63
+ - `--formatter biome`: `Biome + ESLint` (Biome handles formatting)
64
+
65
+ ### Custom formatter example
66
+ If you want a formatter outside built-in modes, install and wire it in your project yourself.
67
+
68
+ Example:
69
+
70
+ ```sh
71
+ npm i -D dprint
72
+ ```
73
+
74
+ ```json
75
+ {
76
+ "scripts": {
77
+ "format": "dprint fmt",
78
+ "check:format": "dprint check"
79
+ }
80
+ }
81
+ ```
82
+
83
+ You can keep `mwts lint/check/fix` for linting and use another formatter only for formatting.
84
+
47
85
  ### 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:
86
+ 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
87
 
50
- ```yml
51
- ---
52
- extends:
53
- - './node_modules/mwts'
88
+ ```js
89
+ module.exports = [
90
+ ...require('mwts'),
91
+ ];
54
92
  ```
55
93
 
56
94
  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 +111,18 @@ Show your love for `mwts` and include a badge!
73
111
  ```
74
112
 
75
113
  ## 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.
114
+ `mwts` 2.x requires Node.js 20+.
115
+
116
+ ## Migrating from mwts 1.x to 2.x
117
+ - Upgrade runtime/tooling baseline:
118
+ - Node.js >= 20
119
+ - TypeScript >= 5
120
+ - `mwts init` now generates `eslint.config.js` (flat config), instead of `.eslintrc.json` / `.eslintignore`.
121
+ - Default formatter mode stays `Prettier + ESLint`.
122
+ - Optional formatter mode: `mwts init --formatter stylistic`.
123
+ - Optional formatter mode: `mwts init --formatter biome`.
124
+ - `mwts lint/check/fix` support per-file arguments and can run without `mwts init` by falling back to mwts built-in config.
125
+ - You can run `mwts migrate` once to generate a flat `eslint.config.js` from legacy `.eslintrc.json`.
77
126
 
78
127
  ## License
79
128
  [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,6 +1,6 @@
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
  /**
@@ -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"],"names":[],"mappings":";;;AAAA,+BAAgC;AAIhC,iCAA8C;AAM9C;;GAEG;AACI,KAAK,UAAU,KAAK,CAAC,OAAgB;IAC1C,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAA,kBAAW,EAAC,OAAO,CAAC,aAAa,CAAC,CAAa,CAAC;IACxE,IAAI,QAAQ,CAAC,eAAe,IAAI,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE;QAC/D,MAAM,MAAM,GAAG,QAAQ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AM,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,20 @@
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");
13
+ const migrate_1 = require("./migrate");
10
14
  const util_1 = require("./util");
11
15
  const execa = require("execa");
12
- // eslint-disable-next-line @typescript-eslint/no-var-requires
13
16
  const packageJson = require('../../package.json');
14
- const eslint = require.resolve('eslint/bin/eslint');
17
+ const updateNotifier = require('update-notifier').default;
15
18
  const logger = console;
16
19
  const cli = meow({
17
20
  help: `
@@ -24,6 +27,7 @@ const cli = meow({
24
27
  check Alias for lint. Kept for backward compatibility.
25
28
  fix Fixes formatting and linting issues (if possible).
26
29
  clean Removes all files generated by the build.
30
+ migrate Migrates legacy mwts/eslintrc setup to flat config.
27
31
 
28
32
  Options
29
33
  --help Prints this help message.
@@ -31,12 +35,14 @@ const cli = meow({
31
35
  -n, --no Assume a no answer for every prompt.
32
36
  --dry-run Don't make any actual changes.
33
37
  --yarn Use yarn instead of npm.
38
+ --formatter Formatter strategy: prettier (default), stylistic, or biome.
34
39
 
35
40
  Examples
36
41
  $ mwts init -y
37
42
  $ mwts lint
38
43
  $ mwts fix
39
44
  $ mwts fix src/file1.ts src/file2.ts
45
+ $ mwts migrate
40
46
  $ mwts clean`,
41
47
  flags: {
42
48
  help: { type: 'boolean' },
@@ -44,6 +50,7 @@ const cli = meow({
44
50
  no: { type: 'boolean', alias: 'n' },
45
51
  dryRun: { type: 'boolean' },
46
52
  yarn: { type: 'boolean' },
53
+ formatter: { type: 'string' },
47
54
  },
48
55
  });
49
56
  /**
@@ -54,31 +61,61 @@ const cli = meow({
54
61
  function getNodeVersion() {
55
62
  return process.version;
56
63
  }
57
- exports.getNodeVersion = getNodeVersion;
58
64
  function getEslintVersion() {
59
65
  const packageJson = (0, util_1.readJSON)(require.resolve('eslint/package.json'));
60
66
  return packageJson.version;
61
67
  }
62
- exports.getEslintVersion = getEslintVersion;
63
68
  function getPrettierVersion() {
64
69
  const packageJson = (0, util_1.readJSON)(require.resolve('prettier/package.json'));
65
70
  return packageJson.version;
66
71
  }
67
- exports.getPrettierVersion = getPrettierVersion;
72
+ function parseFormatterMode(value) {
73
+ if (value === null || value === undefined) {
74
+ return undefined;
75
+ }
76
+ if (value === 'prettier' || value === 'stylistic' || value === 'biome') {
77
+ return value;
78
+ }
79
+ throw new Error(`Unsupported formatter mode '${String(value)}'. Use 'prettier', 'stylistic', or 'biome'.`);
80
+ }
81
+ function hasLocalBiomeConfig(targetRootDir) {
82
+ return fs.existsSync(path.join(targetRootDir, 'biome.json'));
83
+ }
68
84
  function usage(msg) {
69
85
  if (msg) {
70
86
  logger.error(msg);
71
87
  }
72
88
  cli.showHelp(1);
73
89
  }
90
+ function findNearestEslintConfig(targetRootDir) {
91
+ const configNames = [
92
+ 'eslint.config.js',
93
+ 'eslint.config.cjs',
94
+ 'eslint.config.mjs',
95
+ ];
96
+ let currentDir = path.resolve(targetRootDir);
97
+ while (true) {
98
+ for (const configName of configNames) {
99
+ const configPath = path.join(currentDir, configName);
100
+ if (fs.existsSync(configPath)) {
101
+ return configPath;
102
+ }
103
+ }
104
+ const parentDir = path.dirname(currentDir);
105
+ if (parentDir === currentDir) {
106
+ return undefined;
107
+ }
108
+ currentDir = parentDir;
109
+ }
110
+ }
74
111
  async function run(verb, files) {
75
112
  // throw if running on an old version of nodejs
76
113
  const nodeMajorVersion = Number(getNodeVersion().slice(1).split('.')[0]);
77
114
  console.log(`Node.js Version: ${nodeMajorVersion}`);
78
115
  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
116
+ console.log(`Prettier Version: ${getPrettierVersion()}`);
117
+ if (nodeMajorVersion < 20) {
118
+ throw new Error(`mwts requires node.js 20.x or up. You are currently running
82
119
  ${process.version}, which is not supported. Please upgrade to
83
120
  a safe, secure version of nodejs!`);
84
121
  }
@@ -91,6 +128,7 @@ async function run(verb, files) {
91
128
  no: cli.flags.no || cli.flags.n || false,
92
129
  logger,
93
130
  yarn: cli.flags.yarn || (0, util_1.isYarnUsed)(),
131
+ formatterMode: parseFormatterMode(cli.flags.formatter),
94
132
  };
95
133
  // Linting/formatting depend on typescript. We don't want to load the
96
134
  // typescript module during init, since it might not exist.
@@ -98,27 +136,53 @@ async function run(verb, files) {
98
136
  if (verb === 'init') {
99
137
  return (0, init_1.init)(options);
100
138
  }
101
- const flags = Object.assign([], files);
139
+ const flags = [...files];
102
140
  if (flags.length === 0) {
103
141
  flags.push('**/*.ts', '**/*.js', '**/*.tsx', '**/*.jsx', '--no-error-on-unmatched-pattern');
104
142
  }
105
143
  switch (verb) {
106
144
  case 'lint':
107
145
  case 'check': {
146
+ const eslintFlags = [...flags];
147
+ const resolvedEslintConfig = findNearestEslintConfig(options.targetRootDir) ||
148
+ path.join(options.mwtsRootDir, 'eslint.config.js');
149
+ if (resolvedEslintConfig) {
150
+ eslintFlags.unshift('--config', resolvedEslintConfig);
151
+ }
108
152
  try {
109
- await execa('node', [eslint, ...flags], {
153
+ await execa('eslint', eslintFlags, {
110
154
  stdio: 'inherit',
111
155
  });
112
156
  return true;
113
157
  }
114
- catch (e) {
158
+ catch {
115
159
  return false;
116
160
  }
117
161
  }
118
162
  case 'fix': {
163
+ const fixTargets = files.length === 0 ? ['.'] : files;
164
+ if (hasLocalBiomeConfig(options.targetRootDir)) {
165
+ try {
166
+ const biomeFlags = ['format', '--write', ...fixTargets];
167
+ await execa('biome', biomeFlags, {
168
+ stdio: 'inherit',
169
+ });
170
+ return true;
171
+ }
172
+ catch (e) {
173
+ console.error(e);
174
+ return false;
175
+ }
176
+ }
119
177
  const fixFlag = options.dryRun ? '--fix-dry-run' : '--fix';
178
+ const eslintFlags = [fixFlag, ...flags];
179
+ const resolvedEslintConfig = findNearestEslintConfig(options.targetRootDir) ||
180
+ path.join(options.mwtsRootDir, 'eslint.config.js');
181
+ if (resolvedEslintConfig) {
182
+ eslintFlags.unshift('--config', resolvedEslintConfig);
183
+ }
120
184
  try {
121
- await execa('node', [eslint, fixFlag, ...flags], {
185
+ await execa('eslint', eslintFlags, {
122
186
  stdio: 'inherit',
123
187
  });
124
188
  return true;
@@ -130,20 +194,25 @@ async function run(verb, files) {
130
194
  }
131
195
  case 'clean':
132
196
  return (0, clean_1.clean)(options);
197
+ case 'migrate':
198
+ return (0, migrate_1.migrate)(options);
133
199
  default:
134
200
  usage(`Unknown verb: ${verb}`);
135
201
  return false;
136
202
  }
137
203
  }
138
- exports.run = run;
139
204
  updateNotifier({ pkg: packageJson }).notify();
140
205
  if (cli.input.length < 1) {
141
206
  usage();
142
207
  }
143
- run(cli.input[0], cli.input.slice(1)).then(success => {
208
+ run(cli.input[0], cli.input.slice(1))
209
+ .then(success => {
144
210
  if (!success) {
145
- // eslint-disable-next-line no-process-exit
146
211
  process.exit(1);
147
212
  }
213
+ })
214
+ .catch(e => {
215
+ console.error(e);
216
+ process.exit(1);
148
217
  });
149
218
  //# 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;AAwBp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E,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;YAC/B,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED,cAAc,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAE9C,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IACzB,KAAK,EAAE,CAAC;AACV,CAAC;AAED,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAClC,IAAI,CAAC,OAAO,CAAC,EAAE;IACd,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,CAAC,EAAE;IACT,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,2 +1,7 @@
1
- export {};
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,CAAC;AACzD,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC;AAE3D,MAAM,CAAC,OAAO,GAAG,YAAY,CAAC;IAC5B,MAAM,CAAC,OAAO,CAAC,WAAW;IAC1B,cAAc;IACd;QACE,eAAe,EAAE;YACf,OAAO,EAAE,OAAO,CAAC,IAAI;SACtB;QACD,OAAO,EAAE;YACP,CAAC,EAAE,OAAO;YACV,QAAQ,EAAE,cAAc;SACzB;QACD,KAAK,EAAE;YACL,mBAAmB,EAAE,OAAO;YAC5B,kBAAkB,EAAE,OAAO;YAC3B,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,OAAO;YACjB,cAAc,EAAE,OAAO;YACvB,UAAU,EAAE,OAA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YAC5C,sBAAsB,EAAE,KAAK;YAC7B,WAAW,EAAE,KAAK;YAClB,uBAAuB,EAAE,KAAK;YAC9B,wBAAwB,EAAE,KAAK;SAChC;KACF;CACF,CAAC,CAAC"}
@@ -1,11 +1,6 @@
1
1
  import { Options } from './cli';
2
- import { PackageJson } from '@npm/types';
2
+ import { PackageJSON as PackageJson } from '@npm/types';
3
3
  export declare function addScripts(packageJson: PackageJson, options: Options): Promise<boolean>;
4
4
  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
5
  export declare function installDefaultTemplate(options: Options): Promise<boolean>;
10
6
  export declare function init(options: Options): Promise<boolean>;
11
- //# sourceMappingURL=init.d.ts.map