Skip to content

Commit

Permalink
🏗 Enable gulp prettify on several non-JS files (and auto-fix them) (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimha authored Oct 16, 2019
1 parent f515760 commit e231dea
Show file tree
Hide file tree
Showing 219 changed files with 23,606 additions and 1,073 deletions.
100 changes: 58 additions & 42 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"es6": true,
"browser": true
},
"parserOptions": {
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
Expand All @@ -33,7 +33,7 @@
"file": "fileoverview",
"returns": "return"
},
"allowOverrideWithoutParam" : true
"allowOverrideWithoutParam": true
}
},
"rules": {
Expand All @@ -43,25 +43,28 @@
"curly": 2,
"google-camelcase/google-camelcase": 2,
"jsdoc/check-param-names": 2,
"jsdoc/check-tag-names": [2, {
"definedTags": [
"closurePrimitive",
"deprecated",
"dict",
"export",
"final",
"nocollapse",
"noinline",
"package",
"record",
"restricted",
"struct",
"suppress",
"template",
"visibleForTesting"
]
}],
"jsdoc/check-types": [2, { "noDefaults": true }],
"jsdoc/check-tag-names": [
2,
{
"definedTags": [
"closurePrimitive",
"deprecated",
"dict",
"export",
"final",
"nocollapse",
"noinline",
"package",
"record",
"restricted",
"struct",
"suppress",
"template",
"visibleForTesting"
]
}
],
"jsdoc/check-types": [2, {"noDefaults": true}],
"jsdoc/require-param": 2,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 2,
Expand Down Expand Up @@ -111,7 +114,7 @@
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-implicit-coercion": [2, { "boolean": false }],
"no-implicit-coercion": [2, {"boolean": false}],
"no-implied-eval": 2,
"no-iterator": 2,
"no-lone-blocks": 2,
Expand All @@ -123,16 +126,23 @@
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 0,
"no-unused-vars": [2, {
"argsIgnorePattern": "^(var_args$|opt_|unused)",
"varsIgnorePattern": "(AmpElement|Def|Interface)$"
}],
"no-unused-vars": [
2,
{
"argsIgnorePattern": "^(var_args$|opt_|unused)",
"varsIgnorePattern": "(AmpElement|Def|Interface)$"
}
],
"no-useless-call": 2,
"no-useless-concat": 2,
"no-undef": 2,
"no-var": 2,
"no-warning-comments": [2, { "terms": ["do not submit"], "location": "anywhere" }],
"notice/notice": [2,
"no-warning-comments": [
2,
{"terms": ["do not submit"], "location": "anywhere"}
],
"notice/notice": [
2,
{
"mustMatch": "Copyright 20\\d{2} The AMP HTML Authors\\.",
"templateFile": "build-system/common/LICENSE-TEMPLATE.txt",
Expand All @@ -141,24 +151,30 @@
}
}
],
"object-shorthand": [2, "properties", { "avoidQuotes": true }],
"object-shorthand": [2, "properties", {"avoidQuotes": true}],
"prefer-const": 2,
"prettier/prettier": 2,
"radix": 2,
"require-jsdoc": [2, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false,
"ArrowFunctionExpression": false,
"FunctionExpression": false
"require-jsdoc": [
2,
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false,
"ArrowFunctionExpression": false,
"FunctionExpression": false
}
}
],
"sort-imports-es6-autofix/sort-imports-es6": [
2,
{
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}
}],
"sort-imports-es6-autofix/sort-imports-es6": [2, {
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}],
],
"sort-requires/sort-requires": 2
},
"overrides": [
Expand Down
30 changes: 15 additions & 15 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,35 @@ tooling:
service: appserver
gulp:
service: appserver
cmd: "yarn gulp"
cmd: 'yarn gulp'
watch:
service: appserver
cmd: "yarn gulp watch"
description: "Watches for changes in files, re-builds when detected"
cmd: 'yarn gulp watch'
description: 'Watches for changes in files, re-builds when detected'
lint:
service: appserver
cmd: "yarn gulp lint"
description: "Validates against Google Closure Linter"
cmd: 'yarn gulp lint'
description: 'Validates against Google Closure Linter'
check-types:
service: appserver
cmd: "yarn gulp check-types"
description: "Check source code for JS type errors"
cmd: 'yarn gulp check-types'
description: 'Check source code for JS type errors'
dist:
service: appserver
cmd: "yarn gulp dist"
description: "Build production binaries"
cmd: 'yarn gulp dist'
description: 'Build production binaries'
unit:
service: appserver
cmd: "yarn gulp unit"
description: "Run unit tests"
cmd: 'yarn gulp unit'
description: 'Run unit tests'
integration:
service: appserver
cmd: "yarn gulp integration"
description: "Run integration tests"
cmd: 'yarn gulp integration'
description: 'Run integration tests'
e2e:
service: appserver
cmd: "yarn gulp e2e"
description: "Runs e2e tests"
cmd: 'yarn gulp e2e'
description: 'Runs e2e tests'

proxy:
appserver:
Expand Down
12 changes: 6 additions & 6 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
path_classifiers:
docs:
- "**/*.md"
- '**/*.md'
test:
- "**/test/**/*.js"
- "**/testing/**/*.js"
- '**/test/**/*.js'
- '**/testing/**/*.js'
third_party:
- "third_party/**/*.*"
- 'third_party/**/*.*'
externs:
- "**/*.extern.js"
- '**/*.extern.js'
build-system:
- "build-system/**/*.*"
- 'build-system/**/*.*'
extraction:
javascript:
index:
Expand Down
16 changes: 7 additions & 9 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@
"overrides": [
{
"files": "OWNERS",
"options": {
"parser": "json5",
"bracketSpacing": true,
"trailingComma": "none"
}
"options": {"parser": "json5"}
},
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
"files": [".eslintrc", ".prettierrc", ".renovaterc.json", "*.json"],
"options": {"parser": "json"}
},
{
"files": [".codecov.yml", ".lando.yml", ".lgtm.yml", ".travis.yml"],
"options": {"parser": "yaml"}
}
]
}
8 changes: 2 additions & 6 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"extends": [
"config:base"
],
"extends": ["config:base"],
"node": {
"supportPolicy": [
"lts_active"
]
"supportPolicy": ["lts_active"]
},
"statusCheckVerify": true,
"commitMessagePrefix": "📦",
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ jobs:
env:
- CACHE_NAME=E2EJOB
- stage: experiment
name: "Experiment A Tests"
name: 'Experiment A Tests'
script:
- unbuffer node build-system/pr-check/experiment-tests.js --experiment=experimentA
- stage: experiment
name: "Experiment B Tests"
name: 'Experiment B Tests'
script:
- unbuffer node build-system/pr-check/experiment-tests.js --experiment=experimentB
- stage: experiment
name: "Experiment C Tests"
name: 'Experiment C Tests'
script:
- unbuffer node build-system/pr-check/experiment-tests.js --experiment=experimentC
before_cache:
Expand Down
6 changes: 3 additions & 3 deletions 3p/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
rules: [
{
owners: [{ name: 'ampproject/wg-ads' }]
}
]
owners: [{name: 'ampproject/wg-ads'}],
},
],
}
32 changes: 16 additions & 16 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
rules: [
{
owners: [
{ name: 'cramforce', requestReviews: false },
{ name: 'dvoytenko', requestReviews: false },
{ name: 'jridgewell', requestReviews: false }
]
{name: 'cramforce', requestReviews: false},
{name: 'dvoytenko', requestReviews: false},
{name: 'jridgewell', requestReviews: false},
],
},
{
pattern: '**/validator-*.{protoascii,html,out}',
owners: [{ name: 'ampproject/wg-caching', notify: true }]
owners: [{name: 'ampproject/wg-caching', notify: true}],
},
{
pattern: '**/*.md',
owners: [{ name: 'mrjoro' }, { name: 'ampproject/wg-outreach' }]
owners: [{name: 'mrjoro'}, {name: 'ampproject/wg-outreach'}],
},
{
pattern: '{.*,babel.config.js,gulpfile.js}',
owners: [{ name: 'ampproject/wg-infra' }]
owners: [{name: 'ampproject/wg-infra'}],
},
{
pattern: '{package.json,yarn.lock}',
owners: [
{ name: 'ampproject/wg-infra' },
{ name: 'ampproject/wg-runtime' },
{ name: 'ampproject/wg-performance' }
]
{name: 'ampproject/wg-infra'},
{name: 'ampproject/wg-runtime'},
{name: 'ampproject/wg-performance'},
],
},
{
// The below rule will be here only temporarily during the transition
Expand All @@ -47,9 +47,9 @@
// and/or the Travis check is implemented.
pattern: '**/{OWNERS.yaml,OWNERS}',
owners: [
{ name: 'rcebulko', notify: true },
{ name: 'mrjoro', requestReviews: false }
]
}
]
{name: 'rcebulko', notify: true},
{name: 'mrjoro', requestReviews: false},
],
},
],
}
6 changes: 3 additions & 3 deletions ads/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
rules: [
{
owners: [{ name: 'ampproject/wg-ads' }]
}
]
owners: [{name: 'ampproject/wg-ads'}],
},
],
}
6 changes: 3 additions & 3 deletions ads/google/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
rules: [
{
owners: [{ name: 'ampproject/a4a' }]
}
]
owners: [{name: 'ampproject/a4a'}],
},
],
}
2 changes: 1 addition & 1 deletion ads/google/a4a/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"rules": {
"local/no-style-display": 2,
"local/no-style-display": 2
}
}
6 changes: 3 additions & 3 deletions build-system/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
rules: [
{
owners: [{ name: 'ampproject/wg-infra' }]
}
]
owners: [{name: 'ampproject/wg-infra'}],
},
],
}
Loading

0 comments on commit e231dea

Please sign in to comment.