Skip to content

Commit fd46e35

Browse files
authored
Continuous Release 2.1.1 🙌 (#18)
* Pimp up Readme * Update license year * Add small contribution guide & update dev guide * Bump version to 2.1.1 * Improve wording in contributing guide * Update release creation guide
1 parent d4ed323 commit fd46e35

File tree

6 files changed

+21
-17
lines changed

6 files changed

+21
-17
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contributing
2+
3+
This is a small project, born out of frustration that the mature Ruby on Rails ecosystem does not provide a linter for `.js.erb` and `.html.erb` files.
4+
5+
I'm happy to accept your contributions! Please open an issue beforehand. This way, you get the chance to get feedback on your idea or a bug before you start working on the respective implementation/fix and therefore avoid wasting time on a PR that might not be merged.
6+
7+
As usual, common sense applies, so be respectful and constructive in your communication. PR comments will usually be short and concise. Please don't take them personally, it's a chance to learn and improve (both sides of course).

DEV.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Some developer guidelines
1+
# Developer guidelines
22

33
## Install as npm package locally to test
44

@@ -22,9 +22,10 @@ npm unlink eslint-plugin-erb
2222

2323
## Merge strategies
2424

25-
- Feature branches to `dev`: squash commit
26-
- Continuous Release from `dev` to `main`: standard merge commit
27-
- Hotfixes: branch off `main`, merge PR into `main` via squash commit, then merge back `main` to `dev` via standard merge commit.
25+
We develop directly on `main`. Whenever a release is ready, we create a new release tag and publish to npm.
26+
27+
- Main branch: protected, only PRs allowed (tests must pass). Use squash commits (!)
28+
- Finally: continuous release by creating a `release/*` branch and merging it into `main` via a PR.
2829

2930
## Create a new release (and publish to npm)
3031

@@ -38,7 +39,7 @@ npm run bump-version -- [<newversion> | major | minor | patch]
3839
```
3940

4041
- ⚠ Copy the version specifier from `package.json` into the `index.js` meta information object.
41-
- Once the `dev` branch is ready, open a PR (Pull request) called "Continuous Release <version.number>" and give it the "release" label. Merge this PR into `main`.
42+
- Call the respective PR for the final changes "Continuous Release <version.number>". Merge this PR into `main`.
4243
- Create a new release via the GitHub UI and assign a new tag alongside that.
4344
- Fetch the tag locally (`git fetch`) and publish to npm via `npm run publish-final`. You probably have to login to npm first (`npm login`).
44-
- Enjoy ✌ Check that the release is available [here on npm](https://www.npmjs.com/package/eslint-plugin-erb).
45+
- Check that the release is available [here on npm](https://www.npmjs.com/package/eslint-plugin-erb). Enjoy ✌

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Splines
3+
Copyright (c) 2023-2025 Splines
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ A zero-dependency plugin for [ESLint](https://eslint.org/).
66

77
![showcase-erb-lint-gif](https://github.com/Splines/eslint-plugin-erb/assets/37160523/623d6007-b4f5-41ce-be76-5bc0208ed636?raw=true)
88

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.
11-
129
## Usage
1310

1411
### Install
@@ -150,7 +147,7 @@ export default [
150147
<details>
151148
<summary>Legacy: you can still use the old `.eslintrc.js` format</summary>
152149

153-
You can extend the `plugin:erb/recommended-legacy` config that will enable the ERB processor on all `.js.erb` files. **Note that instead of "plugin:erb/recommended", you now have to use "plugin:erb/recommended-legacy"**.
150+
You can extend the `plugin:erb/recommended-legacy` config that will enable the ERB processor on all `.js.erb` files.
154151

155152
```js
156153
// .eslintrc.js
@@ -176,6 +173,8 @@ module.exports = {
176173

177174
</details>
178175

176+
<br>
177+
179178
If you also want to lint **HTML code** in `.html.erb` files, you can use our preprocessor in conjunction with the amazing [`html-eslint`](https://html-eslint.org/) plugin. Install `html-eslint`, then add the following to your ESLint config file (flat config format):
180179

181180
```js
@@ -230,9 +229,6 @@ If you're using VSCode, you may find this `settings.json` options useful:
230229
//////////////////////////////////////
231230
// Files
232231
//////////////////////////////////////
233-
"files.exclude": {
234-
"node_modules/": false,
235-
},
236232
"files.associations": {
237233
"*.js.erb": "javascript"
238234
},
@@ -258,4 +254,4 @@ console.log("You are lucky 🍀");
258254
<% end %>
259255
```
260256

261-
- No support for ESLint suggestions (but full support for Autofixes as shown in the GIF above)
257+
- No support for ESLint _suggestions_ (but full support for _autofixes_ as shown in the GIF above)

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const processorHtml = {
2323
const plugin = {
2424
meta: {
2525
name: "eslint-plugin-erb",
26-
version: "2.1.0",
26+
version: "2.1.1",
2727
},
2828
configs: {
2929
"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.1.0",
3+
"version": "2.1.1",
44
"description": "An ESLint plugin to lint JavaScript in ERB files (.js.erb)",
55
"license": "MIT",
66
"author": {

0 commit comments

Comments
 (0)