https://github.com/form8ion/eslint-config-extender
shareable ESLint config scaffolder for extending another config
https://github.com/form8ion/eslint-config-extender
Last synced: about 1 month ago
JSON representation
shareable ESLint config scaffolder for extending another config
- Host: GitHub
- URL: https://github.com/form8ion/eslint-config-extender
- Owner: form8ion
- License: mit
- Created: 2020-07-27T03:47:46.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-05T07:14:56.000Z (about 1 month ago)
- Last Synced: 2025-05-05T08:26:02.436Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://npm.im/@form8ion/eslint-config-extender
- Size: 10.8 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - eslint-config-extender
README
# eslint-config-extender
[shareable](https://eslint.org/docs/developer-guide/shareable-configs#shareable-configs)
[ESLint](https://eslint.org) config scaffolder for extending another config[![Codecov][coverage-badge]][coverage-link]
[![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]
![SLSA Level 2][slsa-badge]## Table of Contents
* [Usage](#usage)
* [Installation](#installation)
* [Example](#example)
* [Import](#import)
* [Execute](#execute)
* [Scaffolder Plugin](#scaffolder-plugin)
* [High-Level Scaffolder](#high-level-scaffolder)
* [Contributing](#contributing)
* [Dependencies](#dependencies)
* [Verification](#verification)## Usage
[![MIT license][license-badge]][license-link]
[![npm][npm-badge]][npm-link]
[![Try @form8ion/eslint-config-extender on RunKit][runkit-badge]][runkit-link]
![node][node-badge]### Installation
```sh
$ npm install @form8ion/eslint-config-extender --save-prod
```### Example
#### Import
```javascript
const {packageManagers} = await import('@form8ion/javascript-core');
const githubPlugin = await import('@form8ion/github');
const {questionNames: projectQuestionNames} = await import('@form8ion/project');
const javascriptPlugin = await import('@form8ion/javascript');
const {scaffold, extendEslintConfig} = await import('./lib/index.mjs');
```#### Execute
##### Scaffolder Plugin
```javascript
(async () => {
await scaffold({
projectRoot: process.cwd(),
projectName: 'eslint-config-foo',
scope: 'bar'
});
})();
```##### High-Level Scaffolder
```javascript
(async () => {
await extendEslintConfig(
{
decisions: {
[projectQuestionNames.PROJECT_NAME]: 'eslint-config-foo',
[projectQuestionNames.DESCRIPTION]: 'a description of the project',
[projectQuestionNames.VISIBILITY]: 'Public',
[projectQuestionNames.LICENSE]: 'MIT',
[projectQuestionNames.COPYRIGHT_HOLDER]: 'John Smith',
[projectQuestionNames.COPYRIGHT_YEAR]: '2022',
[projectQuestionNames.GIT_REPO]: true,
[projectQuestionNames.REPO_HOST]: 'GitHub',
[projectQuestionNames.REPO_OWNER]: 'org-name',
[javascriptPlugin.questionNames.AUTHOR_NAME]: 'John Smith',
[javascriptPlugin.questionNames.AUTHOR_EMAIL]: '[email protected]',
[javascriptPlugin.questionNames.AUTHOR_URL]: 'https://smith.org',
[javascriptPlugin.questionNames.SCOPE]: 'org-name',
[javascriptPlugin.questionNames.PACKAGE_MANAGER]: packageManagers.NPM,
[javascriptPlugin.questionNames.NODE_VERSION_CATEGORY]: 'LTS',
[javascriptPlugin.questionNames.CI_SERVICE]: 'Other',
[javascriptPlugin.questionNames.PROVIDE_EXAMPLE]: false
},
plugins: {vcsHosts: {GitHub: githubPlugin}}
},
decisions => ({
...javascriptPlugin,
scaffold: options => javascriptPlugin.scaffold({
...options,
decisions,
configs: {},
plugins: {unitTestFrameworks: {}}
})
})
);
})();
```## Contributing
[![PRs Welcome][PRs-badge]][PRs-link]
[![Conventional Commits][commit-convention-badge]][commit-convention-link]
[![Commitizen friendly][commitizen-badge]][commitizen-link]
[![semantic-release][semantic-release-badge]][semantic-release-link]
[![Renovate][renovate-badge]][renovate-link]### Dependencies
```sh
$ nvm install
$ npm install
```### Verification
```sh
$ npm test
```[PRs-link]: http://makeapullrequest.com
[PRs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
[commit-convention-link]: https://conventionalcommits.org
[commit-convention-badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
[commitizen-link]: http://commitizen.github.io/cz-cli/
[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[semantic-release-link]: https://github.com/semantic-release/semantic-release
[semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release
[renovate-link]: https://renovatebot.com
[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
[coverage-link]: https://codecov.io/github/form8ion/eslint-config-extender
[coverage-badge]: https://img.shields.io/codecov/c/github/form8ion/eslint-config-extender?logo=codecov
[license-link]: LICENSE
[license-badge]: https://img.shields.io/github/license/form8ion/eslint-config-extender.svg?logo=opensourceinitiative
[npm-link]: https://www.npmjs.com/package/@form8ion/eslint-config-extender
[npm-badge]: https://img.shields.io/npm/v/@form8ion/eslint-config-extender?logo=npm
[runkit-link]: https://npm.runkit.com/@form8ion/eslint-config-extender
[runkit-badge]: https://badge.runkitcdn.com/@form8ion/eslint-config-extender.svg
[github-actions-ci-link]: https://github.com/form8ion/eslint-config-extender/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster
[github-actions-ci-badge]: https://img.shields.io/github/actions/workflow/status/form8ion/eslint-config-extender/node-ci.yml.svg?branch=master&logo=github
[node-badge]: https://img.shields.io/node/v/@form8ion/eslint-config-extender?logo=node.js
[slsa-badge]: https://slsa.dev/images/gh-badge-level2.svg