https://github.com/simplesenseio/eslint-config-simplesense
ESLint Config for SimpleSense
https://github.com/simplesenseio/eslint-config-simplesense
npm tool
Last synced: 15 days ago
JSON representation
ESLint Config for SimpleSense
- Host: GitHub
- URL: https://github.com/simplesenseio/eslint-config-simplesense
- Owner: simplesenseio
- License: apache-2.0
- Created: 2021-05-26T19:05:43.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2026-05-13T02:09:39.000Z (about 1 month ago)
- Last Synced: 2026-05-13T04:37:43.061Z (about 1 month ago)
- Topics: npm, tool
- Language: JavaScript
- Homepage:
- Size: 91 MB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Simplesense ESLint Config
[](https://simplesenseio.github.io/eslint-config-simplesense/)
[](https://github.com/simplesenseio/eslint-config-simplesense/actions/workflows/build.yaml)
## Generating Documentation
All rules must be documented so they can be searched in [GitHub Pages](https://simplesenseio.github.io/eslint-config-simplesense/).
Documentation is auto-generated using the [`generate-docs`](./scripts/generate-docs.js) script.
Most ESLint plugins provide individual rules' documentation with the file structure of `docs/.md` in their source.
Some plugins will ship the `docs` directory within their package, others exclude them by not providing the `docs` directory within their package configuration.
- When docs are shipped with the NPM module, use the `writeFromModules` method.
- When docs exist, but are not available within `node_modules`, use the `writeFromGitHub` method.
- When no docs are provided, create individual markdown files, following [`docs/static//.md`](./docs/static/), and use the `writeFromStatic` method.
## Adding Plugins / Configurations
Adding plugins is fairly straightforward.
**Step 1**
- To simply use a recommended configuration, add the plugin as a dependency and add config to the [config](./config/) directory that imports the recommended rules and the plugin itself. Then add the config to the exported array in [`index.js`](./index.js).
- To configure custom rules for a plugin, add a new file, [`rules/.js`](./rules/), and export the rules object. Then add the config by following the details in the previous step, however, use the custom rules by themselves or with the exported recommended rules of the plugin.
- If the new plugin lints a new file type, add a `index.` file to the [`filetypes`](./filetypes/) directory and update the `lint:eslint` script in [`package.json`](./package.json) to include the new extension.
**Step 2**
Add your new plugin to the [`docs-config`](./helpers/docs-config.js) helper, specifiying the necessary properties required to generate the documentation.
**Step 3**
Verify everything builds as expected.
```bash
npm install
npm run lint
npm run test
npm run docs:dev
# navigate to the URL provided by Vitepress
```