Skip to content

Releases: Splines/eslint-plugin-erb

Don't report unused disable directive

20 Feb 11:20
baa2035
Compare
Choose a tag to compare

What's Changed

This release doesn't change any code but adds a suggested linter options for users of this plugin, namely:

linterOptions: {
      // The "unused disable directive" is set to "warn" by default.
      // For the ERB plugin to work correctly, you must disable
      // this directive to avoid issues described here
      // https://github.com/eslint/eslint/discussions/18114
      // If you're using the CLI, you might also use the following flag:
      // --report-unused-disable-directives-severity=off
      reportUnusedDisableDirectives: "off",
},

also see the updated README here. The related discussion for this can be found here.

Full Changelog: v2.0.0...v2.0.1

Support ESLint Flat config

04 Jan 18:26
73ab6a4
Compare
Choose a tag to compare

Warning

v2.0.0 is breaking. We now use the new ESLint flat config format. Use erb:recommended-legacy if you want to keep using the old .eslintrc.js format. See the Readme for how to migrate.

Starting of v9 ESLint provides a new flat config format (eslint.config.js). Also see the configuration migration guide. With this release, we hop on the train to provide you the brand-new syntax 🙌

Changes

  • Make plugin ready for ESLint Flat config #9
  • Update own config to new flat ESLint #11

Full Changelog: v1.1.2...v2.0.0

Fix broken Readme image (again)

03 Jan 12:21
42ee7ac
Compare
Choose a tag to compare

Try to fix broken on image on npm again...

Unfortunately, I haven't found any documentation for this and the behavior on npm is kind of indeterministic as to what GitHub URLs it accepts to properly show the image...

Fix broken Readme image

03 Jan 11:26
11229a1
Compare
Choose a tag to compare

Happy new year everybody 💫

Changes

  • Fix broken image in Readme #7

Full Changelog: v1.1.0...v1.1.1

Fix ERB Regex & add tests ✔

01 Dec 23:53
e3c3a99
Compare
Choose a tag to compare

Changes

  • Previously, the rule @stylistic/quotes did not work for ERB tags inside JS strings. This is now fixed.
  • The repo now contains many tests which should (hopefully) catch regressions in the future. Feel free to open an issue if you experience problems with the processor plugin when linting on .js.erb files.
  • The README was updated to contain some recommended settings for usage with VSCode (settings.json). You will also find a basic .eslintrc.js config file using some @stylistic rules, see their webiste. You may use this file as a starting point for your own ESLint configuration.

Wish you a great weekend ;)

Full Changelog: v1.0.2-0...v1.1.0

Fix wrong quotes replacement

19 Nov 22:30
1e589c5
Compare
Choose a tag to compare

The @stylistic/quotes rule provides an auto fix, e.g. to replace single quotes ' by double quotes ". In the plugin, the autofix produced incorrect replacements as seen in #1. This is now fixed.

fix-stylistic-quotes

First working version 🎉

19 Nov 01:02
665e5a4
Compare
Choose a tag to compare

Hey, do you also feel disappointed that you can't get your .js.erb files linted? Be no more.

Introducing eslint-plugin-erb, an ESLint plugin that lets you lint the JavaScript code inside your .js.erb files.

It even supports ESLint autofixes. Have fun with it. If you encounter any problems, feel free to open an issue with a reproducible example.

showcase-erb-lint-small