Skip to content

Commit

Permalink
Continuous Release v2.0.1
Browse files Browse the repository at this point in the history
Merge pull request #12 from Splines/dev
  • Loading branch information
Splines authored Feb 20, 2024
2 parents 73ab6a4 + f4f72fd commit baa2035
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 15 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
//////////////////////////////////////
// JS (ESLint)
//////////////////////////////////////
"eslint.format.enable": true,
"eslint.experimental.useFlatConfig": true,
"[javascript]": {
Expand All @@ -10,4 +13,10 @@
},
// this disables VSCode built-int formatter (instead we want to use ESLint)
"javascript.validate.enable": false,
//////////////////////////////////////
// Git
//////////////////////////////////////
"git.inputValidation": "warn",
"git.inputValidationSubjectLength": 50,
"git.inputValidationLength": 72
}
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ A zero-dependency plugin for [ESLint](https://eslint.org/).
![showcase-erb-lint-gif](https://github.com/Splines/eslint-plugin-erb/assets/37160523/623d6007-b4f5-41ce-be76-5bc0208ed636?raw=true)


> [!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.
> **Warning**
> v2.0.0 is breaking. We use the new ESLint flat config format. Use `erb:recommended-legacy` if you want to keep using the old `.eslintrc.js` format.
## Usage

Expand All @@ -34,6 +34,15 @@ export default [
// in your settings.json
erb.configs.recommended,
{
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",
},
// your other configuration options
}
];
Expand Down Expand Up @@ -96,6 +105,15 @@ export default [
...globals.node,
},
},
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",
},
},
];
```
Expand Down Expand Up @@ -123,6 +141,15 @@ export default [
processor: erb.processors.erbProcessor,
},
{
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",
},
// your other configuration options
}
];
Expand Down Expand Up @@ -187,7 +214,7 @@ If you're using VSCode, you may find this `settings.json` options useful:
"editor.defaultFormatter": "dbaeumer.vscode-eslint" // use ESLint plugin
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true // Auto-fix ESLint errors on save
"source.fixAll.eslint": "explicit" // Auto-fix ESLint errors on save
},
// this disables VSCode built-int formatter (instead we want to use ESLint)
"javascript.validate.enable": false,
Expand Down
5 changes: 0 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @fileoverview Exports the processor.
* @author Splines
*/

"use strict";

module.exports = require("./lib");
7 changes: 1 addition & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @fileoverview Process ERB files for consumption by ESLint.
* @author Splines
*/

// Load processor
const preprocess = require("./preprocess.js");
const postprocess = require("./postprocess.js");
Expand All @@ -16,7 +11,7 @@ const processor = {
const plugin = {
meta: {
name: "eslint-plugin-erb",
version: "2.0.0",
version: "2.0.1",
},
configs: {
"recommended": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-erb",
"version": "2.0.0",
"version": "2.0.1",
"description": "An ESLint plugin to lint JavaScript in ERB files (.js.erb)",
"license": "MIT",
"author": {
Expand Down

0 comments on commit baa2035

Please sign in to comment.