@form8ion/eslint-config-extender 12.0.0-beta.1 → 12.0.0-beta.3

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
@@ -45,9 +45,12 @@ $ npm install @form8ion/eslint-config-extender --save-prod
45
45
 
46
46
  #### Import
47
47
 
48
+ ```javascript
49
+ import {promptConstants} from '@form8ion/project';
50
+ ```
51
+
48
52
  ```javascript
49
53
  const {packageManagers} = await import('@form8ion/javascript-core');
50
- const githubPlugin = await import('@form8ion/github');
51
54
  const {questionNames: projectQuestionNames} = await import('@form8ion/project');
52
55
  const javascriptPlugin = await import('@form8ion/javascript');
53
56
  const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
@@ -74,15 +77,6 @@ const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
74
77
  await extendEslintConfig(
75
78
  {
76
79
  decisions: {
77
- [projectQuestionNames.PROJECT_NAME]: 'eslint-config-foo',
78
- [projectQuestionNames.DESCRIPTION]: 'a description of the project',
79
- [projectQuestionNames.VISIBILITY]: 'Public',
80
- [projectQuestionNames.LICENSE]: 'MIT',
81
- [projectQuestionNames.COPYRIGHT_HOLDER]: 'John Smith',
82
- [projectQuestionNames.COPYRIGHT_YEAR]: '2022',
83
- [projectQuestionNames.GIT_REPO]: true,
84
- [projectQuestionNames.REPO_HOST]: 'GitHub',
85
- [projectQuestionNames.REPO_OWNER]: 'org-name',
86
80
  [javascriptPlugin.questionNames.AUTHOR_NAME]: 'John Smith',
87
81
  [javascriptPlugin.questionNames.AUTHOR_EMAIL]: 'john@smith.org',
88
82
  [javascriptPlugin.questionNames.AUTHOR_URL]: 'https://smith.org',
@@ -92,7 +86,15 @@ const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
92
86
  [javascriptPlugin.questionNames.CI_SERVICE]: 'Other',
93
87
  [javascriptPlugin.questionNames.PROVIDE_EXAMPLE]: false
94
88
  },
95
- plugins: {vcsHosts: {GitHub: githubPlugin}}
89
+ plugins: {
90
+ vcsHosts: {
91
+ foo: {
92
+ scaffold: ({projectName}) => ({
93
+ vcs: {name: projectName, host: any.url(), owner: any.word(), ssh_url: any.url()}
94
+ })
95
+ }
96
+ }
97
+ }
96
98
  },
97
99
  decisions => ({
98
100
  ...javascriptPlugin,
@@ -102,7 +104,34 @@ const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
102
104
  configs: {},
103
105
  plugins: {unitTestFrameworks: {}}
104
106
  })
105
- })
107
+ }),
108
+ {
109
+ prompt: ({id}) => {
110
+ switch (id) {
111
+ case promptConstants.ids.BASE_DETAILS:
112
+ return {
113
+ [projectQuestionNames.PROJECT_NAME]: 'eslint-config-foo',
114
+ [projectQuestionNames.DESCRIPTION]: 'a description of the project',
115
+ [projectQuestionNames.VISIBILITY]: 'Public',
116
+ [projectQuestionNames.LICENSE]: 'MIT',
117
+ [projectQuestionNames.COPYRIGHT_HOLDER]: 'John Smith',
118
+ [projectQuestionNames.COPYRIGHT_YEAR]: '2022'
119
+ };
120
+ case promptConstants.ids.GIT_REPOSITORY:
121
+ return {[projectQuestionNames.GIT_REPO]: true};
122
+ case promptConstants.ids.REPOSITORY_HOST:
123
+ return {[projectQuestionNames.REPO_HOST]: 'foo'};
124
+ default:
125
+ throw new Error(`Unknown prompt: ${id}`);
126
+ }
127
+ },
128
+ logger: {
129
+ info: () => undefined,
130
+ success: () => undefined,
131
+ warn: () => undefined,
132
+ error: () => undefined
133
+ }
134
+ }
106
135
  );
107
136
  })();
108
137
  ```
@@ -150,11 +179,11 @@ $ npm test
150
179
 
151
180
  [renovate-link]: https://renovatebot.com
152
181
 
