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.
fix: include
.jsx
files when the options set to true
- Loading branch information
Showing
10 changed files
with
434 additions
and
301 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,27 @@ | ||
export function HelloWorld({ | ||
greeting = 'hello', | ||
greeted = '"World"', | ||
silent = false, | ||
onMouseOver, | ||
}) { | ||
if (!greeting) { | ||
return null | ||
}; | ||
|
||
// TODO: Don't use random in render | ||
const num = Math.floor (Math.random() * 1e+7).toString() | ||
.replace(/\.\d+/g, '') | ||
|
||
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> | ||
) | ||
} |
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,32 @@ | ||
export function Component1() { | ||
return <div /> | ||
} | ||
|
||
export function jsx2() { | ||
const props = { a: 1, b: 2 } | ||
return ( | ||
<a foo="bar" bar="foo"> | ||
<div | ||
{...props} | ||
a={1} | ||
b="2" | ||
> | ||
Inline Text | ||
</div> | ||
<Component1> | ||
Block Text | ||
</Component1> | ||
<div> | ||
Mixed | ||
<div>Foo</div> | ||
Text | ||
<b> Bar</b> | ||
</div> | ||
<p> | ||
foo | ||
<i>bar</i> | ||
<b>baz</b> | ||
</p> | ||
</a> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@antfu/eslint-config", | ||
"type": "module", | ||
"version": "2.20.0", | ||
"packageManager": "pnpm@9.1.4", | ||
"packageManager": "pnpm@9.2.0", | ||
"description": "Anthony's ESLint config", | ||
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)", | ||
"license": "MIT", | ||
|
@@ -99,19 +99,19 @@ | |
"@antfu/install-pkg": "^0.3.3", | ||
"@clack/prompts": "^0.7.0", | ||
"@stylistic/eslint-plugin": "^2.1.0", | ||
"@typescript-eslint/eslint-plugin": "^7.11.0", | ||
"@typescript-eslint/parser": "^7.11.0", | ||
"@typescript-eslint/eslint-plugin": "^7.12.0", | ||
"@typescript-eslint/parser": "^7.12.0", | ||
"eslint-config-flat-gitignore": "^0.1.5", | ||
"eslint-flat-config-utils": "^0.2.5", | ||
"eslint-merge-processors": "^0.1.0", | ||
"eslint-plugin-antfu": "^2.3.3", | ||
"eslint-plugin-command": "^0.2.3", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-import-x": "^0.5.1", | ||
"eslint-plugin-jsdoc": "^48.2.7", | ||
"eslint-plugin-jsdoc": "^48.2.9", | ||
"eslint-plugin-jsonc": "^2.16.0", | ||
"eslint-plugin-markdown": "^5.0.0", | ||
"eslint-plugin-n": "^17.7.0", | ||
"eslint-plugin-n": "^17.8.1", | ||
"eslint-plugin-no-only-tests": "^3.1.0", | ||
"eslint-plugin-perfectionist": "^2.10.0", | ||
"eslint-plugin-regexp": "^2.6.0", | ||
|
@@ -122,7 +122,7 @@ | |
"eslint-plugin-vue": "^9.26.0", | ||
"eslint-plugin-yml": "^1.14.0", | ||
"eslint-processor-vue-blocks": "^0.1.2", | ||
"globals": "^15.3.0", | ||
"globals": "^15.4.0", | ||
"jsonc-eslint-parser": "^2.4.0", | ||
"local-pkg": "^0.5.0", | ||
"parse-gitignore": "^2.0.0", | ||
|
@@ -135,13 +135,13 @@ | |
"devDependencies": { | ||
"@antfu/eslint-config": "workspace:*", | ||
"@antfu/ni": "^0.21.12", | ||
"@eslint-react/eslint-plugin": "^1.5.14", | ||
"@eslint-react/eslint-plugin": "^1.5.15", | ||
"@eslint/config-inspector": "^0.4.10", | ||
"@prettier/plugin-xml": "^3.4.1", | ||
"@stylistic/eslint-plugin-migrate": "^2.1.0", | ||
"@types/eslint": "^8.56.10", | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/node": "^20.13.0", | ||
"@types/node": "^20.14.2", | ||
"@types/prompts": "^2.4.9", | ||
"@types/yargs": "^17.0.32", | ||
"@unocss/eslint-plugin": "^0.60.4", | ||
|
@@ -157,18 +157,18 @@ | |
"eslint-ts-patch": "9.4.0-0", | ||
"eslint-typegen": "^0.2.4", | ||
"esno": "^4.7.0", | ||
"execa": "^9.1.0", | ||
"execa": "^9.2.0", | ||
"fast-glob": "^3.3.2", | ||
"fs-extra": "^11.2.0", | ||
"lint-staged": "^15.2.5", | ||
"prettier-plugin-astro": "^0.14.0", | ||
"prettier-plugin-slidev": "^1.0.5", | ||
"rimraf": "^5.0.7", | ||
"simple-git-hooks": "^2.11.1", | ||
"svelte": "^4.2.17", | ||
"svelte": "^4.2.18", | ||
"svelte-eslint-parser": "^0.36.0", | ||
"tsup": "^8.0.2", | ||
"tsx": "^4.11.0", | ||
"tsup": "^8.1.0", | ||
"tsx": "^4.14.0", | ||
"typescript": "^5.4.5", | ||
"vitest": "^1.6.0", | ||
"vue": "^3.4.27" | ||
|
Oops, something went wrong.