Skip to content

Commit f45388f

Browse files
committed
chore: expand linting to be more inclusive of other files in the project
1 parent fad95ce commit f45388f

File tree

7 files changed

+30
-28
lines changed

7 files changed

+30
-28
lines changed

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
docs
22
node_modules
33
coverage
4+
temp
5+
dist
6+
etc
7+
coverage
8+
build
9+
fixtures
10+
example

example/index.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ process.argv.slice(2).forEach((arg) => {
1818
const fs = require('fs');
1919
const path = require('path');
2020

21-
const { Git : Server } = require("../");
21+
const { Git: Server } = require('../');
2222

2323
const port = process.env.PORT || 7005;
2424

@@ -43,7 +43,7 @@ const repos = new Server(path.normalize(path.resolve(__dirname, 'tmp')), {
4343
});
4444

4545
repos.on('push', (push) => {
46-
console.log(`push ${push.repo} / ${push.commit} ( ${push.branch} )`); // eslint-disable-line
46+
console.log(`push ${push.repo} / ${push.commit} ( ${push.branch} )`); // eslint-disable-line
4747

4848
repos.list((err, results) => {
4949
push.log(' ');
@@ -59,8 +59,8 @@ repos.on('push', (push) => {
5959
});
6060

6161
repos.on('fetch', (fetch) => {
62-
console.log(`username ${fetch.username}`); // eslint-disable-line
63-
console.log(`fetch ${fetch.repo}/${fetch.commit}`); // eslint-disable-line
62+
console.log(`username ${fetch.username}`); // eslint-disable-line
63+
console.log(`fetch ${fetch.repo}/${fetch.commit}`); // eslint-disable-line
6464
fetch.accept();
6565
});
6666

@@ -72,13 +72,16 @@ repos.listen(
7272
cert: fs.readFileSync(path.resolve(__dirname, 'certificate.pem')),
7373
},
7474
(error) => {
75-
if(error) return console.error(`failed to start git-server because of error ${error}`); // eslint-disable-line
75+
if (error)
76+
return console.error(
77+
`failed to start git-server because of error ${error}`
78+
); // eslint-disable-line
7679
console.log(`node-git-server running at ${type}://localhost:${port}`); // eslint-disable-line
7780
repos.list((err, result) => {
7881
if (!result) {
79-
console.log("No repositories available..."); // eslint-disable-line
82+
console.log('No repositories available...'); // eslint-disable-line
8083
} else {
81-
console.log(result); // eslint-disable-line
84+
console.log(result); // eslint-disable-line
8285
}
8386
});
8487
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"node": ">= 16"
2828
},
2929
"scripts": {
30-
"lint": "eslint src/*",
30+
"lint": "eslint .",
3131
"test": "vitest src/*.test.ts",
3232
"build": "echo \"\" > ./build-complete.meta && tsc",
3333
"coverage": "vitest --coverage",

website/babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
module.exports = {
23
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
34
};

website/docusaurus.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
2+
/* eslint-disable no-undef */
13
// @ts-check
24
// Note: type annotations allow type checking and IDEs autocompletion
35

website/sidebars.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,8 @@
1313

1414
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
1515
const sidebars = {
16-
// By default, Docusaurus generates a sidebar from the docs folder structure
17-
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
18-
19-
// But you can create a sidebar manually
20-
/*
21-
tutorialSidebar: [
22-
{
23-
type: 'category',
24-
label: 'Tutorial',
25-
items: ['hello'],
26-
},
27-
],
28-
*/
16+
sidebar: [{ type: 'autogenerated', dirName: '.' }],
2917
};
3018

19+
// eslint-disable-next-line no-undef
3120
module.exports = sidebars;

website/src/pages/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import React from "react";
2-
import clsx from "clsx";
3-
import Layout from "@theme/Layout";
4-
import Link from "@docusaurus/Link";
5-
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
6-
import styles from "./index.module.css";
1+
import React from 'react';
2+
import clsx from 'clsx';
3+
import Layout from '@theme/Layout';
4+
import Link from '@docusaurus/Link';
5+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
6+
import styles from './index.module.css';
77

88
function HomepageHeader() {
99
const { siteConfig } = useDocusaurusContext();
1010
return (
11-
<header className={clsx("hero hero--primary", styles.heroBanner)}>
11+
<header className={clsx('hero hero--primary', styles.heroBanner)}>
1212
<div className="container">
1313
<h1 className="hero__title">{siteConfig.title}</h1>
1414
<p className="hero__subtitle">{siteConfig.tagline}</p>

0 commit comments

Comments
 (0)