153
- [renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
182
+ [renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovate
154
183
 
155
184
  [coverage-link]: https://codecov.io/github/form8ion/eslint-config-extender
156
185
 
157
- [coverage-badge]: https://img.shields.io/codecov/c/github/form8ion/eslint-config-extender?logo=codecov
186
+ [coverage-badge]: https://img.shields.io/codecov/c/github/form8ion/eslint-config-extender/master?logo=codecov
158
187
 
159
188
  [license-link]: LICENSE
160
189
 
package/example.js CHANGED
@@ -94,6 +94,12 @@ stubbedFs({node_modules: stubbedNodeModules});
94
94
  default:
95
95
  throw new Error(`Unknown prompt: ${id}`);
96
96
  }
97
+ },
98
+ logger: {
99
+ info: () => undefined,
100
+ success: () => undefined,
101
+ warn: () => undefined,
102
+ error: () => undefined
97
103
  }
98
104
  }
99
105
  );
package/lib/index.mjs CHANGED
@@ -4,9 +4,9 @@ import { write } from '@form8ion/config-file';
4
4
  import deepmerge from 'deepmerge';
5
5
  import { questionNames as questionNames$1 } from '@form8ion/javascript';
6
6
  import { dialects } from '@form8ion/javascript-core';
7
- import { promptConstants, questionNames, scaffold as scaffold$1 } from '@form8ion/project';
7
+ import { promptConstants, questionNames, scaffold } from '@form8ion/project';
8
8
 
