Skip to content

Commit

Permalink
Use @stylistic/eslint-plugin-js for max-len rule
Browse files Browse the repository at this point in the history
DEFRA/water-abstraction-team#115

In [Add linting using eslint with standard as the base](#948) we switched from using [standard](https://www.npmjs.com/package/standard) directly for linting to using [ESlint](https://eslint.org/).

This is all part of work we are doing to start codifying our conventions rather than writing them up for no one to read! 😁

As a start, we enabled the rule [max-len](https://eslint.org/docs/latest/rules/max-len) which **standard** doesn't have. That flagged some long text strings we have, and we don't want to break them up just for the sake of the linter.

So, we went to check what options there are for the rule and found this

> This rule was **deprecated** in ESLint v8.53.0. Please use the [corresponding rule](https://eslint.style/rules/js/max-len) in [@stylistic/eslint-plugin-js](https://eslint.style/packages/js).

But it looks like ESLint has moved on a bit since we last used it and has chosen to [move some of its core stylistic based rules to a plugin](https://eslint.style/packages/js).

This change switches to using the plugin to lint `max-len`. It also updates the config to exclude strings and template literals from the rule.
  • Loading branch information
Cruikshanks committed May 8, 2024
1 parent 32b6230 commit 59aff4c
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 59aff4c

Please sign in to comment.