-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap to yarn berry and added useful plugins, enforce ts
Copy over eslint, prettier, some yarn commands from Buddies of Budgie.
- Loading branch information
1 parent
dece691
commit 8b0894a
Showing
16 changed files
with
13,164 additions
and
21,823 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,22 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { "project": ["./tsconfig.json"] }, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/prefer-for-of": "error", | ||
"@typescript-eslint/prefer-includes": "error", | ||
"@typescript-eslint/prefer-nullish-coalescing": "error", | ||
"@typescript-eslint/prefer-optional-chain": "error", | ||
"@typescript-eslint/prefer-string-starts-ends-with": "error" | ||
}, | ||
"ignorePatterns": ["**/dist/*", "next.config.js"] | ||
} |
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 @@ | ||
node |
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,17 @@ | ||
# Build artifacts | ||
**/.husky | ||
**/.next | ||
**/.turbo | ||
**/.yarn | ||
**/dist | ||
|
||
node_modules/ | ||
**/node_modules | ||
|
||
# Infra for now until we know prettier doesn't do anything silly to our kubectl files | ||
**/infra/ | ||
|
||
# LICENSE should not be touched | ||
LICENSE.md | ||
package.json | ||
yarn.lock |
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,7 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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,5 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
yarn-path ".yarn/releases/yarn-1.22.19.cjs" |
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,9 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.5.1.cjs |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ This is the repository for Solus's Help Center documentation. This repository ex | |
Stumbled on this repo and have no idea what any of this is? Check out the [Solus](https://getsol.us) operating system! | ||
|
||
## Updating local repos after docusarus switch | ||
|
||
``` | ||
git branch -m master old-help-center | ||
git branch -m docusarus master | ||
|
@@ -13,25 +14,49 @@ git branch -u origin/master master | |
git remote set-head origin -a | ||
``` | ||
|
||
## Running Locally | ||
## Getting Started | ||
|
||
To get started developing our Docusaurus instance, or writing documentation, first [fork this project](https://github.com/getsolus/help-center-docs/fork) in order to submit pull requests for your changes | ||
|
||
This project is written using [TypeScript](https://www.typescriptlang.org) and [React](https://reactjs.org), with some documentation being Markdown or [MDX](https://mdxjs.com/). To facilitate development, we use nvm and Yarn. | ||
|
||
### NVM | ||
|
||
To set up nvm, the Node Version Manager, follow the instructions listed [here](https://github.com/nvm-sh/nvm#readme). We recommend [setting up their shell integration](https://github.com/nvm-sh/nvm#deeper-shell-integration) as well, so you can automatically switch to the correct Node version when working on this project. Otherwise, ensure you run `nvm use`. This project requires the "current" supported release series of Node. | ||
|
||
You can validate you are using the latest by running `node --version`. Your version should be at least 19.x. | ||
|
||
### Yarn | ||
|
||
This project makes use of [Yarn](https://yarnpkg.com/) for its package management. After setting up nvm and ensuring you are running the latest Node, run: | ||
|
||
``` | ||
corepack enable | ||
``` | ||
|
||
### Installing Dependencies | ||
|
||
To install the required dependencies, run: `yarn` | ||
|
||
`npm install` | ||
`npm start` | ||
### Starting Docusaurus | ||
|
||
# Generate a static site | ||
To start the live reloading Docusaurus, run: `yarn start` | ||
|
||
`npm run build` | ||
`npm run serve` | ||
### Other Useful Commands | ||
|
||
This is needed to test searching | ||
- Clear local build cache: `yarn clear` | ||
- Linting: `yarn lint` | ||
- Updating translation files: `yarn write-translations` | ||
- Validate build: `yarn build` | ||
- Run validated build: `yarn serve` | ||
|
||
## Publishing to https://help.getsol.us (via GH Pages) | ||
|
||
Ensure that you can successfully generate a static site as above. | ||
|
||
Then, when you're ready to deploy, run the following: | ||
|
||
`USE_SSH=true npm run deploy` | ||
`USE_SSH=true yarn run deploy` | ||
|
||
This obviously assumes that you have ssh push access to the help-center-docs repo and are using `[email protected]:getsolus/help-center-docs.git` (as listed by `git config -l`). | ||
|
||
|
@@ -41,7 +66,6 @@ This obviously assumes that you have ssh push access to the help-center-docs rep | |
|
||
When updating an article, remember to update the date. | ||
|
||
|
||
### Multi-Lingual Documents | ||
|
||
Note that multi-lingual documents are not yet supported on our Help Center. When it does, we'll be happy to accept non-English language documents. | ||
|
Oops, something went wrong.