generated from uclaacm/teach-la-ts-react-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28b980a
Showing
52 changed files
with
9,270 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
webpack.* | ||
yarn.lock | ||
*.json | ||
*.md | ||
*.toml | ||
|
||
*.css | ||
*.scss | ||
*.js | ||
*.jsx | ||
|
||
node_modules/ | ||
dist/ | ||
public/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:import/typescript', | ||
'plugin:@typescript-eslint/recommended', | ||
|
||
// override all prettier rules, see https://github.com/prettier/eslint-config-prettier | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
project: './tsconfig.json', | ||
}, | ||
plugins: ['import', 'react', '@typescript-eslint'], | ||
rules: { | ||
// A few more opinions in addition to extensions | ||
|
||
// As per React 17 changes! https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-uses-react': 'off', | ||
|
||
'linebreak-style': ['error', 'unix'], | ||
|
||
'@typescript-eslint/no-require-imports': ['error'], | ||
|
||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
|
||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
|
||
// Style | ||
quotes: ['error', 'single', { avoidEscape: true }], | ||
|
||
// Require all imported dependencies are actually declared in package.json | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
optionalDependencies: false, // Disallow importing optional dependencies (those shouldn't be in use in the project) | ||
peerDependencies: false, // Disallow importing peer dependencies (that aren't also direct dependencies) | ||
}, | ||
], | ||
|
||
// Require all imported libraries actually resolve (!!required for import/no-extraneous-dependencies to work!!) | ||
'import/no-unresolved': ['error'], | ||
|
||
// Require an ordering on all imports | ||
'import/order': [ | ||
'warn', | ||
{ | ||
groups: ['builtin', 'external'], | ||
alphabetize: { order: 'asc', caseInsensitive: true }, | ||
}, | ||
], | ||
|
||
// Cannot import from the same module twice | ||
'no-duplicate-imports': ['error'], | ||
|
||
// Cannot shadow names | ||
// note you must disable the base rule as it can report incorrect errors | ||
'no-shadow': 'off', | ||
'@typescript-eslint/no-shadow': ['error'], | ||
|
||
// Required spacing in property declarations (copied from TSLint, defaults are good) | ||
'key-spacing': ['error'], | ||
|
||
// Require semicolons | ||
semi: ['error', 'always'], | ||
|
||
// Don't unnecessarily quote properties | ||
'quote-props': ['error', 'consistent-as-needed'], | ||
|
||
// No multiple empty lines | ||
'no-multiple-empty-lines': ['error'], | ||
|
||
// Max line lengths | ||
'max-len': [ | ||
'error', | ||
{ | ||
code: 120, | ||
ignoreUrls: true, // Most common reason to disable it | ||
ignoreStrings: true, // These are not fantastic but necessary for error messages | ||
ignoreTemplateLiterals: true, | ||
ignoreRegExpLiterals: true, | ||
}, | ||
], | ||
|
||
// One of the easiest mistakes to make | ||
'@typescript-eslint/no-floating-promises': ['error'], | ||
|
||
// Don't leave log statements littering the premises! | ||
'no-console': ['error', { allow: ['info', 'warn', 'error'] }], | ||
|
||
// Useless diff results | ||
'no-trailing-spaces': ['error'], | ||
|
||
// Must use foo.bar instead of foo['bar'] if possible | ||
'dot-notation': ['error'], | ||
|
||
// Are you sure | is not a typo for || ? | ||
'no-bitwise': ['error'], | ||
|
||
// Member ordering | ||
'@typescript-eslint/member-ordering': [ | ||
'error', | ||
{ | ||
default: [ | ||
'public-static-field', | ||
'public-static-method', | ||
'protected-static-field', | ||
'protected-static-method', | ||
'private-static-field', | ||
'private-static-method', | ||
|
||
'field', | ||
|
||
// Constructors | ||
'constructor', // = ['public-constructor', 'protected-constructor', 'private-constructor'] | ||
|
||
// Methods | ||
'method', | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: "\U0001F41B Bug Report" | ||
description: Report a bug | ||
title: '🐛 Bug: ' | ||
labels: ['bug'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
- type: checkboxes | ||
id: existing-issue | ||
attributes: | ||
label: Is there an existing issue for this? | ||
description: Please search to see if an issue already exists for the bug you encountered. | ||
options: | ||
- label: I have searched existing issues | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: Describe the bug that you are experiencing. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: what-should-happen | ||
attributes: | ||
label: What was the expected behavior? | ||
description: Describe what you expected to happen instead. | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: reproduce | ||
attributes: | ||
label: Steps To Reproduce | ||
description: How can one reproduce this behavior? | ||
placeholder: | | ||
1. In this environment... | ||
2. With this config... | ||
3. Run '...' | ||
4. See error... | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Relevant log output | ||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. | ||
render: shell | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: anything-else | ||
attributes: | ||
label: Anything else? | ||
description: | | ||
Links? References? Anything that will give us more context about the issue you are encountering! | ||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: "\U0001F680 Feature Request" | ||
about: Requesting a new feature | ||
title: '🚀 Feature: ' | ||
labels: feature | ||
--- | ||
|
||
<!-- short description of the feature --> | ||
|
||
### Use Case | ||
|
||
<!-- why do you need this feature? --> | ||
|
||
### Proposed Solution | ||
|
||
<!-- Please include prototype/sketch/reference implementation: --> | ||
|
||
- [ ] :wave: I may be able to implement this feature request | ||
|
||
--- | ||
|
||
This is a :rocket: Feature Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: "\U0001F43E Request for Minor Update" | ||
about: Make a small change | ||
title: '🐾 Minor Update: ' | ||
labels: minor-update, effort/tiny | ||
--- | ||
|
||
<!-- short description of the feature --> | ||
|
||
### Use Case | ||
|
||
<!-- why do you need this feature? --> | ||
|
||
### Proposed Solution | ||
|
||
<!-- Please include prototype/sketch/reference implementation: --> | ||
|
||
- [ ] :wave: I may be able to implement this update request | ||
|
||
--- | ||
|
||
This is a :feet: Minor Update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: "\U0001F9F9 Request for Refactor" | ||
about: Refactor / clean up code | ||
title: '🧹 Refactor: ' | ||
labels: refactor, effort/tiny | ||
--- | ||
|
||
<!-- short description of the feature --> | ||
|
||
### Use Case | ||
|
||
<!-- why do you need this feature? --> | ||
|
||
### Proposed Solution | ||
|
||
<!-- Please include prototype/sketch/reference implementation: --> | ||
|
||
- [ ] :wave: I may be able to implement this refactor request | ||
|
||
--- | ||
|
||
This is a :broom: Refactor Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: '👀 Tracking Issue' | ||
about: add a subject to track | ||
title: '👀 Tracking: ' | ||
labels: tracking | ||
--- | ||
|
||
### Overview: | ||
|
||
<!-- A summary of the subject you are tracking --> | ||
|
||
### Design & Implementation: | ||
|
||
<!-- | ||
Designs, code snippets, or dicussion revolved around the subject | ||
--> | ||
|
||
### Checklist: | ||
|
||
<!-- | ||
e.g. checklist of links to feature requests, bugs, and PRs that are in scope for release | ||
- [ ] | ||
- [ ] | ||
--> | ||
|
||
--- | ||
|
||
This is a 👀 Tracking Issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- | ||
Tag your PR title with the components that it touches along with | ||
the type of change (feat, fix, refactor) | ||
E.g. "fix: fix activity 1 button placement" or "feat: add favicon and make footer thinner" | ||
--> | ||
|
||
## Summary | ||
|
||
Closes #<!-- issue number --> | ||
|
||
<!-- Enumerate changes you made and why you made them --> | ||
<!-- list any new dependencies required for this change --> | ||
|
||
## Test Plan | ||
|
||
<!-- | ||
How did you manually test your change? How do you know that your code works? | ||
Add supporting screenshots of the feature in play, terminal pastes, etc. as necessary | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: monthly | ||
time: '13:00' | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Production Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Checkout Git repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- run: yarn install | ||
|
||
- run: yarn build | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Lint | ||
on: [push] | ||
|
||
jobs: | ||
run-linters: | ||
name: Run Linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Git repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Run linters | ||
run: yarn lint |
Oops, something went wrong.