eslint-config-simplesense v6.0.11
Simplesense ESLint Config
Generating Documentation
All rules must be documented so they can be searched in GitHub Pages.
Documentation is auto-generated using the generate-docs script.
Most ESLint plugins provide individual rules' documentation with the file structure of docs/<rule-name>.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
writeFromModulesmethod. - When docs exist, but are not available within
node_modules, use thewriteFromGitHubmethod. - When no docs are provided, create individual markdown files, following
docs/static/<plugin-name>/<rule-name>.md, and use thewriteFromStaticmethod.
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 directory that imports the recommended rules and the plugin itself. Then add the config to the exported array in
index.js. - To configure custom rules for a plugin, add a new file,
rules/<plugin-name>.js, 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.<filetype>file to thefiletypesdirectory and update thelint:eslintscript inpackage.jsonto include the new extension.
Step 2
Add your new plugin to the docs-config helper, specifiying the necessary properties required to generate the documentation.
Step 3
Verify everything builds as expected.
npm install
npm run lint
npm run test
npm run docs:dev
# navigate to the URL provided by Vitepress10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago