<|start_filename|>.htmllintrc.json<|end_filename|>
{
  "attr-bans": [
    "align",
    "background",
    "bgcolor",
    "border",
    "frameborder",
    "longdesc",
    "marginwidth",
    "marginheight",
    "scrolling",
    "style",
    "width"
  ],
  "attr-order": [
    "http-equiv",
    "id",
    "class",
    "style",
    "title",
    "disabled",
    "rel",
    "type",
    "name",
    "property",
    "pattern",
    "required",
    "placeholder",
    "value",
    "content",
    "herf",
    "async",
    "defer",
    "src",
    "alt",
    "target",
    "srcset",
    "sizes",
    "width",
    "height"
  ],
  "attr-name-ignore-regex": false,
  "attr-name-style": false,
  "attr-new-line": false,
  "attr-no-dup": true,
  "attr-no-unsafe-char": true,
  "attr-quote-style": "double",
  "attr-req-value": false,
  "class-no-dup": true,
  "class-style": false,
  "doctype-first": "smart",
  "doctype-html5": true,
  "fig-req-figcaption": false,
  "focusable-tabindex-style": false,
  "head-req-title": true,
  "head-valid-content-model": true,
  "href-style": false,
  "html-req-lang": true,
  "html-valid-content-model": false,
  "id-class-ignore-regex": false,
  "id-class-no-ad": false,
  "id-class-style": "dash",
  "id-no-dup": true,
  "img-req-alt": "allownull",
  "img-req-src": true,
  "indent-style": "spaces",
  "indent-width": 2,
  "indent-width-cont": true,
  "input-radio-req-name": true,
  "input-req-label": true,
  "label-req-for": true,
  "lang-style": "case",
  "line-end-style": "lf",
  "line-max-len": 120,
  "line-max-len-ignore-regex": false,
  "spec-char-escape": true,
  "table-req-caption": false,
  "table-req-header": false,
  "tag-bans": ["b", "i"],
  "tag-close": true,
  "tag-name-lowercase": true,
  "tag-name-match": true,
  "tag-self-close": true,
  "title-max-len": 60,
  "title-no-dup": true
}


<|start_filename|>gulp-tasks/json5.js<|end_filename|>
/* eslint-env node */
/* eslint-disable valid-jsdoc, no-console */

'use strict';

/**
 * Convert JSON5 files to strict JSON.
 */
module.exports = (gulp, plugins) => {
  return () => {
    return gulp
      .src(['**/*.json5', '**/.*.json5'])
      .pipe(plugins.excludeGitignore())
      .pipe(plugins.json5ToJson({beautify: false}))
      .pipe(gulp.dest('.'));
  };
};


<|start_filename|>gulp-tasks/min-img.js<|end_filename|>
/* eslint-env node */
/* eslint-disable valid-jsdoc, no-console */

'use strict';

/**
 * Minify PNG, JPEG, GIF and SVG images.
 */
module.exports = (gulp, plugins) => {
  return () => {
    return (
      gulp
        .src('images-original/**/*')
        .pipe(plugins.imagemin())
        // .pipe(plugins.imagemin([
        //   plugins.imagemin.gifsicle({interlaced: true}),
        //   plugins.imagemin.jpegtran({progressive: true}),
        //   plugins.imagemin.optipng({optimizationLevel: 5}),
        //   plugins.imagemin.svgo({plugins: [{removeViewBox: true}]})
        // ]))
        .pipe(gulp.dest('images'))
        .pipe(plugins.webp({quality: 50}))
        .pipe(gulp.dest('images'))
    );
  };
};


