Skip to content

Commit

Permalink
Fixes #2792 Set up Docusaurus website (#2853)
Browse files Browse the repository at this point in the history
set up docusaurus website
  • Loading branch information
cindyorangis authored Feb 9, 2022
1 parent eaf4bdd commit 34b3790
Show file tree
Hide file tree
Showing 43 changed files with 5,889 additions and 581 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,44 @@ module.exports = {
plugins: ['react-native'],
rules: { 'no-use-before-define': 'off' },
},

// Docusaurus app
{
files: ['src/docs/src/**/*.js'],
extends: [
'plugin:import/typescript',
'plugin:node/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['react', 'react-hooks'],
rules: {
// https://github.com/facebook/docusaurus/blob/main/.eslintrc.js#L122
// Ignore certain webpack aliases because they can't be resolved
'import/no-unresolved': [
'off',
{
ignore: ['^@theme', '^@docusaurus', '^@generated', '^@site'],
},
],
'global-require': 'off',
'no-use-before-define': 'off',
'node/no-missing-import': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }],
// https://github.com/facebook/docusaurus/blob/main/.eslintrc.js#L154
// We build a static site, and nearly all components don't change.
'react/no-array-index-key': 'off',
'react/prop-types': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
},
],

// Default rules for any file we lint
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ src/api/status/public/assets
src/web/public/sw*
src/web/public/workbox*
src/api/status/src/views

# Ignore these directories for the docusaurus docs website
src/docs/.docusaurus
src/docs/build
src/docs/node_modules/
src/docs/package.json
src/docs/package-lock.json
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"eslint-plugin-jest": "25.3.4",
"eslint-plugin-jest-playwright": "0.2.1",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "3.4.1",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-react": "7.28.0",
Expand Down
Loading

0 comments on commit 34b3790

Please sign in to comment.