Comments (7)
We're using Standard JS !
from discussions.
I think it's a very good idea to move to standardjs, pretty much for the same two reasons that @dougwilson mentioned. I've started using them in all my projects since it helps to enforce a consistent coding style which absolutely helps when reading the code.
It also catches some programmer errors, such as accidentally leaking global variables, which is very good with many people contributing patches.
As already said, it's extremely easy to install and maintain, since there is no configuration and all upgrades are tested on the entire eco system.
Having standard as part of npm test
helps eliminates unnecessary discussions about following the existing coding style on pull requests.
I'm all for implementing it, and would be happy to submit pull requests to do it 🙌
from discussions.
+1 for standardjs.
from discussions.
Sounds great. I've been using it for a year or so now, including on path-to-regexp
(since I was deviating from the jshttp
style accidentally at that point).
I'll need to update it to use the ESLint style configuration from our call today.
from discussions.
So here is an example of a commit I've made that sound help: expressjs/morgan@1533cdc
Of note are the following changes:
- Added a
.eslintignore
file, mainly to keep eslint from linting any generatedcoverage/
directory. - Added a
.eslintrc
file, just specifying the standard style. - Added
npm run lint
to the CI commands to run, specifically after the actual tests, such that it is easy to tell if a PR, even though it fails linting, passes the actual tests. - Added devDependencies and a simple
eslint
command topackage.json
. - Added a
test/.eslintrc
file for the mocha tests. Technically this can be a comment in the file, but¯\_(ツ)_/¯
from discussions.
why not just run "lint": "eslint lib test"
and forget about the .eslintignore file?
or eslint index.js test
in this case
from discussions.
I tired that, but it mostly came down to editors. I had an editor that would let you run a report on your project and fix with eslint automatically, but as soon as I did the test coverage, it of course tried to do all this on those JS files from Istanbul output :(
from discussions.
Related Issues (20)
- Module Format HOT 15
- Types? HOT 3
- How can I update the session with data from the database HOT 1
- Pilot LFX Insights On The Express Project HOT 15
- 2024-03-04 Express TC Meeting
- 2024-03-04 Express TC Meeting HOT 12
- 2024-03-04 Express TC Meeting
- How does the Express LTS strategy apply to modules not shipped directly with `express`? HOT 9
- EFI: Express documentation (expressjs.com website)
- Wayward Packages not under Express umbrella orgs HOT 5
- Workflow to auto close and lock PRs that match the `Update Readme.md` pattern HOT 2
- 2024-03-13 Express TC Meeting HOT 11
- 2024-03-18 Express TC Meeting HOT 7
- 2024-03-20 Express TC Meeting HOT 2
- 2024-03-20 Express TC Meeting HOT 1
- 2024-04-01 Express TC Meeting HOT 5
- Why are s: and hmac necessary in the express session cookie? HOT 2
- 2024-03-27 Express TC Meeting
- 2024-03-27 Express Working Session HOT 2
- 2024-03-27 Express TC Meeting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discussions.