ESLint

ESLint

DevOps / Build, Test, Deploy / Code Review
Needs advice
on
ESLintESLintPrettierPrettier
and
SonarQubeSonarQube

We have Ember.js applications also React applications, currently, we are using ESLint + Prettier, What values does the SonarQube provide in addition to this?

READ MORE
4 upvotes·40.7K views
Replies (3)
Software Consultant at CODIUM·
Recommends
on
SonarQube
at
()

ESLint and Prettier should provide you a clean, beautiful, less-bug code but there are some (as I can think of) that SonarQube could help improving your code more, which are:

  • "Security Hotspot" such as detecting plain credentials in source code, regex validation, and etc, which both can't detect for.
  • finding "Code Smell" (code which might lead into a bug) in your source code
  • finding vulnerability, for example, bad configuration and weak cipher.
  • finding a block of code which might cost you a bad performance, for example, nested loops.
  • a lot more.

Sometimes SonarQube checks might be annoying, but after you adjusted it to fit with your coding style, it should be very useful!

READ MORE
7 upvotes·391 views
Senior Fullstack Developer at QUANTUSflow Software GmbH·

On top of linting and prettifying, sonar cube gives you hints about vulnerabilities and code smells. So it has its value in checking semantics for you as well. The degree of this is easily configurable. It also can give you hints on how much effort fixes might take. The best advice is to try it on your code base and evaluate if the generated reports provide additional value to your team.

READ MORE
6 upvotes·617 views
View all (3)
Needs advice
on
ESLintESLint
and
JSHintJSHint

Hi

Wondering what's the best tool for JS coding standards - currently, we use ESLint - Are there any upgrades about?. pros and cons, please.

READ MORE
3 upvotes·17.2K views
Replies (2)
Recommends
on
ESLint

ESLint seems to be the industry standard now. There's a better ecosystem around it e.g. plugins, IDE etc.

READ MORE
5 upvotes·154 views
Recommends
on
ESLint

Do you have a reason to switch? For coding patterns remotely resembling major JS styles, ESLint is quite flexible. For me, it's mostly a matter of picking the right base config and adjusting the rules to suit the team. We've gone a long way with modified AirBNB + TS rules.

READ MORE
3 upvotes·1 comment·140 views
Marc Vilella
Marc Vilella
·
October 7th 2021 at 7:10AM

+1 for AirBnB preset

·
Reply
CEO at Scrayos UG (haftungsbeschränkt)·

For our internal team and collaboration panel we use Nuxt.js (with TypeScript that is transpiled into ES6), Webpack and npm. We enjoy the opinionated nature of Nuxt.js over vanilla Vue.js, as we would end up using all of the components Nuxt.js incorporates anyways and we can adhere to the conventions setup by the Nuxt.js project, which allows us to get better support in case we run into any dead ends. Webpack allows us to create reproducable builds and also debug our application with hot reloads, which greately increased the pace at which we are able to perform and test changes. We also incorporated a lot of testing (ESLint, Chai, Jasmine, Nightwatchjs) into our pipelines and can trigger those jobs through GitLab CI. All packages are fetched through npm, so that we can keep our git repositories slim and are notified of new updates aswell as reported security flaws.

READ MORE
7 upvotes·606.5K views
Senior Fullstack Developer at QUANTUSflow Software GmbH·

Our whole DevOps stack consists of the following tools:

  • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
  • Respectively Git as revision control system
  • SourceTree as Git GUI
  • Visual Studio Code as IDE
  • CircleCI for continuous integration (automatize development process)
  • Prettier / TSLint / ESLint as code linter
  • SonarQube as quality gate
  • Docker as container management (incl. Docker Compose for multi-container application management)
  • VirtualBox for operating system simulation tests
  • Kubernetes as cluster management for docker containers
  • Heroku for deploying in test environments
  • nginx as web server (preferably used as facade server in production environment)
  • SSLMate (using OpenSSL) for certificate management
  • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
  • PostgreSQL as preferred database system
  • Redis as preferred in-memory database/store (great for caching)

The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

  • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
  • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
  • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
  • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
  • Scalability: All-in-one framework for distributed systems.
  • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
READ MORE
30 upvotes·2 comments·9M views
Larry Gryziak
Larry Gryziak
·
April 30th 2020 at 6:34PM

So why is your deployment different for your (Heroku) test/dev and your stage/production?

·
Reply
Simon Reymann
Simon Reymann
·
May 1st 2020 at 10:32AM

When it comes to testing our web app we do not demand great computational resources and need a very simple, convenient and fast PaaS solution for deploying the app to our testers. In production though, the demand of great computational resources can rise very fast. With Amazon we are able to control that in better way.

