Skip to content

Commit 5ba2014

Browse files
Merge pull request #113 from developmentseed/feature/v6
Version 6 of project seed
2 parents 8b03650 + 60cc751 commit 5ba2014

21 files changed

+4937
-1199
lines changed

.babelrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"env": {
3+
"test": {
4+
"presets": ["@babel/preset-react", "@babel/preset-typescript"],
5+
"plugins": ["@babel/plugin-transform-modules-commonjs"]
6+
}
7+
},
8+
"plugins": ["babel-plugin-styled-components"]
9+
}

.eslintrc

+59-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"parser": "@babel/eslint-parser", // Specifies the ESLint parser
2+
"parser": "@babel/eslint-parser",
3+
"plugins": [
4+
"react",
5+
"react-hooks",
6+
"inclusive-language",
7+
"jest",
8+
"import",
9+
"fp"
10+
],
311
"extends": [
412
"eslint:recommended",
513
"plugin:react/recommended",
6-
"plugin:prettier/recommended"
14+
"plugin:prettier/recommended",
15+
"plugin:jest/recommended"
716
],
817
"settings": {
918
"react": {
@@ -15,13 +24,13 @@
1524
"node": true,
1625
"es6": true
1726
},
18-
"plugins": ["react", "react-hooks", "inclusive-language"],
1927
"parserOptions": {
2028
"requireConfigFile": false,
2129
"babelOptions": {
2230
"presets": [
2331
"@babel/preset-env",
24-
"@babel/preset-react"
32+
"@babel/preset-react",
33+
"@babel/preset-typescript"
2534
]
2635
},
2736
"ecmaFeatures": {
@@ -31,8 +40,16 @@
3140
"sourceType": "module" // Allows for the use of imports
3241
},
3342
"rules": {
34-
"prettier/prettier": ["error", {"semi": true, "singleQuote": true, "jsxSingleQuote": true, "parser": "flow"}],
35-
"inclusive-language/use-inclusive-words": "error",
43+
"prettier/prettier": [
44+
2,
45+
{
46+
"semi": true,
47+
"singleQuote": true,
48+
"jsxSingleQuote": true,
49+
"parser": "flow"
50+
}
51+
],
52+
"inclusive-language/use-inclusive-words": 2,
3653
"semi": [2, "always"],
3754
"jsx-quotes": [2, "prefer-single"],
3855
"no-console": 2,
@@ -41,16 +58,20 @@
4158
"no-dupe-else-if": 0,
4259
"no-setter-return": 0,
4360
"prefer-promise-reject-errors": 0,
61+
"import/order": 2,
4462
"react/button-has-type": 2,
4563
"react/default-props-match-prop-types": 2,
4664
"react/jsx-closing-bracket-location": 2,
4765
"react/jsx-closing-tag-location": 2,
4866
"react/jsx-curly-spacing": 2,
4967
"react/jsx-curly-newline": 2,
5068
"react/jsx-equals-spacing": 2,
51-
"react/jsx-max-props-per-line": [2, { "maximum": 1, "when": "multiline"}],
69+
"react/jsx-max-props-per-line": [2, { "maximum": 1, "when": "multiline" }],
5270
"react/jsx-first-prop-new-line": 2,
53-
"react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }],
71+
"react/jsx-curly-brace-presence": [
72+
2,
73+
{ "props": "never", "children": "never" }
74+
],
5475
"react/jsx-pascal-case": 2,
5576
"react/jsx-props-no-multi-spaces": 2,
5677
"react/jsx-tag-spacing": [2, { "beforeClosing": "never" }],
@@ -64,7 +85,34 @@
6485
"react/sort-comp": 2,
6586
"react/style-prop-object": 2,
6687
"react/void-dom-elements-no-children": 2,
67-
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
68-
"react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
69-
}
88+
"react/function-component-definition": [
89+
2,
90+
{ "namedComponents": ["function-declaration", "arrow-function"] }
91+
],
92+
"react-hooks/rules-of-hooks": 2, // Checks rules of Hooks
93+
"react-hooks/exhaustive-deps": 1, // Checks effect dependencies
94+
"fp/no-mutating-methods": 1
95+
},
96+
"overrides": [
97+
{
98+
"files": ["**/*.ts", "**/*.tsx"],
99+
"plugins": ["@typescript-eslint"],
100+
"rules": {
101+
"prettier/prettier": 0,
102+
"@typescript-eslint/no-unused-vars": 2,
103+
"@typescript-eslint/no-non-null-assertion": 0
104+
},
105+
// Weird behavior with no-unused-vars
106+
// See https://stackoverflow.com/a/58513127
107+
"extends": [
108+
"eslint:recommended",
109+
"plugin:@typescript-eslint/strict",
110+
"plugin:@typescript-eslint/recommended"
111+
],
112+
"parser": "@typescript-eslint/parser",
113+
"parserOptions": {
114+
"project": ["./tsconfig.json"]
115+
}
116+
}
117+
]
70118
}

