-
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
1 parent
7be5c0f
commit e0d7909
Showing
27 changed files
with
2,512 additions
and
1,633 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,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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,5 @@ | ||
--- | ||
"ancesdir": major | ||
--- | ||
|
||
Migrated to TypeScript and added new release process. Although this is functionally equivalent, the change from flow types to TypeScript could be a breaking change for folks development workflows, so this is a major release. |
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,130 @@ | ||
module.exports = { | ||
extends: ["@khanacademy"], | ||
plugins: ["eslint-comments", "import", "jest", "@babel"], | ||
rules: { | ||
"constructor-super": "error", | ||
curly: "error", | ||
eqeqeq: ["error", "allow-null"], | ||
"generator-star-spacing": "error", | ||
"guard-for-in": "error", | ||
"linebreak-style": ["error", "unix"], | ||
"no-alert": "error", | ||
"no-array-constructor": "error", | ||
"no-console": "error", | ||
"no-debugger": "error", | ||
"no-dupe-class-members": "error", | ||
"no-dupe-keys": "error", | ||
"no-extra-bind": "error", | ||
"no-new": "error", | ||
"no-new-func": "error", | ||
"no-new-object": "error", | ||
"no-throw-literal": "error", | ||
"@babel/no-invalid-this": "error", | ||
"no-with": "error", | ||
"no-async-promise-executor": "error", | ||
"no-const-assign": "error", | ||
"no-else-return": [ | ||
"error", | ||
{ | ||
allowElseIf: false, | ||
}, | ||
], | ||
"no-irregular-whitespace": "off", | ||
"no-multi-str": "error", | ||
"no-prototype-builtins": "off", | ||
"no-restricted-syntax": [ | ||
"error", | ||
{ | ||
selector: "IntersectionTypeAnnotation", | ||
message: | ||
"Use exact object types and the spread operator instead", | ||
}, | ||
], | ||
"no-return-await": "error", | ||
"no-this-before-super": "error", | ||
"no-useless-catch": "off", | ||
"no-useless-call": "error", | ||
"no-undef": "error", | ||
"no-unexpected-multiline": "error", | ||
"no-unreachable": "error", | ||
"no-unused-expressions": "error", | ||
"no-unused-vars": ["error", {args: "none", varsIgnorePattern: "^_*$"}], | ||
"no-var": "error", | ||
"one-var": ["error", "never"], | ||
"prefer-const": "error", | ||
"prefer-spread": "error", | ||
"require-await": "error", | ||
"require-yield": "error", | ||
|
||
// We turned this off because it complains when you have a | ||
// multi-line string, which I think is going too far. | ||
"prefer-template": "off", | ||
// We've decided explicitly not to care about this. | ||
"arrow-parens": "off", | ||
// ES6/jsx stuff that's disabled for now, but maybe shouldn't be. | ||
// TODO(csilvers): enable these if/when community agrees on it. | ||
"prefer-arrow-callback": "off", | ||
|
||
// Stuff that's disabled for now, but maybe shouldn't be. | ||
// TODO(jeresig): It's an anti-pattern but it appears to be used | ||
// frequently in reducers, the alternative would be super-clunky. | ||
"no-case-declarations": "off", | ||
// TODO(csilvers): enable these if/when community agrees on it. | ||
// Might be nice to turn this on one day, but since we don't | ||
// use jsdoc anywhere it seems silly to require it yet. | ||
"valid-jsdoc": "off", | ||
"require-jsdoc": "off", | ||
|
||
// eslint-comments | ||
"eslint-comments/no-unlimited-disable": "error", | ||
"eslint-comments/no-unused-disable": "error", | ||
|
||
// import | ||
"import/extensions": [ | ||
"error", | ||
"never", | ||
{ | ||
ignorePackages: true, | ||
}, | ||
], | ||
"import/no-cycle": [ | ||
"error", | ||
{ | ||
ignoreExternal: true, | ||
commonjs: true, | ||
maxDepth: 6, | ||
}, | ||
], | ||
"import/named": "error", | ||
"import/default": "error", | ||
"import/namespace": "error", | ||
"import/no-unassigned-import": [ | ||
"error", | ||
{ | ||
allow: ["@jest/globals", "jest-extended"], | ||
}, | ||
], | ||
|
||
// jest | ||
"jest/no-focused-tests": "error", | ||
"jest/no-identical-title": "error", | ||
"jest/prefer-to-contain": "error", | ||
"jest/prefer-to-have-length": "error", | ||
"jest/valid-title": "error", | ||
|
||
// prettier | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
tabWidth: 4, | ||
trailingComma: "all", | ||
bracketSpacing: false, | ||
}, | ||
], | ||
}, | ||
env: { | ||
es6: true, | ||
jest: true, | ||
node: true, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,54 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# This workflow will run changesets depending on two different scenarios: | ||
# | ||
# 1. If we are landing a specific commit into main (Author PR), then | ||
# changesets will check if there are changes verifying the Markdown files | ||
# generated automatically: | ||
# | ||
# a) There are new versions and there's NO Release PR, then the changesets | ||
# action will create a new Release PR. | ||
# | ||
# b) There's a Release PR, then the changesets action will update the | ||
# existing Release PR with the new commit. | ||
# | ||
# NOTE: (in both cases, changesets will modify the new version in | ||
# package.json for each package, and will remove the MD files as part of the | ||
# Release PR). | ||
# | ||
# 2. If we are landing the Release PR into main, then the changesets action | ||
# will publish the changes to npm. | ||
# | ||
# For more info about this workflow, see: | ||
# https://github.com/changesets/action#usage | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install & cache node_modules | ||
uses: Khan/actions@shared-node-cache-v0 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: yarn publish:ci | ||
env: | ||
# We use a Personal Access Token here rather than the GITHUB_TOKEN | ||
# so that it will trigger our other actions. The token has to be on | ||
# the account of someone with appropriate access levels and given the | ||
# repo scope. | ||
GITHUB_TOKEN: ${{ secrets.BOT_PA_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
module.exports = require("@khanacademy/eslint-config/.prettierrc"); |
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
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"javascript.validate.enable": false, | ||
"typescript.validate.enable": false | ||
} |
Oops, something went wrong.