@form8ion/eslint-config-extender 10.0.2 → 10.0.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/example.js +2 -1
- package/lib/index.mjs +1 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +16 -16
package/example.js
CHANGED
|
@@ -5,7 +5,7 @@ import stubbedFs from 'mock-fs';
|
|
|
5
5
|
import * as td from 'testdouble';
|
|
6
6
|
import any from '@travi/any';
|
|
7
7
|
|
|
8
|
-
// remark-usage-ignore-next
|
|
8
|
+
// remark-usage-ignore-next 13
|
|
9
9
|
const stubbedNodeModules = stubbedFs.load(resolve('node_modules'));
|
|
10
10
|
const error = new Error('Command failed with exit code 1: npm ls husky --json');
|
|
11
11
|
error.exitCode = 1;
|
|
@@ -18,6 +18,7 @@ td.when(execa('. ~/.nvm/nvm.sh && nvm install', {shell: true})).thenReturn({stdo
|
|
|
18
18
|
td.when(execa('npm', ['ls', 'husky', '--json'])).thenReject(error);
|
|
19
19
|
td.when(execa('npm run generate:md && npm test', {shell: true})).thenReturn({stdout: {pipe: () => undefined}});
|
|
20
20
|
td.when(execa('npm', ['whoami'])).thenResolve({stdout: any.word()});
|
|
21
|
+
td.when(execa('npm', ['--version'])).thenResolve({stdout: any.word()});
|
|
21
22
|
|
|
22
23
|
const {packageManagers} = await import('@form8ion/javascript-core');
|
|
23
24
|
const githubPlugin = await import('@form8ion/github');
|
package/lib/index.mjs
CHANGED
|
@@ -34,8 +34,7 @@ async function scaffold ({projectRoot, scope, projectName}) {
|
|
|
34
34
|
|
|
35
35
|
return {
|
|
36
36
|
scripts: {'lint:js': 'eslint .'},
|
|
37
|
-
dependencies: [`@form8ion/${projectName}`],
|
|
38
|
-
devDependencies: [`@${scope}/eslint-config`],
|
|
37
|
+
dependencies: {javascript: {production: [`@form8ion/${projectName}`], development: [`@${scope}/eslint-config`]}},
|
|
39
38
|
nextSteps: [
|
|
40
39
|
{summary: 'Save the extended `@form8ion` eslint-config as an exact version'},
|
|
41
40
|
{summary: 'Document saving this config using the dev flag'},
|
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}`]
|
|
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: {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';\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_SCOPED]: true\n })\n }\n }\n }\n )\n );\n}\n"],"names":["fs","scaffold","projectQuestionNames","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,KAA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,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;AAClD,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;AACH;;;;"}
|
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": "10.0.
|
|
5
|
+
"version": "10.0.3",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "^18.19.0 || ^20.6.1 || >=22"
|
|
@@ -53,46 +53,46 @@
|
|
|
53
53
|
"access": "public",
|
|
54
54
|
"provenance": true
|
|
55
55
|
},
|
|
56
|
-
"packageManager": "npm@
|
|
56
|
+
"packageManager": "npm@11.0.0+sha512.11dff29565d2297c74e7c594a9762581bde969f0aa5cbe6f5b3644bf008a16c065ece61094d9ffbb81125be38df8e1ba43eb8244b3d30c61eb797e9a2440e3ec",
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@form8ion/config-file": "^1.1.2",
|
|
59
59
|
"@form8ion/core": "^4.7.1",
|
|
60
|
-
"@form8ion/javascript": "^
|
|
60
|
+
"@form8ion/javascript": "^14.0.0-beta.1",
|
|
61
61
|
"@form8ion/javascript-core": "^12.0.0",
|
|
62
|
-
"@form8ion/project": "^
|
|
62
|
+
"@form8ion/project": "^21.0.0-beta.1",
|
|
63
63
|
"deepmerge": "^4.2.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@cucumber/cucumber": "11.0
|
|
67
|
-
"@form8ion/commitlint-config": "2.0.
|
|
66
|
+
"@cucumber/cucumber": "11.2.0",
|
|
67
|
+
"@form8ion/commitlint-config": "2.0.3",
|
|
68
68
|
"@form8ion/eslint-config": "7.0.12",
|
|
69
69
|
"@form8ion/eslint-config-cucumber": "1.4.1",
|
|
70
70
|
"@form8ion/github": "2.0.0",
|
|
71
71
|
"@form8ion/remark-lint-preset": "6.0.5",
|
|
72
72
|
"@travi/any": "3.1.2",
|
|
73
|
-
"ban-sensitive-files": "1.10.
|
|
74
|
-
"c8": "10.1.
|
|
73
|
+
"ban-sensitive-files": "1.10.7",
|
|
74
|
+
"c8": "10.1.3",
|
|
75
75
|
"chai": "5.1.2",
|
|
76
76
|
"cross-env": "7.0.3",
|
|
77
77
|
"cz-conventional-changelog": "3.3.0",
|
|
78
|
-
"debug": "4.
|
|
78
|
+
"debug": "4.4.0",
|
|
79
79
|
"gherkin-lint": "4.2.4",
|
|
80
|
-
"husky": "9.1.
|
|
81
|
-
"jest-when": "3.
|
|
80
|
+
"husky": "9.1.7",
|
|
81
|
+
"jest-when": "3.7.0",
|
|
82
82
|
"js-yaml": "4.1.0",
|
|
83
83
|
"lockfile-lint": "4.14.0",
|
|
84
84
|
"ls-engines": "0.9.3",
|
|
85
85
|
"mock-fs": "5.4.1",
|
|
86
|
-
"nock": "
|
|
87
|
-
"npm-run-all2": "7.0.
|
|
88
|
-
"publint": "0.2
|
|
86
|
+
"nock": "14.0.0",
|
|
87
|
+
"npm-run-all2": "7.0.2",
|
|
88
|
+
"publint": "0.3.2",
|
|
89
89
|
"remark-cli": "12.0.1",
|
|
90
90
|
"remark-toc": "9.0.0",
|
|
91
91
|
"remark-usage": "11.0.1",
|
|
92
92
|
"rimraf": "6.0.1",
|
|
93
|
-
"rollup": "4.
|
|
93
|
+
"rollup": "4.32.0",
|
|
94
94
|
"rollup-plugin-auto-external": "2.0.0",
|
|
95
95
|
"testdouble": "3.20.2",
|
|
96
|
-
"vitest": "
|
|
96
|
+
"vitest": "3.0.4"
|
|
97
97
|
}
|
|
98
98
|
}
|