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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dependency directories
node_modules/
dist/
20 changes: 20 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"default": true,
"MD004": {
"style": "asterisk"
},
"MD009": false,
"MD012": false,
"MD013": false,
"MD014": false,
"MD025": false,
"MD026": false,
"MD033": false,
"MD034": false,
"MD040": false,
"MD041": false,
"MD047": false,
"MD049": {
"style": "asterisk"
}
}
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
28 changes: 28 additions & 0 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"use strict";

module.exports = {
extends: ["stylelint-config-standard-scss"],
rules: {
"alpha-value-notation": "number",
"at-rule-empty-line-before": null,
"color-function-notation": "legacy",
"color-hex-case": null,
"custom-property-empty-line-before": null,
"custom-property-pattern": null,
"declaration-block-no-duplicate-properties": [true, {
ignore: ["consecutive-duplicates-with-different-values"]
}],
"declaration-block-no-redundant-longhand-properties": null,
"declaration-block-no-shorthand-property-overrides": null,
"hue-degree-notation": "number",
indentation: 4,
"max-line-length": null,
"no-descending-specificity": null,
"number-leading-zero": null,
"number-no-trailing-zeros": null,
"property-no-unknown": null,
"property-no-vendor-prefix": null,
"selector-class-pattern": null,
"value-keyword-case": null
}
};
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eslint.experimental.useFlatConfig": true
}
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# code-explorer
# code-explorer

This repository contains the source code for the ESLint Explorer (<https://explorer.eslint.org>).

## Developer Setup

In order to run the website, you must have [Node.js](https://nodejs.org) installed.

1. Create a fork of the repository
2. Run `npm install` to install the dependencies
3. Run `npm start` to start the development server at <http://localhost:5173/>
100 changes: 100 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import eslintConfigESLintCJS from "eslint-config-eslint/cjs";
import globals from "globals";
import reactPlugin from "eslint-plugin-react";
import reactRecommended from "eslint-plugin-react/configs/recommended.js";
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import { fixupPluginRules } from "@eslint/compat";

export default [
{
ignores: [
"dist/"
]
},
...eslintConfigESLintCJS,
{
files: ["**/*.{js,jsx,cjs}"],
rules: {

// Disable rules that the codebase doesn't currently follow.
"jsdoc/require-jsdoc": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-param-description": "off",
"jsdoc/require-param-type": "off",
"jsdoc/no-bad-blocks": ["error", {
ignore: ["__PURE__"]
}],
"n/no-extraneous-require": ["error", {
allowModules: ["luxon"]
}]
}
},
{
files: ["**/*.{js,jsx}"],
languageOptions: {
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
}
},
{
files: ["**/*.cjs"],
languageOptions: {
sourceType: "script"
}
},
{
files: ["src/**/*.{js,jsx}"],
plugins: {
react: fixupPluginRules(reactPlugin),
"jsx-a11y": fixupPluginRules(jsxA11yPlugin),
"react-hooks": fixupPluginRules(reactHooksPlugin)
},
settings: {
react: {
version: "16.8.6"
}
},
languageOptions: {
globals: {
...globals.browser,
...globals.es2021
}
},
rules: {
...reactRecommended.rules,
...jsxA11yPlugin.configs.recommended.rules,
"react/jsx-no-useless-fragment": "error",
"react/jsx-no-target-blank": "error",

// Disable rules that the codebase doesn't currently follow.
// It might be a good idea to enable these in the future.
"jsx-a11y/no-onchange": "off",
"react/prop-types": "off",
"jsdoc/require-jsdoc": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",

// Disable eslint-plugin-node rules from eslint-config-eslint
"no-process-exit": "off",
"func-style": "off",
"n/no-deprecated-api": "off",
"n/no-extraneous-require": "off",
"n/no-missing-require": "off",
"n/no-unpublished-bin": "off",
"n/no-unpublished-require": "off",
"n/no-unsupported-features/es-builtins": "off",
"n/no-unsupported-features/es-syntax": "off",
"n/no-unsupported-features/node-builtins": "off",
"n/process-exit-as-throw": "off",
"n/shebang": "off",
"n/no-extraneous-import": "off",
"n/no-missing-import": "off",
"n/no-unpublished-import": "off"
}
}
];
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ESLint Explorer</title>
</head>
<body>
<div id="explorer-app"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading