Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import { fixupConfigRules } from "@eslint/compat";


export default [
{files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"]},
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...fixupConfigRules(pluginReactConfig),
];
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "pr-reviewer_test",
"version": "0.0.0",
"main": "index.js",
"scripts": {
"test": "vitest run",
"test:watch": "vitest"
},
"keywords": [],
"author": "",
"license": "UNLICENSED",
"description": "",
"devDependencies": {
"@eslint/compat": "^1.2.3",
"@eslint/js": "^9.15.0",
"eslint": "^9.15.0",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.12.0",
"react": "^19.0.0",
"stylelint": "^16.11.0",
"stylelint-config-standard": "^36.0.1",
"typescript": "^5.7.2",
"typescript-eslint": "8.16.0",
"vitest": "^3.0.4"
},
"type": "module"
}
11 changes: 11 additions & 0 deletions sampleReact.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function TestComponent() {
// ruleid:react-dangerouslysetinnerhtml
return <div dangerouslySetInnerHTML={createMarkup()} />;
}

function OkComponent() {
// OK
const discordClientKey = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ';
return {__html: 'Первый &middot; Второй'};
}