@hint/hint-manifest-exists
hint that that checks if a web app manifest file was specified and it exists
Last updated 2 years ago by vidorteg .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @hint/hint-manifest-exists 
SYNC missed versions from official npm registry.

Has web app manifest (manifest-exists)

manifest-exists warns when a web app manifest file is not provided.

Why is this important?

The web app manifest file constitutes a standard centralized place to put metadata about your web application, and providing it:

  • informs browsers (and possible others) where to look for information about your web app, information that they may need in different contexts (e.g. what icon and name should be used if your web app is added to the home screen)

  • is an essential piece in the context of progressive web apps, being one of the signals used by some browsers (e.g. Chrome, Opera, Samsung Internet) in deciding if they will show the add to home screen prompt to users

What does the hint check?

This hint checks if:

  • The web app manifest file is specified correctly in the page (i.e. the page contains a single, valid declaration such as: <link rel="manifest" href="site.webmanifest">)

  • The specified web app manifest file is accessible (i.e. requesting it doesn’t result in a 404, 500, etc.)

Examples that trigger the hint

The web app manifest file is not specified:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>example</title>
        ...
    </head>
    <body>...</body>
</html>

The location of the web app manifest file is not specified:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>example</title>
        <link rel="manifest">
        ...
    </head>
    <body>...</body>
</html>
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>example</title>
        <link rel="manifest" href="">
        ...
    </head>
    <body>...</body>
</html>
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>example</title>
        <link rel="manifest" href="site.webmanifest">
        ...
    </head>
    <body>...</body>
</html>

More than one web app manifest file is specified:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>example</title>
        <link rel="manifest" href="site.webmanifest">
        <link rel="manifest" href="another-site.webmanifest">
        ...
    </head>
    <body>...</body>
</html>

Examples that pass the hint

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>example</title>
        <link rel="manifest" href="site.webmanifest">
        ...
    </head>
    <body>...</body>
</html>

How to use this hint?

This package is installed automatically by webhint:

npm install hint --save-dev

To use it, activate it via the .hintrc configuration file:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        "manifest-exists": "error",
        ...
    },
    "parsers": [...],
    ...
}

Note: The recommended way of running webhint is as a devDependency of your project.

Further Reading

Current Tags

  • 2.4.29                                ...           latest (2 years ago)

54 Versions

  • 2.4.29                                ...           2 years ago
  • 2.4.28                                ...           3 years ago
  • 2.4.27                                ...           3 years ago
  • 2.4.26                                ...           4 years ago
  • 2.4.25                                ...           4 years ago
  • 2.4.24                                ...           4 years ago
  • 2.4.23                                ...           4 years ago
  • 2.4.22                                ...           4 years ago
  • 2.4.21                                ...           4 years ago
  • 2.4.20                                ...           4 years ago
  • 2.4.19                                ...           5 years ago
  • 2.4.18                                ...           5 years ago
  • 2.4.17                                ...           5 years ago
  • 2.4.16                                ...           5 years ago
  • 2.4.15                                ...           5 years ago
  • 2.4.14                                ...           5 years ago
  • 2.4.13                                ...           5 years ago
  • 2.4.12                                ...           5 years ago
  • 2.4.11                                ...           5 years ago
  • 2.4.10                                ...           6 years ago
  • 2.4.9                                ...           6 years ago
  • 2.4.8                                ...           6 years ago
  • 2.4.7                                ...           6 years ago
  • 2.4.6                                ...           6 years ago
  • 2.4.5                                ...           7 years ago
  • 2.4.4                                ...           7 years ago
  • 2.4.3                                ...           7 years ago
  • 2.4.2                                ...           7 years ago
  • 2.4.1                                ...           7 years ago
  • 2.4.0                                ...           7 years ago
  • 2.3.11                                ...           7 years ago
  • 2.3.10                                ...           7 years ago
  • 2.3.9                                ...           7 years ago
  • 2.3.8                                ...           7 years ago
  • 2.3.7                                ...           7 years ago
  • 2.3.6                                ...           7 years ago
  • 2.3.5                                ...           7 years ago
  • 2.3.4                                ...           7 years ago
  • 2.3.3                                ...           7 years ago
  • 2.3.2                                ...           7 years ago
  • 2.3.1                                ...           7 years ago
  • 2.3.0                                ...           7 years ago
  • 2.2.2                                ...           8 years ago
  • 2.2.1                                ...           8 years ago
  • 2.2.0                                ...           8 years ago
  • 2.1.2                                ...           8 years ago
  • 2.1.1                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
  • 1.0.0-beta.0                                ...           8 years ago
Downloads
Total 109
Today 0
This Week 1
This Month 95
Last Day 0
Last Week 54
Last Month 0
Dependencies (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE