Skip to content

Commit 9274816

Browse files
committed
style: prettier
1 parent ca5d5b1 commit 9274816

File tree

17 files changed

+168
-82
lines changed

17 files changed

+168
-82
lines changed

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.idea/*
2+
.next/*
3+
node_modules/*
4+
5+
next-env.d.ts
6+
package-lock.json

.eslintrc.json

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,62 @@
22
"extends": [
33
"next",
44
"next/core-web-vitals",
5-
"next/typescript"
6-
]
7-
}
5+
"next/typescript",
6+
"prettier"
7+
],
8+
"plugins": ["@typescript-eslint"],
9+
"rules": {
10+
// Todo: investigate, for each of these rules, whether we want them.
11+
"@typescript-eslint/array-type": "off",
12+
"@typescript-eslint/ban-ts-comment": "off",
13+
"@typescript-eslint/ban-tslint-comment": "off",
14+
"@typescript-eslint/ban-types": "off",
15+
"@typescript-eslint/class-literal-property-style": "off",
16+
"@typescript-eslint/consistent-generic-constructors": "off",
17+
"@typescript-eslint/consistent-indexed-object-style": "off",
18+
"@typescript-eslint/consistent-type-definitions": "off",
19+
"@typescript-eslint/no-empty-function": "off",
20+
"@typescript-eslint/no-namespace": "off",
21+
"@typescript-eslint/no-shadow": "off",
22+
"@typescript-eslint/no-empty-interface": "off",
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"@typescript-eslint/no-inferrable-types": "off",
25+
"@typescript-eslint/no-var-requires": "off",
26+
"@typescript-eslint/prefer-for-of": "off",
27+
"@typescript-eslint/prefer-function-type": "off",
28+
"@typescript-eslint/no-this-alias": "off",
29+
"@typescript-eslint/triple-slash-reference": "off",
30+
"no-var": "off",
31+
"prefer-const": "off",
32+
"prefer-rest-params": "off",
33+
"prefer-spread": "off",
34+
35+
// These off- or differently-configured rules work well for us.
36+
"no-unused-expressions": "off",
37+
"@typescript-eslint/no-unused-expressions": [
38+
"error",
39+
{
40+
"allowShortCircuit": true,
41+
"allowTernary": true,
42+
"allowTaggedTemplates": true
43+
}
44+
],
45+
"no-unused-vars": "off",
46+
"@typescript-eslint/no-unused-vars": [
47+
"error",
48+
{
49+
"args": "none",
50+
"ignoreRestSiblings": true,
51+
"argsIgnorePattern": "^_",
52+
"caughtErrorsIgnorePattern": "^_",
53+
"destructuredArrayIgnorePattern": "^_",
54+
"varsIgnorePattern": "^_"
55+
}
56+
],
57+
"no-use-before-define": "off",
58+
"no-useless-constructor": "off",
59+
"@typescript-eslint/no-use-before-define": "off",
60+
"@typescript-eslint/no-useless-constructor": "error",
61+
"@typescript-eslint/prefer-literal-enum-member": "error"
62+
}
63+
}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Use Node.js
1919
uses: actions/[email protected]
2020
with:
21-
node-version: '20.13.1'
21+
node-version: "20.13.1"
2222

2323
- name: Install dependencies
2424
run: npm install

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.md
2+
*.scss

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "es5",
3+
"singleQuote": true,
4+
"semi": false
5+
}

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

app/about/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react";
1+
import React from 'react'
22

33
export default function About() {
4-
return (
5-
<>
6-
<p> about </p>
7-
</>
8-
);
4+
return (
5+
<>
6+
<p> about </p>
7+
</>
8+
)
99
}

app/components/footer.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react";
1+
import React from 'react'
22

33
export default function Footer() {
4-
return (
5-
<footer className="flex flex-row justify-center p-4">
6-
<p className="text-xs font-bold">&copy; 2021 PossibleGames</p>
7-
</footer>
8-
);
4+
return (
5+
<footer className="flex flex-row justify-center p-4">
6+
<p className="text-xs font-bold">&copy; 2021 PossibleGames</p>
7+
</footer>
8+
)
99
}

app/components/header.tsx

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1-
import React from "react";
1+
import React from 'react'
22

33
export default function Header() {
4-
return (
5-
<header className="flex flex-row justify-between items-center p-4">
6-
<div className="text-xl font-bold">
7-
<a href="/">PossibleGames</a>
8-
</div>
4+
return (
5+
<header className="flex flex-row justify-between items-center p-4">
6+
<div className="text-xl font-bold">
7+
<a href="/">PossibleGames</a>
8+
</div>
99

10-
<nav>
11-
<ul className="flex space-x-6">
12-
<li><a href="about" className="hover:underline">About</a></li>
13-
<li><a href="contact" className="hover:underline">Contact</a></li>
14-
<li><a href="documentation" className="hover:underline">Documentation</a></li>
15-
</ul>
16-
</nav>
17-
</header>
18-
);
10+
<nav>
11+
<ul className="flex space-x-6">
12+
<li>
13+
<a href="about" className="hover:underline">
14+
About
15+
</a>
16+
</li>
17+
<li>
18+
<a href="contact" className="hover:underline">
19+
Contact
20+
</a>
21+
</li>
22+
<li>
23+
<a href="documentation" className="hover:underline">
24+
Documentation
25+
</a>
26+
</li>
27+
</ul>
28+
</nav>
29+
</header>
30+
)
1931
}

app/contact/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react";
1+
import React from 'react'
22

33
export default function Contact() {
4-
return (
5-
<>
6-
<p> contact </p>
7-
</>
8-
);
4+
return (
5+
<>
6+
<p> contact </p>
7+
</>
8+
)
99
}

0 commit comments

Comments
 (0)