You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on some docs and also recently saw this issue: feathersjs/docs#1567. So my mind has been on "developer experience" the past few days. Thus the reason for this issue and feathersjs/docs#1570
Problem - As a Feathers contributor, I often have to meticulously format code differently depending on which repo I am working on. Some repos do have a similar ESLINT/semistandard setup, but not all. And those setups are not shared from a common place. And as a Feathers maintainer, I often have to make comments such as "Please replace all of the commas that your formatter removed", etc.
Solution - An ESLINT plugin that boxes up some common Node and prettier eslint plugins into one plugin, like eslint-plugin-feathers. This plugin could then be used throughout the Feathers codebase and any other feathers repos like those in feathers-ecosystem.
I am not sure how the community will feel about Prettier. When I first introduced it to a team, we went back and forth about whether it was a good idea because we would no longer be "stewards" of the code as much. But, after landing on using Prettier I wouldn't go back. It has become a crutch for me. It's definitely opinionated and I don't always agree with the opinions, but thats the beauty of it as well. I am also not sure how we would handle the prettier config. Prettier can be configured via package.json or .prettierrc on a per prject basis, but I don't want the developer to have control over that...So I am unsure how we could handle that if we wrapped it in our own plugin.
Note this ESLINT plugin is really meant for Feathers core and supporting Feathers libraries, not necessarily Feathers apps. It would likely be too opinionated for Feathers apps, but the developer could certainly use it if they would like. It should just include some basic Node stuff (v12+) and Prettier.
Furthermore, some other ways of enforcing Feathers conventions and code styles in supporting repos would be:
A Feathers library template. A template made to be forked for someone wanting to make their own feathers hooks, library, etc.
A Feathers .vscode ? Note sure how that would work, but I have a .vscode setup that I copy/paste into repos that enforces code formatting via the installed ESLINT config instead of any VScode or plugin formatters. Should there be other editor configs too? Not sure this is even a good idea.
Use husky or something similar for pre-commits linting? I don't love this idea because its another dependency that we don't control.
I am willing to put this together and open (merge where I can) PR's that include this new plugin and add a lint script. But, I wanted to get some feedback first.
The text was updated successfully, but these errors were encountered:
Alright, in #2647@marshallswain and I updated Linting to use @typescript/eslint-recommended and Prettier (no semicolons). That's what I'd recommend to use and will be setting up for all my other projects as well but every maintainer is of course still free to choose their formatting tools of choice.
I have been working on some docs and also recently saw this issue: feathersjs/docs#1567. So my mind has been on "developer experience" the past few days. Thus the reason for this issue and feathersjs/docs#1570
Problem - As a Feathers contributor, I often have to meticulously format code differently depending on which repo I am working on. Some repos do have a similar ESLINT/semistandard setup, but not all. And those setups are not shared from a common place. And as a Feathers maintainer, I often have to make comments such as "Please replace all of the commas that your formatter removed", etc.
Solution - An ESLINT plugin that boxes up some common Node and prettier eslint plugins into one plugin, like
eslint-plugin-feathers
. This plugin could then be used throughout the Feathers codebase and any other feathers repos like those infeathers-ecosystem
.I am not sure how the community will feel about Prettier. When I first introduced it to a team, we went back and forth about whether it was a good idea because we would no longer be "stewards" of the code as much. But, after landing on using Prettier I wouldn't go back. It has become a crutch for me. It's definitely opinionated and I don't always agree with the opinions, but thats the beauty of it as well. I am also not sure how we would handle the prettier config. Prettier can be configured via
package.json
or.prettierrc
on a per prject basis, but I don't want the developer to have control over that...So I am unsure how we could handle that if we wrapped it in our own plugin.Note this ESLINT plugin is really meant for Feathers core and supporting Feathers libraries, not necessarily Feathers apps. It would likely be too opinionated for Feathers apps, but the developer could certainly use it if they would like. It should just include some basic Node stuff (v12+) and Prettier.
Furthermore, some other ways of enforcing Feathers conventions and code styles in supporting repos would be:
.vscode
? Note sure how that would work, but I have a.vscode
setup that I copy/paste into repos that enforces code formatting via the installed ESLINT config instead of any VScode or plugin formatters. Should there be other editor configs too? Not sure this is even a good idea.husky
or something similar for pre-commits linting? I don't love this idea because its another dependency that we don't control.I am willing to put this together and open (merge where I can) PR's that include this new plugin and add a lint script. But, I wanted to get some feedback first.
The text was updated successfully, but these errors were encountered: