question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule proposal: `prefer-https`

See original GitHub issue

Enforce using HTTPS URLs over HTTP.

Fail

const foo = 'http://sindresorhus.com';

// Hello: http://sindresorhus.com

Pass

const foo = 'https://sindresorhus.com';

// Hello: https://sindresorhus.com

Alternative name: prefer-https. Which one do people prefer?

I’m aware this could be partly solved with the string-content rule, but I don’t think most people would think of this and it also wouldn’t work in comments.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
sindresorhuscommented, Jan 27, 2021

Should http://localhost for example be ignored?

Yes, any URL without a TLD should be ignored.

2reactions
JounQincommented, Jan 27, 2021

Should http://localhost for example be ignored?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proposed rule: Private Fund Advisers
We propose to require registered investment advisers to private funds to provide transparency to their investors regarding the full cost of ...
Read more >
A Guide to the Rulemaking Process
Most agencies now prefer to receive comments electronically so that your input on a proposed rule or other document is more easily available...
Read more >
Rulemaking Process | Federal Communications Commission
Most FCC rules are adopted by a process known as "notice and comment" rulemaking. ... The Commission considers the comments received in developing...
Read more >
Rulemaking Process | US Department of Transportation
They have the force and effect of law; that is, they are legally binding on the ... for public comment on the proposal...
Read more >
52020PC0613 - EN - EUR-Lex - European Union
Proposal for a REGULATION OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL addressing ... addressing situations of crisis and force majeure in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found