<|start_filename|>package.json<|end_filename|>
{
  "name": "polymer-starter-kit-plus",
  "license": "BSD-3-Clause",
  "devDependencies": {
    "del": "^3.0.0",
    "eslint": "^4.1.1",
    "eslint-config-google": "^0.8.0",
    "eslint-config-prettier": "^2.3.0",
    "eslint-plugin-html": "^3.0.0",
    "eslint-plugin-prettier": "^2.1.2",
    "gulp": "github:gulpjs/gulp#4.0",
    "gulp-exclude-gitignore": "^1.1.1",
    "gulp-if": "^2.0.2",
    "gulp-imagemin": "^3.3.0",
    "gulp-json5-to-json": "^0.2.1",
    "gulp-load-plugins": "^1.5.0",
    "gulp-plumber": "^1.1.0",
    "gulp-webp": "^2.3.0",
    "htmllint-cli": "^0.0.6",
    "husky": "^0.14.3",
    "imagemin-webp": "^4.0.0",
    "js-beautify": "^1.6.14",
    "lint-staged": "^4.0.1",
    "merge-stream": "^1.0.1",
    "optipng-bin": "^4.0.0",
    "polymer-build": "^1.6.0",
    "prettier": "^1.5.2",
    "stylelint": "^7.13.0",
    "stylelint-config-standard": "^16.0.0",
    "stylelint-processor-html": "^1.0.0"
  },
  "scripts": {
    "build": "gulp build",
    "format": "yarn format:css && yarn format:html && yarn format:js && yarn format:json",
    "format:css": "js-beautify *.html **/*.html --css -r --config .jsbeautifyrc.json",
    "format:css2": "stylelint \"**/*.{css,html}\" --config .stylelintrc.json --fix # Waiting for PR https://github.com/stylelint/stylelint/pull/2596",
    "format:css3": "prettier \"!(bower_components)/**/*.{css,html}\" \"*.{css,html}\" --parser postcss --single-quote --print-width 120 --write",
    "format:html": "js-beautify *.html **/*.html --html -r --config .jsbeautifyrc.json",
    "format:js": "eslint . --ext js,html --ignore-path .gitignore --fix",
    "format:json": "prettier \"!(bower_components)/**/*.json\" \"*.json\" --parser json --print-width 120 --write",
    "json5": "gulp json5 && yarn format:json",
    "lint": "yarn lint:css && yarn lint:html && yarn lint:js && yarn lint:json && yarn lint:polymer",
    "lint:css": "stylelint \"**/*.{css,html}\" --config .stylelintrc.json",
    "lint:html": "htmllint \"!(bower_components|build|node_modules)/**/*.html\" --rc .htmllintrc.json",
    "lint:js": "eslint . --ext js,html --ignore-path .gitignore",
    "lint:json": "prettier \"!(bower_components)/**/*.json\" \"*.json\" --parser json --print-width 120 --list-different",
    "lint:polymer": "polymer lint",
    "min:img": "gulp min:img",
    "test": "polymer test",
    "test:integration": "polymer build # Test that psk builds without error with the CLI.",
    "precommit": "lint-staged",
    "serve": "polymer serve --open",
    "serve:all": "polymer serve --open --hostname 0.0.0.0 # Serve on all IPv4 addresses on the local machine.",
    "watch": "gulp watch"
  },
  "lint-staged": {
    "*.css": ["stylelint --config .stylelintrc.json", "js-beautify --css -r --config .jsbeautifyrc.json", "git add"],
    "*.html": [
      "stylelint --config .stylelintrc.json",
      "js-beautify --css -r --config .jsbeautifyrc.json",
      "htmllint --rc .htmllintrc.json",
      "js-beautify --html -r --config .jsbeautifyrc.json",
      "eslint --fix",
      "polymer lint",
      "git add"
    ],
    "*.js": ["eslint --fix", "git add"],
    "*.json": ["prettier --parser json --print-width 120 --write", "git add"]
  }
}


<|start_filename|>gulpfile.js<|end_filename|>
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 */

/* eslint-env node */
/* eslint-disable valid-jsdoc, no-console */

'use strict';

const gulp = require('gulp');
const mergeStream = require('merge-stream');
const plugins = require('gulp-load-plugins')();

/**
 * Loads external gulp task script functions by filename.
 */
function getTask(filename) {
  return require('./gulp-tasks/' + filename);
}

/**
 * Polymer build.
 */
gulp.task('build', getTask('build')(gulp, mergeStream, plugins));

/**
 * Convert JSON5 files to strict JSON.
 */
gulp.task('json5', getTask('json5')(gulp, plugins));

/**
 * Minify PNG, JPEG, GIF and SVG images.
 */
gulp.task('min:img', getTask('min-img')(gulp, plugins));


<|start_filename|>.eslintrc.json<|end_filename|>
{
  "extends": ["eslint:recommended", "google", "prettier"],
  "parserOptions": { "ecmaVersion": 6 },
  "env": { "browser": true, "serviceworker": true, "worker": true },
  "plugins": ["html", "prettier"],
  "rules": {
    "brace-style": "off",
    "new-cap": ["error", { "capIsNewExceptions": ["Polymer"] }],
    "no-var": "off",
    "require-jsdoc": "off",
    "prettier/prettier": [
      "error",
      { "singleQuote": true, "trailingComma": "all", "bracketSpacing": false, "printWidth": 120, "parser": "flow" }
    ]
  },
  "globals": { "Polymer": true }
}
