Skip to content

Commit

Permalink
✏️ Fix typos, eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnart committed Jun 25, 2022
1 parent 315628e commit 4df6624
Show file tree
Hide file tree
Showing 11 changed files with 636 additions and 71 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
*.js
nodes_modules/
33 changes: 12 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
module.exports = {
extends: [
'mantine',
'plugin:@next/next/recommended',
'plugin:jest/recommended',
'plugin:storybook/recommended',
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
plugins: ['testing-library', 'jest', 'react-hooks', 'react', 'unused-imports'],
overrides: [
{
files: ['**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:markdown/recommended',
],
plugins: ['unused-imports'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/no-children-prop': 'off',
"unused-imports/no-unused-imports": "warn",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-imports": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-use-before-define": "off",
'unused-imports/no-unused-imports': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unused-imports': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-use-before-define': 'off',
},
};
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ data/configs
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions

# docusaurus
.docusaurus
26 changes: 13 additions & 13 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const config = {
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
Expand All @@ -49,13 +49,13 @@ const config = {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
},
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
{
navbar: {
title: 'Homarr',
logo: {
Expand All @@ -64,12 +64,14 @@ const config = {
},
items: [
{
type: "doc",
docId: "about",
label: "Documentation"
type: 'doc',
docId: 'about',
label: 'Documentation',
},
{
to: '/blog', label: 'Blog', position: 'left'
to: '/blog',
label: 'Blog',
position: 'left',
},
{
href: 'https://github.com/ajnart/homarr',
Expand All @@ -90,8 +92,8 @@ const config = {
},
{
label: 'Modules',
to: '/docs/modules/'
}
to: '/docs/modules/',
},
],
},
{
Expand Down Expand Up @@ -132,10 +134,8 @@ const config = {
disableSwitch: false,
respectPrefersColorScheme: true,
},
}),
plugins: [
require.resolve("@cmfcmf/docusaurus-search-local")
]
},
plugins: [require.resolve('@cmfcmf/docusaurus-search-local')],
};

module.exports = config;
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"version": "0.1.0",
"scripts": {
"docusaurus": "docusaurus",
"dev": "docusaurus start",
"prettier:check": "prettier --check \"**/*.{ts,tsx,js,jsx,md}\"",
"prettier:write": "prettier --write \"**/*.{ts,tsx,js,jsx,md}\"",
"lint": "eslint .",
"start": "docusaurus start",
"typecheck": "tsc --noEmit",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand All @@ -23,7 +28,15 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.21"
"@docusaurus/module-type-aliases": "^2.0.0-beta.21",
"@tsconfig/docusaurus": "^1.0.6",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"eslint-plugin-markdown": "^2.2.1",
"eslint-plugin-unused-imports": "^2.0.0",
"prettier": "^2.7.1",
"typescript": "^4.7.4"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],

// But you can create a sidebar manually
/*
Expand Down
15 changes: 8 additions & 7 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import styles from './styles.module.css';
const FeatureList = [
{
title: 'Modern and Simple Design',
Svg: require('@site/static/img/undraw_illustrations/undraw_futuristic_interface_re_0cm6.svg').default,
Svg: require('@site/static/img/undraw_illustrations/undraw_futuristic_interface_re_0cm6.svg')
.default,
description: (
<>
Homarr has a simple yet modern design for organizing your services at a central place.
</>
<>Homarr has a simple yet modern design for organizing your services at a central place.</>
),
},
{
title: 'Integrate existing services easily',
Svg: require('@site/static/img/undraw_illustrations/undraw_services_re_hu5n.svg').default,
description: (
<>
Homarr let's you integrate your existing services and applications easily and quick. Integrations can be tailored and configured to your needs.
Homarr let's you integrate your existing services and applications easily and quick.
Integrations can be tailored and configured to your needs.
</>
),
},
Expand All @@ -26,13 +26,14 @@ const FeatureList = [
Svg: require('@site/static/img/undraw_illustrations/undraw_body_text_re_9riw.svg').default,
description: (
<>
Homarr is open source and licensed under MIT. Users are welcome to contribute or sugest improvements 💪
Homarr is open source and licensed under MIT. Users are welcome to contribute or sugest
improvements 💪
</>
),
},
];

function Feature({Svg, title, description}) {
function Feature({ Svg, title, description }) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
Expand Down
10 changes: 7 additions & 3 deletions src/components/HomepageShowcase/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export default function HomepageShowcase() {
<section className={styles.showcase}>
<h2>Showcase</h2>

<img className={styles.showcase_image} src="https://user-images.githubusercontent.com/71191962/169860380-856634fb-4f41-47cb-ba54-6a9e7b3b9c81.gif" alt="homarr showcase gif" />
<img
className={styles.showcase_image}
src="https://user-images.githubusercontent.com/71191962/169860380-856634fb-4f41-47cb-ba54-6a9e7b3b9c81.gif"
alt="homarr showcase gif"
/>
</section>
)
}
);
}
15 changes: 5 additions & 10 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,29 @@ import HomepageShowcase from '@site/src/components/HomepageShowcase';
import styles from './index.module.css';

function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<img src="/img/favicon.png" height={200} />
<h1 className="hero__title">Homarr</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div style={{display: 'flex', justifyContent: 'center', flexWrap: "wrap", margin: -5}}>
<div style={{ display: 'flex', justifyContent: 'center', flexWrap: 'wrap', margin: -5 }}>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/quick-start/index">
<Link className="button button--secondary button--lg" to="/docs/quick-start/index">
Get Started with Homarr 🚀
</Link>
</div>
</div>

</div>
</header>
);
}

export default function Home() {
const {siteConfig} = useDocusaurusContext();
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={siteConfig.title}
description="">
<Layout title={siteConfig.title} description="">
<HomepageHeader />
<main>
<HomepageFeatures />
Expand Down
33 changes: 33 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": [
"**/*.ts",
"**/*.jsx",
"**/*.js",
"**/*.tsx",
"**/*.md"
],
"exclude": [
"node_modules"
]
}
Loading

0 comments on commit 4df6624

Please sign in to comment.