open-index/open-npm huggingface dataset:
npm package: @mapbox/eslint-config-docs
Description: eslint configuration for docs.mapbox.com
Author: Mapbox
Latest version: 3.4.0

# eslint-config-docs

Eslint configuration for docs.mapbox.com sites. This configuration helps us catch incompatible features, enforce React proptypes, and more.

## Install

Add the package to your project:

```
npm install @mapbox/eslint-config-docs --save-dev
```

Add this config name to `extends` in your eslint config. For docs sites, add it to `conf/eslint-config-browser.json`. Example:

```
"extends": ["./eslint-config-base.json", "@mapbox/eslint-config-docs"]
```

## How to release

From the main branch:

1. If you haven't already, update CHANGELOG.md to describe the changes, commit, and push.
2. Run `npm version {major|minor|patch}`. Example (and usually): `npm version minor`.
3. Push changes.
4. Run `mbx npm publish` to publish the package to npm.

Dependabot will automatically update `@mapbox/eslint-config-docs` (within 1 day) to all site repositories. If you need it sooner, you can install this package in the repository by following the [install steps](#install).

This package uses npm 7, which means it will automatically install the `peerDependnecies` found in `package.json`. If your site requires a different version of a peer dependency, you can install the dependency in your repository using the `--force ` flag. Example: `npm i eslint-plugin-jsx-a11y@5 --force`.
npm package: @mapbox/eslint-plugin-script-tags
Description: Lint the content of <script> tags in arbitrary text
Author: Mapbox
Latest version: 1.0.0

# @mapbox/eslint-plugin-script-tags

[![Build Status](https://travis-ci.com/mapbox/eslint-plugin-script-tags.svg?branch=main)](https://travis-ci.com/mapbox/eslint-plugin-script-tags)

An ESLint plugin that allows you to lint the content of `<script>` tags in arbitrary text.

Unlike [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html), which *parses* HTML to find `<script>`s, this plugin uses a regular expression.

The advantage of using a regular expression, and the reason this plugin exists, is that by avoiding a parser you can find and lint `<script>`s in arbitrary text — text that might not parse nicely as HTML, such as Markdown files with HTML fenced code blocks that contain `<script>`s. Like this (imagine the `'''`s are backticks):

```
Here is some *markdown*.

'''html
<div>
<script>
  // Here is JS you'd like to lint!
  var a = "foo";
</script>
'''
```

(If you want to lint JS fenced code blocks, use [eslint-plugin-markdown](https://github.com/eslint/eslint-plugin-markdown)).

The disadvantage of using a regular expression, of course, is that it's not as robust as a real parser. If your `<script>` is within a comment, for example, it will still be linted: the regular expression doesn't know about the comment. You might like that, or you might not.

## Usage

Use this module like any other [ESLint plugin](http://eslint.org/docs/user-guide/configuring#configuring-plugins).

Unfortunately, we do need to provide a finite list of file extensions to check. Here's the current list:

- `.html`
- `.htm`
- `.md`
- `.jsp`
- `.tag`
- `.hbs`
- `.ejs`
- `.php`
- `.vue`
- `.erb`
- `.liquid`

There's no reason not to add more: so if you'd like another, please PR!

## Caveats

### Indentation

Expected indentation (if you use the `indent` rule) is determined by the first line of code. This can get hairy if you do something sloppy like:

```html
<script>var a = 'foo';
  var b = 'bar';
</script>
```

So I wouldn't do that.

### Arbitrary tags

Ideally this module could allow you to arbitrarily modify the expected tags regular expression, from `<script>...</script>` to something like `{% highlight js %}...{% endhighlight %}` or `[javascript-block]...[end javascript-block]`, etc. However, to do so would require adding *options*, and it doesn't seem that ESLint's built options into the processor API. If you would like this feature and want to work on adding options, your help would be welcome.