.github/PULL_REQUEST_TEMPLATE.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- -----------^ Click "Preview" for a functional view! -->
2+
3+
## Why are you creating this Pull Request?
4+
5+
- [Version Release](?title=Deploy%20vX.X.X&expand=1&template=version_release.md)
6+
- [Other](?expand=1&template=default.md)
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## What am I changing and why
2+
3+
_Replace with brief description of the update and why it is needed. Link to relevant issues._
4+
5+
## How to test
6+
_Replace with instructions on how this change be tested/verified._
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
_The PR name should be the version to be deployed (ex: v1.0.1)_
2+
3+
- [ ] Bump the version in the package.json or equivalent.
4+
5+
---
6+
7+
# Changelog vX.X.X
8+
9+
## 🎉 Features
10+
-
11+
12+
## 🚀 Improvements
13+
-
14+
15+
## 🐛 Fixes
16+
-

.github/_workflow-samples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This workflow assumes that the site is served from the root of the URL (eg. devs
1919

2020
```
2121
- name: Build
22-
run: BASEURL="https://devseed.com/explorer" yarn build
22+
run: PUBLIC_URL="https://devseed.com/explorer" yarn build
2323
2424
- name: Serve site from subpath
2525
run: |

.github/_workflow-samples/deploy-s3.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'main'
1010

1111
env:
12-
NODE: 16
12+
NODE: 18
1313
DEPLOY_BUCKET:
1414

1515
jobs:
@@ -18,27 +18,27 @@ jobs:
1818

1919
steps:
2020
- name: Cancel Previous Runs
21-
uses: styfle/cancel-workflow-action@0.8.0
21+
uses: styfle/cancel-workflow-action@0.11.0
2222
with:
2323
access_token: ${{ github.token }}
2424

2525
- name: Checkout
26-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
2727

2828
- name: Use Node.js ${{ env.NODE }}
29-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v3
3030
with:
3131
node-version: ${{ env.NODE }}
3232

3333
- name: Cache node_modules
34-
uses: actions/cache@v2
34+
uses: actions/cache@v3
3535
id: cache-node-modules
3636
with:
3737
path: node_modules
3838
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
3939

4040
- name: Cache dist
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
id: cache-dist
4343
with:
4444
path: dist
@@ -56,10 +56,10 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@v2
59+
uses: actions/checkout@v3
6060

6161
- name: Restore dist cache
62-
uses: actions/cache@v2
62+
uses: actions/cache@v3
6363
id: cache-dist
6464
with:
6565
path: dist

.github/_workflow-samples/deploy-surge.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'main'
1010

1111
env:
12-
NODE: 16
12+
NODE: 18
1313
SURGE_DOMAIN:
1414

1515
jobs:
@@ -18,27 +18,27 @@ jobs:
1818

1919
steps:
2020
- name: Cancel Previous Runs
21-
uses: styfle/cancel-workflow-action@0.8.0
21+
uses: styfle/cancel-workflow-action@0.11.0
2222
with:
2323
access_token: ${{ github.token }}
2424

2525
- name: Checkout
26-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
2727

2828
- name: Use Node.js ${{ env.NODE }}
29-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v3
3030
with:
3131
node-version: ${{ env.NODE }}
3232

3333
- name: Cache node_modules
34-
uses: actions/cache@v2
34+
uses: actions/cache@v3
3535
id: cache-node-modules
3636
with:
3737
path: node_modules
3838
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
3939

4040
- name: Cache dist
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
id: cache-dist
4343
with:
4444
path: dist
@@ -56,17 +56,17 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@v2
59+
uses: actions/checkout@v3
6060

6161
- name: Restore node_modules
62-
uses: actions/cache@v2
62+
uses: actions/cache@v3
6363
id: cache-node-modules
6464
with:
6565
path: node_modules
6666
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
6767

6868
- name: Restore dist cache
69-
uses: actions/cache@v2
69+
uses: actions/cache@v3
7070
id: cache-dist
7171
with:
7272
path: dist

.github/workflows/checks.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
- ready_for_review
1919

2020
env:
21-
NODE: 16
21+
NODE: 18
2222

2323
jobs:
2424
prep:
@@ -27,20 +27,20 @@ jobs:
2727

2828
steps:
2929
- name: Cancel Previous Runs
30-
uses: styfle/cancel-workflow-action@0.8.0
30+
uses: styfle/cancel-workflow-action@0.11.0
3131
with:
3232
access_token: ${{ github.token }}
3333

3434
- name: Checkout
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3636

3737
- name: Use Node.js ${{ env.NODE }}
38-
uses: actions/setup-node@v1
38+
uses: actions/setup-node@v3
3939
with:
4040
node-version: ${{ env.NODE }}
4141

4242
- name: Cache node_modules
43-
uses: actions/cache@v2
43+
uses: actions/cache@v3
4444
id: cache-node-modules
4545
with:
4646
path: node_modules
@@ -55,15 +55,15 @@ jobs:
5555

5656
steps:
5757
- name: Checkout
58-
uses: actions/checkout@v2
58+
uses: actions/checkout@v3
5959

6060
- name: Use Node.js ${{ env.NODE }}
61-
uses: actions/setup-node@v1
61+
uses: actions/setup-node@v3
6262
with:
6363
node-version: ${{ env.NODE }}
6464

6565
- name: Cache node_modules
66-
uses: actions/cache@v2
66+
uses: actions/cache@v3
6767
id: cache-node-modules
6868
with:
6969
path: node_modules
@@ -81,15 +81,15 @@ jobs:
8181

8282
steps:
8383
- name: Checkout
84-
uses: actions/checkout@v2
84+
uses: actions/checkout@v3
8585

8686
- name: Use Node.js ${{ env.NODE }}
87-
uses: actions/setup-node@v1
87+
uses: actions/setup-node@v3
8888
with:
8989
node-version: ${{ env.NODE }}
9090

9191
- name: Cache node_modules
92-
uses: actions/cache@v2
92+
uses: actions/cache@v3
9393
id: cache-node-modules
9494
with:
9595
path: node_modules

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

.stylelintrc.json

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
{
22
"extends": [
3-
"stylelint-config-recommended"
3+
"stylelint-config-standard",
4+
"stylelint-config-styled-components"
45
],
6+
"customSyntax": "postcss-styled-syntax",
57
"rules": {
6-
"font-family-no-missing-generic-family-keyword": null
7-
}
8+
"font-family-no-missing-generic-family-keyword": null,
9+
"no-descending-specificity": [
10+
true,
11+
{
12+
"severity": "warning"
13+
}
14+
]
15+
},
16+
"ignoreFiles": [
17+
"**/*.d.ts"
18+
]
819
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Development Seed
3+
Copyright (c) 2023 Development Seed
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)