·
Reply
Senior Fullstack Developer at QUANTUSflow Software GmbH·

Our whole Vue.js frontend stack (incl. SSR) consists of the following tools:

  • Nuxt.js consisting of Vue CLI, Vue Router, vuex, Webpack and Sass (Bundler for HTML5, CSS 3), Babel (Transpiler for JavaScript),
  • Vue Styleguidist as our style guide and pool of developed Vue.js components
  • Vuetify as Material Component Framework (for fast app development)
  • TypeScript as programming language
  • Apollo / GraphQL (incl. GraphiQL) for data access layer (https://apollo.vuejs.org/)
  • ESLint, TSLint and Prettier for coding style and code analyzes
  • Jest as testing framework
  • Google Fonts and Font Awesome for typography and icon toolkit
  • NativeScript-Vue for mobile development

The main reason we have chosen Vue.js over React and AngularJS is related to the following artifacts:

  • Empowered HTML. Vue.js has many similar approaches with Angular. This helps to optimize HTML blocks handling with the use of different components.
  • Detailed documentation. Vue.js has very good documentation which can fasten learning curve for developers.
  • Adaptability. It provides a rapid switching period from other frameworks. It has similarities with Angular and React in terms of design and architecture.
  • Awesome integration. Vue.js can be used for both building single-page applications and more difficult web interfaces of apps. Smaller interactive parts can be easily integrated into the existing infrastructure with no negative effect on the entire system.
  • Large scaling. Vue.js can help to develop pretty large reusable templates.
  • Tiny size. Vue.js weights around 20KB keeping its speed and flexibility. It allows reaching much better performance in comparison to other frameworks.
READ MORE
23 upvotes·1 comment·4.7M views
rishabh2712
rishabh2712
·
April 25th 2020 at 6:24AM

Thanks a lot for sharing.

·
Reply
Needs advice
on
ESLintESLintSass Lint Sass Lint
and
StylelintStylelint

Scenario: I want to integrate Prettier in our code base which is currently using ESLint (for .js and .scss both). The project is using gulp.

It doesn't feel quite right to me to use ESLint, I wonder if it would be better to use Stylelint or Sass Lint instead.

I completed integrating ESLint + Prettier, Planning to do the same with [ Stylelint || Sasslint || EsLint] + Prettier.

And have gulp 'fix' on file save (Watcher).

Any recommendation is appreciated.

READ MORE
7 upvotes·435.2K views
Replies (3)
Senior Frontend Developer at Landbot.io·
Recommends
on
ESLint

In the case of .js files I would recommend using both Eslint and Prettier.

You can set up Prettier as an Eslint rule using the following plugin:

https://github.com/prettier/eslint-plugin-prettier

And in order to avoid conflicts between Prettier and Eslint, you can use this config:

https://github.com/prettier/eslint-config-prettier

Which turns off all Eslint rules that are unnecessary or might conflict with Prettier.

READ MORE
6 upvotes·1 comment·153.8K views
Alex Spieslechner
Alex Spieslechner
·
August 7th 2020 at 7:05PM

prettier officially discourages the use of eslint-plugin-prettier.

https://prettier.io/docs/en/integrating-with-linters.html

·
Reply
Software Engineer at SpeedUrWeb·
Recommends
on
Stylelint

Pura vida! Well, I had a similar issue and at the end I decided to use Stylelint + Prettier for that job, in our case, we wanted that our linting process includes the SCSS files and not only the JS file, base on that we concluded that using only ESLint to do both things wasn't the best option, so, we integrated prettier with Stylelint, and for that we used a neat plugin that allowed us to use Prettier inside Stylelint here is the link, https://github.com/prettier/stylelint-prettier#recommended-configuration, I hope that this can help you, hasta pronto!, :)

READ MORE
5 upvotes·1 comment·153.5K views
Carlos Benavides
Carlos Benavides
·
May 15th 2020 at 8:28PM

Thanks for commenting @Alexis,

Honestly, I did forget what I did at the end, so I just went back to see what was my decision...

and... yes Stylelint was the one.

·
Reply
View all (3)
CEO at Scrayos UG (haftungsbeschränkt)·

We use ESLint because we like to remove the general thinking-overhead when writing software. ESLint offers many presets, while also providing users with a lot of customization features. We use ESLint in conjunction with the javascript "standard" configuration (and for our vueJS-projects the "recommended" settings).

The other option we considered was JSHint, but we scrapped that, as forward-compatibility is essential for us and ESLint is more fast-paced in its development and supports ESnext natively.

READ MORE
1 upvote·88.5K views