@form8ion/eslint-config-extender 9.0.0-beta.1 → 9.0.0-beta.2
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 +13 -10
- package/example.js +13 -10
- package/lib/index.mjs +11 -13
- package/lib/index.mjs.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ $ npm install @form8ion/eslint-config-extender --save-prod
|
|
|
49
49
|
const {packageManagers} = await import('@form8ion/javascript-core');
|
|
50
50
|
const githubPlugin = await import('@form8ion/github');
|
|
51
51
|
const {questionNames: projectQuestionNames} = await import('@form8ion/project');
|
|
52
|
-
const
|
|
52
|
+
const javascriptPlugin = await import('@form8ion/javascript');
|
|
53
53
|
const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -83,18 +83,21 @@ const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
|
|
|
83
83
|
[projectQuestionNames.GIT_REPO]: true,
|
|
84
84
|
[projectQuestionNames.REPO_HOST]: 'GitHub',
|
|
85
85
|
[projectQuestionNames.REPO_OWNER]: 'org-name',
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
93
|
-
[
|
|
86
|
+
[javascriptPlugin.questionNames.AUTHOR_NAME]: 'John Smith',
|
|
87
|
+
[javascriptPlugin.questionNames.AUTHOR_EMAIL]: 'john@smith.org',
|
|
88
|
+
[javascriptPlugin.questionNames.AUTHOR_URL]: 'https://smith.org',
|
|
89
|
+
[javascriptPlugin.questionNames.SCOPE]: 'org-name',
|
|
90
|
+
[javascriptPlugin.questionNames.PACKAGE_MANAGER]: packageManagers.NPM,
|
|
91
|
+
[javascriptPlugin.questionNames.NODE_VERSION_CATEGORY]: 'LTS',
|
|
92
|
+
[javascriptPlugin.questionNames.CI_SERVICE]: 'Other',
|
|
93
|
+
[javascriptPlugin.questionNames.PROVIDE_EXAMPLE]: false
|
|
94
94
|
},
|
|
95
95
|
plugins: {vcsHosts: {GitHub: githubPlugin}}
|
|
96
96
|
},
|
|
97
|
-
decisions =>
|
|
97
|
+
decisions => ({
|
|
98
|
+
...javascriptPlugin,
|
|
99
|
+
scaffold: options =>javascriptPlugin.scaffold({...options, decisions, unitTestFrameworks: {}})
|
|
100
|
+
})
|
|
98
101
|
);
|
|
99
102
|
})();
|
|
100
103
|
```
|
package/example.js
CHANGED
|
@@ -22,7 +22,7 @@ td.when(execa('npm', ['whoami'])).thenResolve({stdout: any.word()});
|
|
|
22
22
|
const {packageManagers} = await import('@form8ion/javascript-core');
|
|
23
23
|
const githubPlugin = await import('@form8ion/github');
|
|
24
24
|
const {questionNames: projectQuestionNames} = await import('@form8ion/project');
|
|
25
|
-
const
|
|
25
|
+
const javascriptPlugin = await import('@form8ion/javascript');
|
|
26
26
|
const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
|
|
27
27
|
|
|
28
28
|
// remark-usage-ignore-next
|
|
@@ -55,17 +55,20 @@ stubbedFs({node_modules: stubbedNodeModules});
|
|
|
55
55
|
[projectQuestionNames.GIT_REPO]: true,
|
|
56
56
|
[projectQuestionNames.REPO_HOST]: 'GitHub',
|
|
57
57
|
[projectQuestionNames.REPO_OWNER]: 'org-name',
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
58
|
+
[javascriptPlugin.questionNames.AUTHOR_NAME]: 'John Smith',
|
|
59
|
+
[javascriptPlugin.questionNames.AUTHOR_EMAIL]: 'john@smith.org',
|
|
60
|
+
[javascriptPlugin.questionNames.AUTHOR_URL]: 'https://smith.org',
|
|
61
|
+
[javascriptPlugin.questionNames.SCOPE]: 'org-name',
|
|
62
|
+
[javascriptPlugin.questionNames.PACKAGE_MANAGER]: packageManagers.NPM,
|
|
63
|
+
[javascriptPlugin.questionNames.NODE_VERSION_CATEGORY]: 'LTS',
|
|
64
|
+
[javascriptPlugin.questionNames.CI_SERVICE]: 'Other',
|
|
65
|
+
[javascriptPlugin.questionNames.PROVIDE_EXAMPLE]: false
|
|
66
66
|
},
|
|
67
67
|
plugins: {vcsHosts: {GitHub: githubPlugin}}
|
|
68
68
|
},
|
|
69
|
-
decisions =>
|
|
69
|
+
decisions => ({
|
|
70
|
+
...javascriptPlugin,
|
|
71
|
+
scaffold: options => javascriptPlugin.scaffold({...options, decisions, unitTestFrameworks: {}})
|
|
72
|
+
})
|
|
70
73
|
);
|
|
71
74
|
})();
|
package/lib/index.mjs
CHANGED
|
@@ -46,7 +46,7 @@ async function scaffold ({projectRoot, scope, projectName}) {
|
|
|
46
46
|
|
|
47
47
|
const PLUGIN_NAME = 'ESLint Config';
|
|
48
48
|
|
|
49
|
-
function highLevel (options,
|
|
49
|
+
function highLevel (options, javascriptPluginFactory) {
|
|
50
50
|
const javaScriptLanguageChoice = 'JavaScript';
|
|
51
51
|
|
|
52
52
|
return scaffold$1(
|
|
@@ -56,18 +56,16 @@ function highLevel (options, javascriptScaffolderFactory) {
|
|
|
56
56
|
decisions: {[questionNames.PROJECT_LANGUAGE]: javaScriptLanguageChoice},
|
|
57
57
|
plugins: {
|
|
58
58
|
languages: {
|
|
59
|
-
[javaScriptLanguageChoice]: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
})
|
|
70
|
-
}
|
|
59
|
+
[javaScriptLanguageChoice]: javascriptPluginFactory({
|
|
60
|
+
...options.decisions,
|
|
61
|
+
[questionNames$1.PROJECT_TYPE]: 'Package',
|
|
62
|
+
[questionNames$1.PROJECT_TYPE_CHOICE]: PLUGIN_NAME,
|
|
63
|
+
[questionNames$1.UNIT_TESTS]: false,
|
|
64
|
+
[questionNames$1.INTEGRATION_TESTS]: false,
|
|
65
|
+
[questionNames$1.CONFIGURE_LINTING]: false,
|
|
66
|
+
[questionNames$1.DIALECT]: dialects.COMMON_JS,
|
|
67
|
+
[questionNames$1.SHOULD_BE_SCOPED]: true
|
|
68
|
+
})
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
}
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/scaffold.js","../src/constants.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: [`@form8ion/${projectName}`],\n devDependencies: [`@${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';\n","import deepmerge from 'deepmerge';\nimport {questionNames as jsQuestionNames} from '@form8ion/javascript';\nimport {dialects} from '@form8ion/javascript-core';\nimport {questionNames as projectQuestionNames, scaffold} from '@form8ion/project';\n\nimport {PLUGIN_NAME} from './constants.js';\n\nexport default function (options,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/scaffold.js","../src/constants.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: [`@form8ion/${projectName}`],\n devDependencies: [`@${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';\n","import deepmerge from 'deepmerge';\nimport {questionNames as jsQuestionNames} from '@form8ion/javascript';\nimport {dialects} from '@form8ion/javascript-core';\nimport {questionNames as projectQuestionNames, scaffold} from '@form8ion/project';\n\nimport {PLUGIN_NAME} from './constants.js';\n\nexport default function (options, javascriptPluginFactory) {\n const javaScriptLanguageChoice = 'JavaScript';\n\n return scaffold(\n deepmerge(\n options,\n {\n decisions: {[projectQuestionNames.PROJECT_LANGUAGE]: javaScriptLanguageChoice},\n plugins: {\n languages: {\n [javaScriptLanguageChoice]: javascriptPluginFactory({\n ...options.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_SCOP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iEAAiE,CAAC;AAClF,MAAM,CAAC,OAAO,EAAE,gDAAgD,CAAC;AACjE,MAAM,CAAC,OAAO,EAAE,uDAAuD,CAAC;AACxE,KAAK;AACL,GAAG,CAAC;AACJ;;ACxCY,MAAC,WAAW,GAAG;;ACOZ,kBAAQ,EAAE,OAAO,EAAE,uBAAuB,EAAE;AAC3D,EAAE,MAAM,wBAAwB,GAAG,YAAY,CAAC;AAChD;AACA,EAAE,OAAOC,UAAQ;AACjB,IAAI,SAAS;AACb,MAAM,OAAO;AACb,MAAM;AACN,QAAQ,SAAS,EAAE,CAAC,CAACC,aAAoB,CAAC,gBAAgB,GAAG,wBAAwB,CAAC;AACtF,QAAQ,OAAO,EAAE;AACjB,UAAU,SAAS,EAAE;AACrB,YAAY,CAAC,wBAAwB,GAAG,uBAAuB,CAAC;AAChE,cAAc,GAAG,OAAO,CAAC,SAAS;AAClC,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,IAAI;AACtD,aAAa,CAAC;AACd,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@form8ion/eslint-config-extender",
|
|
3
3
|
"description": "shareable ESLint config scaffolder for extending another config",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "9.0.0-beta.
|
|
5
|
+
"version": "9.0.0-beta.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "^18.17.0 || >=20.6.1"
|
|
@@ -61,37 +61,37 @@
|
|
|
61
61
|
"deepmerge": "^4.2.2"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@cucumber/cucumber": "10.
|
|
64
|
+
"@cucumber/cucumber": "10.9.0",
|
|
65
65
|
"@form8ion/commitlint-config": "1.0.76",
|
|
66
66
|
"@form8ion/eslint-config": "7.0.9",
|
|
67
67
|
"@form8ion/eslint-config-cucumber": "1.4.1",
|
|
68
68
|
"@form8ion/github": "2.0.0",
|
|
69
|
-
"@form8ion/remark-lint-preset": "6.0.
|
|
69
|
+
"@form8ion/remark-lint-preset": "6.0.4",
|
|
70
70
|
"@travi/any": "3.1.2",
|
|
71
|
-
"ban-sensitive-files": "1.10.
|
|
71
|
+
"ban-sensitive-files": "1.10.5",
|
|
72
72
|
"c8": "10.1.2",
|
|
73
73
|
"chai": "5.1.1",
|
|
74
74
|
"cross-env": "7.0.3",
|
|
75
75
|
"cz-conventional-changelog": "3.3.0",
|
|
76
|
-
"debug": "4.3.
|
|
76
|
+
"debug": "4.3.6",
|
|
77
77
|
"gherkin-lint": "4.2.4",
|
|
78
|
-
"husky": "9.1.
|
|
78
|
+
"husky": "9.1.5",
|
|
79
79
|
"jest-when": "3.6.0",
|
|
80
80
|
"js-yaml": "4.1.0",
|
|
81
81
|
"lockfile-lint": "4.14.0",
|
|
82
|
-
"ls-engines": "0.9.
|
|
82
|
+
"ls-engines": "0.9.3",
|
|
83
83
|
"mock-fs": "5.2.0",
|
|
84
|
-
"nock": "13.5.
|
|
84
|
+
"nock": "13.5.5",
|
|
85
85
|
"npm-run-all2": "6.2.2",
|
|
86
|
-
"publint": "0.2.
|
|
86
|
+
"publint": "0.2.10",
|
|
87
87
|
"remark-cli": "12.0.1",
|
|
88
88
|
"remark-toc": "9.0.0",
|
|
89
89
|
"remark-usage": "11.0.1",
|
|
90
90
|
"rimraf": "6.0.1",
|
|
91
|
-
"rollup": "4.
|
|
91
|
+
"rollup": "4.21.1",
|
|
92
92
|
"rollup-plugin-auto-external": "2.0.0",
|
|
93
93
|
"testdouble": "3.20.2",
|
|
94
|
-
"vitest": "2.0.
|
|
94
|
+
"vitest": "2.0.5"
|
|
95
95
|
},
|
|
96
96
|
"packageManager": "npm@10.8.2+sha512.c7f0088c520a46596b85c6f8f1da943400199748a0f7ea8cb8df75469668dc26f6fb3ba26df87e2884a5ebe91557292d0f3db7d0929cdb4f14910c3032ac81fb"
|
|
97
97
|
}
|