New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New "enforcing" option: `oldie` #3094

Open
jugglinmike opened this Issue Jan 21, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@jugglinmike
Member

jugglinmike commented Jan 21, 2017

Currently, JSHint issues some warnings that relate to peculiarities of outdated
versions of the Internet Explorer browser:

  • W002: "Value of '{a}' may be overwritten in IE 8 and earlier." (issued in
    non-Node.js contexts)
  • W070: "Extra comma. (it breaks older versions of IE)" (issued in pre-ES5
    contexts)

The conditions that enable these options are inconsistent and only approximate
the user's intention to support old versions of that browser. Because they are
currently enabled by default, we could implement a "relaxing" option to disable
them. However, they are becoming increasingly irrelevant, so it may be more
convenient to disable them by default (which is a "SemVer patch" change) and
implement a new option such as oldie (which is a "SemVer minor change) to
allow consumers to enable them in a more explicit, intentional way.

It's tempting to use E059 ("Incompatible values for the '{a}' and '{b}'
linting options.") in order to restrict this new option's usage to browser: true contexts, but that may be going too far. Some consumers may wish to write
code that is portable between IE and (for instance) Node.js, so they would want
to enable this option without specifying browser: true.

Finally, we should take the opportunity to expand the warning messages to use
"Internet Explorer" rather than "IE".

@AKFU

This comment has been minimized.

AKFU commented Sep 23, 2017

angular
.module 'App', ['ngRoute', 'ngStorage', 'angular-cache']

.constant 'sourcesUrl', 'https://api.github.com/repos/links-js/db/contents/'

.filter 'tagReplace', -> (input) -> if input then input.replace(/tag:/gi, '#') else ''
.filter 'noReferrer', -> (input) -> 'https://href.li/?' + input
.filter 'filename', -> (input) -> input.split('/').slice(-1)[0]
.filter 'getFaviconUrl', -> (input) -> 'https://www.google.com/s2/favicons?domain_url=' + input
.filter 'getLastItem', -> (arr) -> arr.slice(-1)[0]
.filter 'hasYamlOrJson', -> (obj) -> isYamlOrJson(obj.name)
.filter 'getIconForOs', -> getIconForOs

.factory 'LinksLoader', ($http, $q, $rootScope, $filter) ->
getData = (response) ->
url = response.config.url
data = null
data = if isYaml(url) then data = jsyaml.load(response.data) else data = response.data
# Add _url to all response data object
data._url = url
data

getObjWithLinks = (obj) ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment