1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 09:45:22 -04:00

more eslint/prettier cleanup

This commit is contained in:
Jake Jarvis 2022-08-28 15:01:35 -04:00
parent a73f6a9c30
commit 69a0a25063
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
5 changed files with 32 additions and 23 deletions

View File

@ -12,34 +12,34 @@ module.exports = {
],
plugins: ["@typescript-eslint", "prettier"],
rules: {
camelcase: "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "warn",
"react/no-unescaped-entities": "off",
"prettier/prettier": [
"react/jsx-boolean-value": "error",
"react/jsx-wrap-multilines": [
"error",
{
// normal .prettierrc config:
singleQuote: false,
tabWidth: 2,
printWidth: 120,
// https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/jsx-wrap-multilines.md#rule-details
arrow: "parens-new-line",
assignment: "parens-new-line",
condition: "parens-new-line",
declaration: "parens-new-line",
logical: "parens-new-line",
prop: "ignore",
return: "parens-new-line",
},
],
"prettier/prettier": ["error", {}, { usePrettierrc: true }],
},
overrides: [
{
files: ["*.md", "*.mdx"],
extends: ["plugin:mdx/recommended"],
rules: {
"import/no-unresolved": "off",
"react/jsx-no-undef": "off",
"prettier/prettier": [
"error",
{
// normal .prettierrc config:
singleQuote: false,
tabWidth: 2,
printWidth: 120,
},
],
"react/jsx-boolean-value": "off", // TODO: causes some inconsistent parser errors in mdx
},
},
],

10
.prettierrc.js Normal file
View File

@ -0,0 +1,10 @@
// https://prettier.io/docs/en/options.html
module.exports = {
singleQuote: false,
jsxSingleQuote: false,
printWidth: 120,
tabWidth: 2,
useTabs: false,
quoteProps: "as-needed",
trailingComma: "es5",
};

14
package-lock.json generated
View File

@ -56,7 +56,7 @@
"remark-smartypants": "^2.0.0",
"remark-unwrap-images": "^3.0.1",
"remove-markdown": "^0.5.0",
"simple-icons": "^7.8.0",
"simple-icons": "^7.9.0",
"sitemap": "^7.1.1",
"swr": "^1.3.0"
},
@ -10287,9 +10287,9 @@
}
},
"node_modules/simple-icons": {
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.8.0.tgz",
"integrity": "sha512-OBg/5e+HRphOS3R/YmJI5tvMssot2DXwNlLoN1yWiVM23BzurDBprkLgIgHn7pG2PXE5zPZujT3QVPLQYdUGDQ==",
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.9.0.tgz",
"integrity": "sha512-9QhI6CVcEaIqv7dnxEIsX2k80n4hdCGa++8E6XRktv7ir/W7Cq8r+wfE+FDNpAH0mFJ7qiOz/nTL7VYEI5jhTw==",
"engines": {
"node": ">=0.12.18"
},
@ -18648,9 +18648,9 @@
"dev": true
},
"simple-icons": {
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.8.0.tgz",
"integrity": "sha512-OBg/5e+HRphOS3R/YmJI5tvMssot2DXwNlLoN1yWiVM23BzurDBprkLgIgHn7pG2PXE5zPZujT3QVPLQYdUGDQ=="
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.9.0.tgz",
"integrity": "sha512-9QhI6CVcEaIqv7dnxEIsX2k80n4hdCGa++8E6XRktv7ir/W7Cq8r+wfE+FDNpAH0mFJ7qiOz/nTL7VYEI5jhTw=="
},
"simple-swizzle": {
"version": "0.2.2",

View File

@ -66,7 +66,7 @@
"remark-smartypants": "^2.0.0",
"remark-unwrap-images": "^3.0.1",
"remove-markdown": "^0.5.0",
"simple-icons": "^7.8.0",
"simple-icons": "^7.9.0",
"sitemap": "^7.1.1",
"swr": "^1.3.0"
},

View File

@ -1,4 +1,3 @@
/* eslint-disable camelcase */
import { NextSeo } from "next-seo";
import Layout from "../components/Layout";
import Content from "../components/Content";