Skip to content

Commit

Permalink
Merge branch 'canary/typescript'
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgia Bosello committed Sep 29, 2023
2 parents f593ad4 + efa080e commit 0dac84a
Show file tree
Hide file tree
Showing 95 changed files with 8,616 additions and 6,960 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

16 changes: 16 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
85 changes: 49 additions & 36 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,59 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:react/recommended",
"prettier"
],
"plugins": ["react-hooks", "prettier", "typescript", "jsx"],
"rules": {
"import/no-unresolved": 0,
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "warn",
"react/no-unknown-property": "warn"
},
"env": {
"browser": true,
"es2021": true,
"es6": true,
"node": true,
"browser": true
},
"settings": {
"react": {
"version": "detect"
}
"node": true
},
"parser": "@babel/eslint-parser",
"extends": ["plugin:react/recommended", "airbnb", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022,
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-react"]
}
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "typescript-sort-keys", "unused-imports", "prettier", "prefer-arrow", "sort-class-members"],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"import/extensions": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"no-nested-ternary": "off",
"no-plusplus": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"prettier/prettier": "error",
"react/destructuring-assignment": "off",
"react/function-component-definition": "off",
"react/jsx-filename-extension": "off",
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
"unused-imports/no-unused-imports": "error",
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": true,
"classPropertiesAllowed": false
}
],
"sort-class-members/sort-class-members": [
"error",
{
"order": ["[static-properties]", "[properties]", "[conventional-private-properties]", "constructor", "[static-methods]", "[methods]", "[conventional-private-methods]"],
"accessorPairPositioning": "getThenSet"
}
]
},
"ignorePatterns": ["**/dist/**/*"],
"globals": {
"globalThis": "readonly"
"globalThis": "readonly",
"google": "readonly"
}
}
110 changes: 55 additions & 55 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
name: Bug Report
description: Create a bug report for Google Maps React Markers
labels: ["template: bug"]
labels: ['template: bug']
body:
- type: markdown
attributes:
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions ["Help" section](https://github.com/giorgiabosello/google-maps-react-markers/discussions/categories/help).
- type: checkboxes
attributes:
label: Verify latest release
description: "Verify that your issue reproduces in the [latest release](https://github.com/giorgiabosello/google-maps-react-markers/releases) before opening a new issue."
options:
- label: I verified that the issue exists in the latest release
required: true
- type: dropdown
attributes:
label: I know how to solve the bug
description: If you don't know how to solve the bug, the GitHub repository or the CodeSandbox example is required.
multiple: false
options:
- "I know how to solve the bug"
- "I don't know how to solve the bug and I will provide an example."
- type: input
attributes:
label: Link to the code that reproduces this issue
description: A link to a GitHub repository or a [CodeSandbox](https://codesandbox.io/) minimal reproduction. You can find a minimal reproduction example [here](https://github.com/giorgiabosello/google-maps-react-markers/tree/master/docs/src) and it should include only changes that contribute to the issue.
validations:
- type: markdown
attributes:
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions ["Help" section](https://github.com/giorgiabosello/google-maps-react-markers/discussions/categories/help).
- type: checkboxes
attributes:
label: Verify latest release
description: 'Verify that your issue reproduces in the [latest release](https://github.com/giorgiabosello/google-maps-react-markers/releases) before opening a new issue.'
options:
- label: I verified that the issue exists in the latest release
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
validations:
required: true
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: markdown
attributes:
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
- type: markdown
attributes:
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
- type: markdown
attributes:
value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance!
- type: input
attributes:
label: Which browser are you using? (if relevant)
description: "Please specify the exact version. For example: Chrome 100.0.4878.0"
- type: dropdown
attributes:
label: I know how to solve the bug
description: If you don't know how to solve the bug, the GitHub repository or the CodeSandbox example is required.
multiple: false
options:
- 'I know how to solve the bug'
- "I don't know how to solve the bug and I will provide an example."
- type: input
attributes:
label: Link to the code that reproduces this issue
description: A link to a GitHub repository or a [CodeSandbox](https://codesandbox.io/) minimal reproduction. You can find a minimal reproduction example [here](https://github.com/giorgiabosello/google-maps-react-markers/tree/master/docs/src) and it should include only changes that contribute to the issue.
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
validations:
required: true
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: markdown
attributes:
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
- type: markdown
attributes:
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
- type: markdown
attributes:
value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance!
- type: input
attributes:
label: Which browser are you using? (if relevant)
description: 'Please specify the exact version. For example: Chrome 100.0.4878.0'
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/2.feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature Request
description: Create a bug report for Google Maps React Markers
labels: ["template: enhancement"]
labels: ['template: enhancement']
body:
- type: markdown
attributes:
Expand All @@ -25,4 +25,4 @@ body:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
required: true
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/giorgiabosello/google-maps-react-markers/discussions
about: Ask questions and discuss with other community members
- name: Ask a question
url: https://github.com/giorgiabosello/google-maps-react-markers/discussions
about: Ask questions and discuss with other community members
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
36 changes: 18 additions & 18 deletions .github/workflows/STALE_ISSUE.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"
schedule:
- cron: '30 1 * * *'

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: 'stale'
stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
close-issue-message: 'This issue was closed because it has been inactive for 14 days since being marked as stale.'
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 28 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
#dependencies
node_modules
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

docs/certificates
docs/.env
# dependencies
/node_modules
/.pnp
.pnp.js

# JetBrains IDE files
.idea/

# testing
/coverage

# production
# /dist

# misc
.DS_Store
*.pem
tsconfig.tsbuildinfo

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

#docs
/docs/node_modules
/docs/build
5 changes: 5 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn commitlint --edit $1
8 changes: 8 additions & 0 deletions .husky/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
command_exists () {
command -v "$1" >/dev/null 2>&1
}

# Workaround for Windows 10, Git Bash and Yarn
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn lint-staged
18 changes: 0 additions & 18 deletions .npmignore

This file was deleted.

Loading

0 comments on commit 0dac84a

Please sign in to comment.