forked from antfu/eslint-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
5,757 additions
and
3,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* @see https://prettier.io/docs/en/configuration.html | ||
* @type {import("prettier").Config} | ||
*/ | ||
const config = { | ||
// trailingComma: "es5", | ||
|
||
plugins: [ | ||
"prettier-plugin-packagejson", | ||
"@trivago/prettier-plugin-sort-imports", | ||
"prettier-plugin-slidev", | ||
"prettier-plugin-astro", | ||
"prettier-plugin-tailwindcss", // must come last | ||
], | ||
|
||
// /** | ||
// * @see https://github.com/tailwindlabs/prettier-plugin-tailwindcss#resolving-your-tailwind-configuration | ||
// */ | ||
// tailwindConfig: "./apps/frontend/tailwind.config.ts", | ||
|
||
/** | ||
* @see https://github.com/tailwindlabs/prettier-plugin-tailwindcss#resolving-your-tailwind-configuration | ||
*/ | ||
importOrder: [ | ||
"^react$", | ||
"<THIRD_PARTY_MODULES>", | ||
// Internal modules | ||
"^@nspec/(.*)$", | ||
// TypeScript TSConfig path aliases | ||
"^@/(.*)$", | ||
// Relative imports | ||
"^[./]", | ||
], | ||
importOrderSortSpecifiers: true, | ||
|
||
overrides: [ | ||
{ | ||
files: "*.svg", | ||
options: { | ||
parser: "html", | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
--- | ||
const isJsx = true | ||
const isJsx = true; | ||
const content = "hi!"; | ||
--- | ||
|
||
<article> | ||
<div>{content}</div> | ||
<div> | ||
{isJsx && ( | ||
<h1>{content}</h1> | ||
)} | ||
{isJsx && <h1>{content}</h1>} | ||
</div> | ||
</article> | ||
|
||
|
||
<script> | ||
let { log: logger } = console | ||
document.querySelector('h1')?.addEventListener('click', () => { | ||
logger('clicked'); | ||
let { log: logger } = console; | ||
document.querySelector("h1")?.addEventListener("click", () => { | ||
logger("clicked"); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
@media (max-width: 480px) { | ||
.bd-examples {margin-right: -.75rem;margin-left: -.75rem | ||
.bd-examples { | ||
margin-right: -0.75rem; | ||
margin-left: -0.75rem; | ||
} | ||
|
||
.bd-examples>[class^="col-"] { | ||
padding-right: .75rem; | ||
padding-left: .75rem; | ||
|
||
|
||
.bd-examples > [class^="col-"] { | ||
padding-right: 0.75rem; | ||
padding-left: 0.75rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
<!DOCTYPE html> | ||
<HTML CLASS="no-js mY-ClAsS"> | ||
<HEAD> | ||
<META CHARSET="utf-8"> | ||
<TITLE>My tITlE</TITLE> | ||
<META NAME="description" content="My CoNtEnT"> | ||
</HEAD> | ||
<!doctype html> | ||
<html class="no-js mY-ClAsS"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>My tITlE</title> | ||
<meta name="description" content="My CoNtEnT" /> | ||
</head> | ||
<body> | ||
<P>Hello world!<BR> This is HTML5 Boilerplate.</P> | ||
<SCRIPT> | ||
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date; | ||
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview') | ||
</SCRIPT> | ||
<SCRIPT | ||
src="https://www.google-analytics.com/analytics.js" ASYNC DEFER></SCRIPT> | ||
<p> | ||
Hello world!<br /> | ||
This is HTML5 Boilerplate. | ||
</p> | ||
<script> | ||
window.ga = function () { | ||
ga.q.push(arguments); | ||
}; | ||
ga.q = []; | ||
ga.l = +new Date(); | ||
ga("create", "UA-XXXXX-Y", "auto"); | ||
ga("send", "pageview"); | ||
</script> | ||
<script | ||
src="https://www.google-analytics.com/analytics.js" | ||
async | ||
defer | ||
></script> | ||
</body> | ||
</HTML> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,34 @@ | ||
export function HelloWorld({ | ||
greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) { | ||
greeting = "hello", | ||
greeted = '"World"', | ||
silent = false, | ||
onMouseOver, | ||
}) { | ||
if (!greeting) { | ||
return null; | ||
} | ||
|
||
if(!greeting){ | ||
return null}; | ||
|
||
// TODO: Don't use random in render | ||
let num = Math.floor (Math.random() * 1E+7).toString() | ||
.replace(/\.\d+/ig, "") | ||
|
||
return <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}> | ||
<strong>{ greeting.slice( 0, 1 ).toUpperCase() + greeting.slice(1).toLowerCase() }</strong> | ||
{greeting.endsWith(",") | ||
? " " : <span style={{color: '\grey'}}>", "</span> } | ||
<em> | ||
{ greeted } | ||
</em> | ||
{ (silent)? ".": "!"} | ||
</div>; | ||
// TODO: Don't use random in render | ||
let num = Math.floor(Math.random() * 1e7) | ||
.toString() | ||
.replace(/\.\d+/gi, ""); | ||
|
||
return ( | ||
<div | ||
className="HelloWorld" | ||
title={`You are visitor number ${num}`} | ||
onMouseOver={onMouseOver} | ||
> | ||
<strong> | ||
{greeting.slice(0, 1).toUpperCase() + greeting.slice(1).toLowerCase()} | ||
</strong> | ||
{greeting.endsWith(",") ? ( | ||
" " | ||
) : ( | ||
<span style={{ color: "grey" }}>", "</span> | ||
)} | ||
<em>{greeted}</em> | ||
{silent ? "." : "!"} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.