Skip to content

Commit baa2035

Browse files
authored
Continuous Release v2.0.1
Merge pull request #12 from Splines/dev
2 parents 73ab6a4 + f4f72fd commit baa2035

File tree

5 files changed

+41
-15
lines changed

5 files changed

+41
-15
lines changed

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
//////////////////////////////////////
3+
// JS (ESLint)
4+
//////////////////////////////////////
25
"eslint.format.enable": true,
36
"eslint.experimental.useFlatConfig": true,
47
"[javascript]": {
@@ -10,4 +13,10 @@
1013
},
1114
// this disables VSCode built-int formatter (instead we want to use ESLint)
1215
"javascript.validate.enable": false,
16+
//////////////////////////////////////
17+
// Git
18+
//////////////////////////////////////
19+
"git.inputValidation": "warn",
20+
"git.inputValidationSubjectLength": 50,
21+
"git.inputValidationLength": 72
1322
}

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ A zero-dependency plugin for [ESLint](https://eslint.org/).
66
![showcase-erb-lint-gif](https://github.com/Splines/eslint-plugin-erb/assets/37160523/623d6007-b4f5-41ce-be76-5bc0208ed636?raw=true)
77

88

9-
> [!WARNING]
10-
> 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.
9+
> **Warning**
10+
> 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.
1111
1212
## Usage
1313

@@ -34,6 +34,15 @@ export default [
3434
// in your settings.json
3535
erb.configs.recommended,
3636
{
37+
linterOptions: {
38+
// The "unused disable directive" is set to "warn" by default.
39+
// For the ERB plugin to work correctly, you must disable
40+
// this directive to avoid issues described here
41+
// https://github.com/eslint/eslint/discussions/18114
42+
// If you're using the CLI, you might also use the following flag:
43+
// --report-unused-disable-directives-severity=off
44+
reportUnusedDisableDirectives: "off",
45+
},
3746
// your other configuration options
3847
}
3948
];
@@ -96,6 +105,15 @@ export default [
96105
...globals.node,
97106
},
98107
},
108+
linterOptions: {
109+
// The "unused disable directive" is set to "warn" by default.
110+
// For the ERB plugin to work correctly, you must disable
111+
// this directive to avoid issues described here
112+
// https://github.com/eslint/eslint/discussions/18114
113+
// If you're using the CLI, you might also use the following flag:
114+
// --report-unused-disable-directives-severity=off
115+
reportUnusedDisableDirectives: "off",
116+
},
99117
},
100118
];
101119
```
@@ -123,6 +141,15 @@ export default [
123141
processor: erb.processors.erbProcessor,
124142
},
125143
{
144+
linterOptions: {
145+
// The "unused disable directive" is set to "warn" by default.
146+
// For the ERB plugin to work correctly, you must disable
147+
// this directive to avoid issues described here
148+
// https://github.com/eslint/eslint/discussions/18114
149+
// If you're using the CLI, you might also use the following flag:
150+
// --report-unused-disable-directives-severity=off
151+
reportUnusedDisableDirectives: "off",
152+
},
126153
// your other configuration options
127154
}
128155
];
@@ -187,7 +214,7 @@ If you're using VSCode, you may find this `settings.json` options useful:
187214
"editor.defaultFormatter": "dbaeumer.vscode-eslint" // use ESLint plugin
188215
},
189216
"editor.codeActionsOnSave": {
190-
"source.fixAll.eslint": true // Auto-fix ESLint errors on save
217+
"source.fixAll.eslint": "explicit" // Auto-fix ESLint errors on save
191218
},
192219
// this disables VSCode built-int formatter (instead we want to use ESLint)
193220
"javascript.validate.enable": false,

index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @fileoverview Exports the processor.
3-
* @author Splines
4-
*/
5-
61
"use strict";
72

83
module.exports = require("./lib");

lib/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @fileoverview Process ERB files for consumption by ESLint.
3-
* @author Splines
4-
*/
5-
61
// Load processor
72
const preprocess = require("./preprocess.js");
83
const postprocess = require("./postprocess.js");
@@ -16,7 +11,7 @@ const processor = {
1611
const plugin = {
1712
meta: {
1813
name: "eslint-plugin-erb",
19-
version: "2.0.0",
14+
version: "2.0.1",
2015
},
2116
configs: {
2217
"recommended": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-erb",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "An ESLint plugin to lint JavaScript in ERB files (.js.erb)",
55
"license": "MIT",
66
"author": {

0 commit comments

Comments
 (0)