9
- async function scaffold ({projectRoot, scope, projectName}) {
9
+ async function scaffoldEslintConfig({projectRoot, scope, projectName}) {
10
10
  const configShortName = projectName.substring('eslint-config-'.length);
11
11
 
12
12
  await Promise.all([
@@ -60,7 +60,7 @@ function injectLanguageChoiceIntoPrompt(prompt) {
60
60
  function extendEslintConfig(options, javascriptPluginFactory, dependencies) {
61
61
  const {decisions, ...otherOptions} = options;
62
62
 
63
- return scaffold$1(
63
+ return scaffold(
64
64
  deepmerge(
65
65
  otherOptions,
66
66
  {
@@ -87,5 +87,5 @@ function extendEslintConfig(options, javascriptPluginFactory, dependencies) {
87
87
  );
88
88
  }
89
89
 
90
- export { PLUGIN_NAME, extendEslintConfig, scaffold };
90
+ export { PLUGIN_NAME, extendEslintConfig, scaffoldEslintConfig as scaffold };
91
91
  //# sourceMappingURL=index.mjs.map
package/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/scaffold.js","../src/constants.js","../src/language-handler-prompt.js","../src/high-level.js"],"sourcesContent":["import {promises as fs} from 'node:fs';\nimport {fileTypes} from '@form8ion/core';\nimport {write} from '@form8ion/config-file';\n\nexport default async function ({projectRoot, scope, projectName}) {\n const configShortName = projectName.substring('eslint-config-'.length);\n\n await Promise.all([\n write({\n format: fileTypes.YAML,\n path: projectRoot,\n name: 'eslint',\n config: {root: true, extends: [`@${scope}`, '.']}\n }),\n fs.writeFile(\n `${projectRoot}/index.js`,\n `module.exports = {extends: '@form8ion/${configShortName}'};\\n`\n ),\n fs.writeFile(\n `${projectRoot}/example.js`,\n `module.exports = {\n extends: [\n '@${scope}',\n '@${scope}/${configShortName}'\n ]\n};\n`\n )\n ]);\n\n return {\n scripts: {'lint:js': 'eslint .'},\n dependencies: {javascript: {production: [`@form8ion/${projectName}`], development: [`@${scope}/eslint-config`]}},\n nextSteps: [\n {summary: 'Save the extended `@form8ion` eslint-config as an exact version'},\n {summary: 'Document saving this config using the dev flag'},\n {summary: 'Link to the extended `@form8ion` config in the README'}\n ]\n };\n}\n","export const PLUGIN_NAME = 'ESLint Config';\nexport const JAVASCRIPT_LANGUAGE_CHOICE = 'JavaScript';\n","import {promptConstants, questionNames as projectQuestionNames} from '@form8ion/project';\nimport {JAVASCRIPT_LANGUAGE_CHOICE} from './constants.js';\n\nexport default function injectLanguageChoiceIntoPrompt(prompt) {\n return promptOptions => {\n const {id} = promptOptions;\n\n if (promptConstants.ids.PROJECT_LANGUAGE === id) {\n return {[projectQuestionNames.PROJECT_LANGUAGE]: JAVASCRIPT_LANGUAGE_CHOICE};\n }\n return prompt(promptOptions);\n };\n}\n","import deepmerge from 'deepmerge';\nimport {questionNames as jsQuestionNames} from '@form8ion/javascript';\nimport {dialects} from '@form8ion/javascript-core';\nimport {scaffold} from '@form8ion/project';\n\nimport {JAVASCRIPT_LANGUAGE_CHOICE, PLUGIN_NAME} from './constants.js';\nimport injectLanguageChoiceIntoPrompt from './language-handler-prompt.js';\n\nexport default function extendEslintConfig(options, javascriptPluginFactory, dependencies) {\n const {decisions, ...otherOptions} = options;\n\n return scaffold(\n deepmerge(\n otherOptions,\n {\n plugins: {\n languages: {\n [JAVASCRIPT_LANGUAGE_CHOICE]: javascriptPluginFactory({\n ...decisions,\n [jsQuestionNames.PROJECT_TYPE]: 'Package',\n [jsQuestionNames.PROJECT_TYPE_CHOICE]: PLUGIN_NAME,\n [jsQuestionNames.UNIT_TESTS]: false,\n [jsQuestionNames.INTEGRATION_TESTS]: false,\n [jsQuestionNames.CONFIGURE_LINTING]: false,\n [jsQuestionNames.DIALECT]: dialects.COMMON_JS,\n [jsQuestionNames.SHOULD_BE_SCOPED]: true\n })\n }\n }\n }\n ),\n {\n ...dependencies,\n prompt: injectLanguageChoiceIntoPrompt(dependencies.prompt)\n }\n );\n}\n"],"names":["fs","projectQuestionNames","scaffold","jsQuestionNames"],"mappings":";;;;;;;;AAIe,uBAAc,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE;AAClE,EAAE,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC;;AAExE,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC;AACpB,IAAI,KAAK,CAAC;AACV,MAAM,MAAM,EAAE,SAAS,CAAC,IAAI;AAC5B,MAAM,IAAI,EAAE,WAAW;AACvB,MAAM,IAAI,EAAE,QAAQ;AACpB,MAAM,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;AACtD,KAAK,CAAC;AACN,IAAIA,QAAE,CAAC,SAAS;AAChB,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC;AAC/B,MAAM,CAAC,sCAAsC,EAAE,eAAe,CAAC,KAAK;AACpE,KAAK;AACL,IAAIA,QAAE,CAAC,SAAS;AAChB,MAAM,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC;AACjC,MAAM,CAAC;AACP;AACA,MAAM,EAA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,uBAAuB,CAAC;AAClE,cAAc,GAAG,SAAS;AAC1B,cAAc,CAACC,eAAe,CAAC,YAAY,GAAG,SAAS;AACvD,cAAc,CAACA,eAAe,CAAC,mBAAmB,GAAG,WAAW;AAChE,cAAc,CAACA,eAAe,CAAC,UAAU,GAAG,KAAK;AACjD,cAAc,CAACA,eAAe,CAAC,iBAAiB,GAAG,KAAK;AACxD,cAAc,CAACA,eAAe,CAAC,iBAAiB,GAAG,KAAK;AACxD,cAAc,CAACA,eAAe,CAAC,OAAO,GAAG,QAAQ,CAAC,SAAS;AAC3D,cAAc,CAACA,eAAe,CAAC,gBAAgB,GAAG;AAClD,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ,MAAM,GAAG,YAAY;AACrB,MAAM,MAAM,EAAE,8BAA8B,CAAC,YAAY,CAAC,MAAM;AAChE;AACA,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/scaffold.js","../src/constants.js","../src/language-handler-prompt.js","../src/high-level.js"],"sourcesContent":["import {promises as fs} from 'node:fs';\nimport {fileTypes} from '@form8ion/core';\nimport {write} from '@form8ion/config-file';\n\nexport default async function scaffoldEslintConfig({projectRoot, scope, projectName}) {\n const configShortName = projectName.substring('eslint-config-'.length);\n\n await Promise.all([\n write({\n format: fileTypes.YAML,\n path: projectRoot,\n name: 'eslint',\n config: {root: true, extends: [`@${scope}`, '.']}\n }),\n fs.writeFile(\n `${projectRoot}/index.js`,\n `module.exports = {extends: '@form8ion/${configShortName}'};\\n`\n ),\n fs.writeFile(\n `${projectRoot}/example.js`,\n `module.exports = {\n extends: [\n '@${scope}',\n '@${scope}/${configShortName}'\n ]\n};\n`\n )\n ]);\n\n return {\n scripts: {'lint:js': 'eslint .'},\n dependencies: {javascript: {production: [`@form8ion/${projectName}`], development: [`@${scope}/eslint-config`]}},\n nextSteps: [\n {summary: 'Save the extended `@form8ion` eslint-config as an exact version'},\n {summary: 'Document saving this config using the dev flag'},\n {summary: 'Link to the extended `@form8ion` config in the README'}\n ]\n };\n}\n","export const PLUGIN_NAME = 'ESLint Config';\nexport const JAVASCRIPT_LANGUAGE_CHOICE = 'JavaScript';\n","import {promptConstants, questionNames as projectQuestionNames} from '@form8ion/project';\nimport {JAVASCRIPT_LANGUAGE_CHOICE} from './constants.js';\n\nexport default function injectLanguageChoiceIntoPrompt(prompt) {\n return promptOptions => {\n const {id} = promptOptions;\n\n if (promptConstants.ids.PROJECT_LANGUAGE === id) {\n return {[projectQuestionNames.PROJECT_LANGUAGE]: JAVASCRIPT_LANGUAGE_CHOICE};\n }\n return prompt(promptOptions);\n };\n}\n","import deepmerge from 'deepmerge';\nimport {questionNames as jsQuestionNames} from '@form8ion/javascript';\nimport {dialects} from '@form8ion/javascript-core';\nimport {scaffold} from '@form8ion/project';\n\nimport {JAVASCRIPT_LANGUAGE_CHOICE, PLUGIN_NAME} from './constants.js';\nimport injectLanguageChoiceIntoPrompt from './language-handler-prompt.js';\n\nexport default function extendEslintConfig(options, javascriptPluginFactory, dependencies) {\n const {decisions, ...otherOptions} = options;\n\n return scaffold(\n deepmerge(\n otherOptions,\n {\n plugins: {\n languages: {\n [JAVASCRIPT_LANGUAGE_CHOICE]: javascriptPluginFactory({\n ...decisions,\n [jsQuestionNames.PROJECT_TYPE]: 'Package',\n [jsQuestionNames.PROJECT_TYPE_CHOICE]: PLUGIN_NAME,\n [jsQuestionNames.UNIT_TESTS]: false,\n [jsQuestionNames.INTEGRATION_TESTS]: false,\n [jsQuestionNames.CONFIGURE_LINTING]: false,\n [jsQuestionNames.DIALECT]: dialects.COMMON_JS,\n [jsQuestionNames.SHOULD_BE_SCOPED]: true\n })\n }\n }\n }\n ),\n {\n ...dependencies,\n prompt: injectLanguageChoiceIntoPrompt(dependencies.prompt)\n }\n );\n}\n"],"names":["fs","projectQuestionNames","jsQuestionNames"],"mappings":";;;;;;;;AAIe,eAAe,oBAAoB,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,EAA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2,15 @@
2
2
  "name": "@form8ion/eslint-config-extender",
3
3
  "description": "shareable ESLint config scaffolder for extending another config",
4
4
  "license": "MIT",
5
- "version": "12.0.0-beta.1",
5
+ "version": "12.0.0-beta.3",
6
6
  "type": "module",
7
7
  "engines": {
8
- "node": "^20.19.0 || >=22.14.0"
8
+ "node": "^22.21.0 || >=24.12"
9
9
  },
10
10
  "author": "Matt Travi <npm@travi.org> (https://matt.travi.org)",
11
11
  "repository": "form8ion/eslint-config-extender",
12
12
  "bugs": "https://github.com/form8ion/eslint-config-extender/issues",
13
- "homepage": "https://npm.im/@form8ion/eslint-config-extender",
13
+ "homepage": "https://www.npmjs.com/package/@form8ion/eslint-config-extender",
14
14
  "runkitExampleFilename": "./example.js",
15
15
  "exports": "./lib/index.mjs",
16
16
  "main": "lib/index.mjs",
@@ -18,33 +18,32 @@
18
18
  "scripts": {
19
19
  "pretest": "run-s build",
20
20
  "test": "npm-run-all --print-label --parallel lint:* --parallel test:*",
21
- "lint:lockfile": "lockfile-lint",
21
+ "lint:engines": "ls-engines",
22
+ "lint:gherkin": "gplint --config .gplintrc.json",
22
23
  "lint:js": "eslint . --cache",
24
+ "lint:js:fix": "run-s 'lint:js -- --fix'",
25
+ "lint:lockfile": "lockfile-lint",
23
26
  "lint:md": "remark . --frail",
24
- "pregenerate:md": "run-s build",
25
- "generate:md": "NODE_OPTIONS=--enable-source-maps remark . --output",
27
+ "lint:peer": "npm ls >/dev/null",
28
+ "lint:publish": "publint --strict",
26
29
  "lint:sensitive": "ban",
27
- "pretest:integration:base": "run-s build",
28
- "lint:gherkin": "gherkin-lint",
30
+ "test:unit": "run-s 'test:unit:base -- --coverage'",
31
+ "test:unit:base": "NODE_ENV=test DEBUG=any vitest run src/",
29
32
  "test:integration": "run-s 'test:integration:base -- --profile noWip'",
33
+ "pretest:integration:base": "run-s build",
30
34
  "test:integration:base": "NODE_OPTIONS=--enable-source-maps DEBUG=any cucumber-js test/integration",
31
- "test:integration:debug": "DEBUG=test run-s test:integration",
35
+ "test:integration:debug": "DEBUG=test:* run-s test:integration",
32
36
  "test:integration:wip": "run-s 'test:integration:base -- --profile wip'",
33
37
  "test:integration:wip:debug": "DEBUG=test run-s 'test:integration:wip'",
34
- "test:integration:focus": "run-s 'test:integration:base -- --profile focus'",
35
- "clean": "rimraf ./lib",
36
38
  "prebuild": "run-s clean",
37
39
  "build": "npm-run-all --print-label --parallel build:*",
38
40
  "build:js": "rollup --config",
39
- "watch": "run-s 'build:js -- --watch'",
41
+ "clean": "rimraf ./lib",
42
+ "pregenerate:md": "run-s build",
43
+ "generate:md": "NODE_OPTIONS=--enable-source-maps remark . --output",
40
44
  "prepack": "run-s build",
41
- "test:unit": "cross-env NODE_ENV=test c8 run-s test:unit:base",
42
- "test:unit:base": "DEBUG=any vitest run",
43
- "lint:peer": "npm ls >/dev/null",
44
- "prepare": "husky install",
45
- "lint:engines": "ls-engines",
46
- "lint:publish": "publint --strict",
47
- "lint:js:fix": "run-s 'lint:js -- --fix'"
45
+ "prepare": "husky",
46
+ "watch": "run-s 'build:js -- --watch'"
48
47
  },
49
48
  "files": [
50
49
  "example.js",
@@ -61,24 +60,23 @@
61
60
  "@form8ion/core": "^4.7.1",
62
61
  "@form8ion/javascript": "^15.0.0",
63
62
  "@form8ion/javascript-core": "^12.0.0",
64
- "@form8ion/project": "22.0.0-beta.10",
63
+ "@form8ion/project": "22.0.0-beta.11",
65
64
  "deepmerge": "^4.2.2"
66
65
  },
67
66
  "devDependencies": {
68
67
  "@cucumber/cucumber": "12.8.2",
69
68
  "@form8ion/commitlint-config": "2.0.13",
70
- "@form8ion/eslint-config": "7.0.16",
69
+ "@form8ion/eslint-config": "7.1.0-beta.1",
71
70
  "@form8ion/eslint-config-cucumber": "1.4.1",
72
71
  "@form8ion/eslint-config-vitest": "1.1.0",
73
72
  "@form8ion/remark-lint-preset": "6.0.7",
74
73
  "@travi/any": "3.3.0",
74
+ "@vitest/coverage-v8": "4.1.5",
75
75
  "ban-sensitive-files": "1.10.11",
76
- "c8": "11.0.0",
77
76
  "chai": "6.2.2",
78
- "cross-env": "10.1.0",
79
77
  "cz-conventional-changelog": "3.3.0",
80
78
  "debug": "4.4.3",
81
- "gherkin-lint": "4.2.4",
79
+ "gplint": "2.5.2",
82
80
  "husky": "9.1.7",
83
81
  "js-yaml": "4.1.1",
84
82
  "lockfile-lint": "5.0.0",
package/src/scaffold.js CHANGED
@@ -2,7 +2,7 @@ import {promises as fs} from 'node:fs';
2
2
  import {fileTypes} from '@form8ion/core';
3
3
  import {write} from '@form8ion/config-file';
4
4
 
5
- export default async function ({projectRoot, scope, projectName}) {
5
+ export default async function scaffoldEslintConfig({projectRoot, scope, projectName}) {
6
6
  const configShortName = projectName.substring('eslint-config-'.length);
7
7
 
8
8
  await Promise.all([