From f4f627cbc34dbd5c929f77464e1aedd5a37ff713 Mon Sep 17 00:00:00 2001 From: Justin Poehnelt Date: Thu, 23 Sep 2021 11:57:25 -0600 Subject: [PATCH] chore: Synced file(s) with googlemaps/.github (#305) * chore: Synced local '.eslintrc.json' with remote 'sync-files/js/.eslintrc.json' * chore: Synced local '.github/' with remote 'sync-files/js/.github/' --- .eslintrc.json | 23 ++++++++++++++++++-- .github/bundlewatch.config.json | 11 ++++++++++ .github/workflows/bundlewatch.yml | 35 +++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 .github/bundlewatch.config.json create mode 100644 .github/workflows/bundlewatch.yml diff --git a/.eslintrc.json b/.eslintrc.json index c391188..9ac3763 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,8 +15,27 @@ "prefer-arrow-callback": 2, "@typescript-eslint/ban-ts-comment": 0, "@typescript-eslint/ban-types": 1, - "@typescript-eslint/no-empty-function": 1 - }, + "@typescript-eslint/no-empty-function": 1, + // disable the rule for all files + "@typescript-eslint/explicit-member-accessibility": "off" + }, + "overrides": [ + { + // enable the rule specifically for TypeScript files + "files": ["*.ts", "*.tsx"], + "rules": { + "@typescript-eslint/explicit-member-accessibility": [ + 1, { + "accessibility": "explicit", + "overrides": { + "accessors": "explicit", + "constructors": "no-public", + "methods": "explicit", + "properties": "explicit", + "parameterProperties": "explicit" + }}] + } + }], "env": { "browser": true, "node": true, diff --git a/.github/bundlewatch.config.json b/.github/bundlewatch.config.json new file mode 100644 index 0000000..8916574 --- /dev/null +++ b/.github/bundlewatch.config.json @@ -0,0 +1,11 @@ +{ + "files": [ + { + "path": "dist/index.*.js" + } + ], + "ci": { + "trackBranches": ["main"], + "repoBranchBase": "main" + } +} diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml new file mode 100644 index 0000000..3e69d97 --- /dev/null +++ b/.github/workflows/bundlewatch.yml @@ -0,0 +1,35 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Bundlewatch + +on: + push: + branches: + - main + pull_request: + types: [synchronize, opened] + +jobs: + bundlewatch: + runs-on: ubuntu-latest + env: + CI_BRANCH_BASE: main + steps: + - uses: actions/checkout@v2 + - uses: jackyef/bundlewatch-gh-action@b9753bc9b3ea458ff21069eaf6206e01e046f0b5 + with: + build-script: npm i + bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} + bundlewatch-config: .github/bundlewatch.config.json