forked from mysticatea/eslint-plugin-eslint-comments
-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
33 changed files
with
1,747 additions
and
292 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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
!.vuepress | ||
!.vitepress | ||
|
||
/coverage | ||
/docs/.vuepress/dist | ||
/docs/.vitepress/dist | ||
/docs/.vitepress/cache | ||
/node_modules |
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,7 +1,8 @@ | ||
/.nyc_output | ||
/.vscode | ||
/coverage | ||
/docs/.vuepress/dist | ||
/docs/.vitepress/dist | ||
/docs/.vitepress/cache | ||
/node_modules | ||
/npm-debug.log | ||
/test.js |
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,26 @@ | ||
"use strict" | ||
|
||
module.exports = { | ||
rules: { | ||
"n/no-missing-import": "off", | ||
"n/no-extraneous-import": "off", | ||
"n/file-extension-in-import": "off", | ||
"n/no-extraneous-require": "off", | ||
}, | ||
globals: { | ||
window: "readonly", | ||
document: "readonly", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.vue"], | ||
rules: { | ||
"vue/multiline-html-element-content-newline": "off", | ||
"vue/singleline-html-element-content-newline": "off", | ||
"vue/name-property-casing": "off", | ||
"vue/html-self-closing": "off", | ||
"vue/comma-dangle": "off", | ||
}, | ||
}, | ||
], | ||
} |
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,74 @@ | ||
import { defineConfig } from "vitepress" | ||
import path from "path" | ||
import { fileURLToPath } from "url" | ||
import { vitePluginGetLinter, viteCommonjs } from "./vite-plugin.mjs" | ||
import eslint4b from "vite-plugin-eslint4b" | ||
import { createRequire } from "module" | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
const require = createRequire(import.meta.url) | ||
|
||
const { withCategories } = require("../../scripts/lib/rules") | ||
require("../../scripts/update-docs-headers") | ||
require("../../scripts/update-docs-index") | ||
|
||
export default defineConfig({ | ||
title: "eslint-plugin-eslint-comments", | ||
base: "/eslint-plugin-eslint-comments/", | ||
description: "Additional ESLint rules for ESLint directive comments.", | ||
head: [["link", { rel: "icon", href: "/favicon.png" }]], | ||
|
||
outDir: path.resolve(__dirname, "./dist/eslint-plugin-eslint-comments"), | ||
vite: { | ||
publicDir: path.resolve(__dirname, "./public"), | ||
plugins: [eslint4b(), vitePluginGetLinter(), viteCommonjs()], | ||
define: { | ||
MONACO_EDITOR_VERSION: JSON.stringify( | ||
require("monaco-editor/package.json").version | ||
), | ||
}, | ||
}, | ||
|
||
lastUpdated: true, | ||
themeConfig: { | ||
search: { | ||
provider: "local", | ||
options: { | ||
detailedView: true, | ||
}, | ||
}, | ||
editLink: { | ||
pattern: | ||
"https://github.com/eslint-community/eslint-plugin-eslint-comments/edit/main/docs/:path", | ||
}, | ||
socialLinks: [ | ||
{ | ||
icon: "github", | ||
link: "https://github.com/eslint-community/eslint-plugin-eslint-comments", | ||
}, | ||
], | ||
|
||
nav: [ | ||
{ text: "Guide", link: "/" }, | ||
{ text: "Rules", link: "/rules/" }, | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
items: [ | ||
{ text: "Guide", link: "/" }, | ||
{ text: "Available Rules", link: "/rules/" }, | ||
], | ||
}, | ||
...withCategories.map(({ category, rules }) => ({ | ||
text: `Rules in ${category}`, | ||
collapsable: false, | ||
items: rules.map((rule) => ({ | ||
text: `eslint-comments/${rule.name}`, | ||
link: `/rules/${rule.name}`, | ||
})), | ||
})), | ||
], | ||
}, | ||
}) |
Oops, something went wrong.