mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5202 from Polymer/3.x-linter-warnings
Fix ESLint gulp task for 3.x
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
|
||||
16
.travis.yml
16
.travis.yml
@@ -1,7 +1,7 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
dist: trusty
|
||||
node_js: stable
|
||||
node_js: '9'
|
||||
addons:
|
||||
firefox: latest
|
||||
chrome: stable
|
||||
@@ -9,15 +9,15 @@ cache:
|
||||
directories:
|
||||
- node_modules
|
||||
before_script:
|
||||
- npm install -g bower gulp-cli@1
|
||||
- bower install
|
||||
- npm install -g gulp-cli@1
|
||||
- gulp lint-eslint
|
||||
- >-
|
||||
npm run update-types && git diff --exit-code || (echo -e
|
||||
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
|
||||
update-types".' && false)
|
||||
# TODO(dfreedm): re-enable after making update-types work
|
||||
#- >-
|
||||
# npm run update-types && git diff --exit-code || (echo -e
|
||||
# '\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
|
||||
# update-types".' && false)
|
||||
script:
|
||||
- wct -l chrome -l firefox
|
||||
- wct --npm --module-resolution=node -l chrome -l firefox
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then travis_wait 30 ./util/travis-sauce-test.sh; fi
|
||||
env:
|
||||
global:
|
||||
|
||||
36
bower.json
36
bower.json
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"name": "polymer",
|
||||
"main": [
|
||||
"polymer.html"
|
||||
],
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"ignore": [
|
||||
"/.*",
|
||||
"/test/",
|
||||
"/util/",
|
||||
"gulpfile.js",
|
||||
"CONTRIBUTING.md",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"authors": [
|
||||
"The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Polymer/polymer.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"shadycss": "webcomponents/shadycss#^v1.1.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^v1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"web-component-tester": "^6.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#3.0.0-rc.1",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^3.0.1",
|
||||
"perf-tester": "polymerlabs/perf-tester"
|
||||
},
|
||||
"private": true,
|
||||
"resolutions": {
|
||||
"test-fixture": "3.0.0-rc.1"
|
||||
}
|
||||
}
|
||||
14
gulpfile.js
14
gulpfile.js
@@ -124,13 +124,13 @@ gulp.task('closure', ['generate-externs'], () => {
|
||||
addClosureTypes = new AddClosureTypeImport(entry, 'externs/polymer-internal-types.html');
|
||||
}
|
||||
|
||||
config('polymer.html');
|
||||
config('polymer-legacy.js');
|
||||
|
||||
const project = new PolymerProject({
|
||||
shell: `./${entry}`,
|
||||
fragments: [
|
||||
'bower_components/shadycss/apply-shim.html',
|
||||
'bower_components/shadycss/custom-style-interface.html'
|
||||
'node_modules/@webcomponents/shadycss/entrypoints/apply-shim.js',
|
||||
'node_modules/@webcomponents/shadycss/entrypoints/custom-style-interface.js'
|
||||
],
|
||||
extraDependencies: [
|
||||
addClosureTypes.importPath,
|
||||
@@ -219,8 +219,8 @@ gulp.task('estimate-size', ['clean'], () => {
|
||||
const project = new PolymerProject({
|
||||
shell: POLYMER_LEGACY,
|
||||
fragments: [
|
||||
'bower_components/shadycss/apply-shim.html',
|
||||
'bower_components/shadycss/custom-style-interface.html'
|
||||
'node_modules/@webcomponents/shadycss/entrypoints/apply-shim.js',
|
||||
'node_modules/@webcomponents/shadycss/entrypoints/custom-style-interface.js'
|
||||
]
|
||||
});
|
||||
|
||||
@@ -250,7 +250,7 @@ gulp.task('estimate-size', ['clean'], () => {
|
||||
});
|
||||
|
||||
gulp.task('lint-eslint', function() {
|
||||
return gulp.src(['lib/**/*.html', 'test/unit/*.html', 'util/*.js'])
|
||||
return gulp.src(['lib/**/*.js', 'test/unit/*.{html,js}', 'util/*.js'])
|
||||
.pipe(eslint())
|
||||
.pipe(eslint.format())
|
||||
.pipe(eslint.failAfterError());
|
||||
@@ -281,7 +281,7 @@ gulp.task('generate-typescript', async () => {
|
||||
});
|
||||
|
||||
gulp.task('update-version', () => {
|
||||
return gulp.src('lib/utils/boot.html')
|
||||
return gulp.src('lib/utils/boot.js')
|
||||
.pipe(replace(/(window.Polymer.version = )'\d+\.\d+\.\d+'/, `$1'${require('./package.json').version}'`))
|
||||
.pipe(gulp.dest('lib/utils'));
|
||||
});
|
||||
|
||||
@@ -8,4 +8,4 @@ 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
|
||||
*/
|
||||
|
||||
window.JSCompiler_renameProperty = function(prop, obj) { return prop; }
|
||||
window.JSCompiler_renameProperty = function(prop) { return prop; };
|
||||
|
||||
@@ -111,4 +111,4 @@ export const Debouncer = class Debouncer {
|
||||
debouncer.setConfig(asyncModule, callback);
|
||||
return debouncer;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
75
package-lock.json
generated
75
package-lock.json
generated
@@ -2620,6 +2620,81 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-eslint": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz",
|
||||
"integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "6.26.0",
|
||||
"babel-traverse": "6.26.0",
|
||||
"babel-types": "6.26.0",
|
||||
"babylon": "6.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "1.1.3",
|
||||
"esutils": "2.0.2",
|
||||
"js-tokens": "3.0.2"
|
||||
}
|
||||
},
|
||||
"babel-traverse": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
|
||||
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "6.26.0",
|
||||
"babel-messages": "6.23.0",
|
||||
"babel-runtime": "6.26.0",
|
||||
"babel-types": "6.26.0",
|
||||
"babylon": "6.18.0",
|
||||
"debug": "2.6.9",
|
||||
"globals": "9.18.0",
|
||||
"invariant": "2.2.4",
|
||||
"lodash": "4.17.10"
|
||||
}
|
||||
},
|
||||
"babel-types": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
|
||||
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "6.26.0",
|
||||
"esutils": "2.0.2",
|
||||
"lodash": "4.17.10",
|
||||
"to-fast-properties": "1.0.3"
|
||||
}
|
||||
},
|
||||
"babylon": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
|
||||
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
|
||||
"dev": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"version": "9.18.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-generator": {
|
||||
"version": "6.26.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"@polymer/iron-component-page": "3.0.0-pre.12",
|
||||
"@polymer/test-fixture": "3.0.0-pre.12",
|
||||
"@webcomponents/webcomponentsjs": "^2.0.0-0",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-preset-minify": "^0.2.0",
|
||||
"del": "^3.0.0",
|
||||
"dom5": "^3.0.0",
|
||||
|
||||
@@ -26,7 +26,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<script type="module">
|
||||
import './dom-bind-elements1.js';
|
||||
import './dom-bind-elements2.js';
|
||||
/* global earlyDomBind earlyBoundChild declaredXBasic1 declaredXBasic2 declarativeDomBind boundTextDiv container needsHost nonUpgrade*/
|
||||
/* global earlyDomBind */
|
||||
earlyDomBind.value = 'hi!';
|
||||
</script>
|
||||
|
||||
@@ -77,6 +77,7 @@ suite('Polymer.DomBind class', function() {
|
||||
|
||||
suite('dom-bind touched before upgrade', function() {
|
||||
test('value binds top-down', function() {
|
||||
/* global earlyBoundChild*/
|
||||
assert.equal(earlyBoundChild.textContent, 'hi!');
|
||||
});
|
||||
});
|
||||
@@ -88,6 +89,7 @@ suite('declarative dom-bind', function() {
|
||||
var el2;
|
||||
|
||||
setup(function() {
|
||||
/* global declarativeDomBind declaredXBasic1 declaredXBasic2 */
|
||||
domBind = declarativeDomBind;
|
||||
el1 = declaredXBasic1;
|
||||
el2 = declaredXBasic2;
|
||||
@@ -127,6 +129,7 @@ suite('declarative dom-bind', function() {
|
||||
|
||||
test('initial value notifies to dom-bind', function() {
|
||||
assert.equal(domBind.boundText, 'this text is bound');
|
||||
/* global boundTextDiv */
|
||||
assert.equal(boundTextDiv.textContent, 'this text is bound');
|
||||
});
|
||||
|
||||
@@ -206,6 +209,7 @@ suite('imperative dom-bind', function() {
|
||||
});
|
||||
|
||||
test('move dom-bind', function( ) {
|
||||
/* global container */
|
||||
container.appendChild(domBind);
|
||||
|
||||
assert.equal(container.firstElementChild, el1);
|
||||
@@ -260,7 +264,7 @@ suite('imperative dom-bind', function() {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* global needsHost nonUpgrade */
|
||||
suite('timing', function() {
|
||||
|
||||
test('late-loaded import should block stamping', function() {
|
||||
|
||||
@@ -15,7 +15,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<script src="../../node_modules/wct-browser-legacy/browser.js"></script>
|
||||
<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
|
||||
<script type="module">
|
||||
/* global origOwnProps:true */
|
||||
window.origOwnProps = Object.getOwnPropertyNames(window).reduce(function(props, prop) {
|
||||
return props[prop] = true && props;
|
||||
}, {});
|
||||
@@ -62,8 +61,9 @@ Polymer({
|
||||
<global-test></global-test>
|
||||
|
||||
<script type="module">
|
||||
import { Polymer } from '../../polymer-legacy.js';
|
||||
import '../../polymer-legacy.js';
|
||||
|
||||
/* global origOwnProps */
|
||||
suite('globals', function() {
|
||||
|
||||
var expected = {
|
||||
|
||||
@@ -9,4 +9,4 @@ window.WCT = {
|
||||
'accessibility-developer-tools/dist/js/axs_testing.js',
|
||||
'@polymer/test-fixture/test-fixture.js'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const dom5 = require('dom5');
|
||||
const parse5 = require('parse5');
|
||||
const {Transform} = require('stream');
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
# subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
#
|
||||
set -x
|
||||
wct -s 'windows 10/microsoftedge@14' -s 'windows 10/microsoftedge@15' -s 'windows 10/microsoftedge@16' -s 'windows 8.1/internet explorer@11' -s 'os x 10.11/safari@9' -s 'macos 10.12/safari@10' -s 'macos 10.13/safari@11' -s 'Linux/chrome@41'
|
||||
wct --npm --module-resolution=node -s 'windows 10/microsoftedge@14' -s 'windows 10/microsoftedge@15' -s 'windows 10/microsoftedge@16' -s 'windows 8.1/internet explorer@11' -s 'os x 10.11/safari@9' -s 'macos 10.12/safari@10' -s 'macos 10.13/safari@11' -s 'Linux/chrome@41'
|
||||
Reference in New Issue
Block a user