@neon-pixels/eslint-config 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +110 -2
- package/index.d.ts +5 -0
- package/index.js +3 -0
- package/lib/base.js +40 -0
- package/lib/clerk.js +62 -0
- package/lib/vue.js +26 -0
- package/node.d.ts +5 -0
- package/node.js +7 -0
- package/nuxt.d.ts +11 -0
- package/nuxt.js +27 -0
- package/package.json +83 -3
- package/vitepress.d.ts +5 -0
- package/vitepress.js +17 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Neon Pixels Studio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,111 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @neon-pixels/eslint-config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared [ESLint](https://eslint.org) flat configuration for Neon Pixels projects. One base, three stacks.
|
|
4
|
+
|
|
5
|
+
All entry points share the same base: `@eslint/js` recommended, `typescript-eslint` recommended (TypeScript parsing), unused variables as errors (names starting with `_` are exempt), and `eslint-config-prettier` as the last element so formatting stays Prettier's job.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
ESLint and the plugins are peer dependencies, so the app controls their versions. Install the line for your stack.
|
|
10
|
+
|
|
11
|
+
Node:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
pnpm add -D @neon-pixels/eslint-config eslint @eslint/js typescript-eslint eslint-config-prettier globals
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
VitePress:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm add -D @neon-pixels/eslint-config eslint @eslint/js typescript-eslint eslint-config-prettier globals eslint-plugin-vue vue-eslint-parser eslint-plugin-vuejs-accessibility
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Nuxt:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pnpm add -D @neon-pixels/eslint-config eslint @eslint/js typescript-eslint eslint-config-prettier globals eslint-plugin-vue vue-eslint-parser eslint-plugin-vuejs-accessibility @nuxt/eslint
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`typescript` must also be installed (a peer of `typescript-eslint`).
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Each entry point default-exports a flat config array. Spread it into your own config, then add your rules and ignores after it.
|
|
34
|
+
|
|
35
|
+
| Entry point | Adds to the base |
|
|
36
|
+
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `@neon-pixels/eslint-config` | Nothing: the base with no stack assumptions and no globals |
|
|
38
|
+
| `@neon-pixels/eslint-config/node` | Node globals |
|
|
39
|
+
| `@neon-pixels/eslint-config/vitepress` | Browser and Node globals, `eslint-plugin-vue` recommended, `eslint-plugin-vuejs-accessibility` recommended, `vue/no-v-html` as an error |
|
|
40
|
+
| `@neon-pixels/eslint-config/nuxt` | Everything in `vitepress`, single-word names allowed for pages and layouts, plus the Clerk composable restriction |
|
|
41
|
+
|
|
42
|
+
### Node
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
46
|
+
import node from "@neon-pixels/eslint-config/node";
|
|
47
|
+
|
|
48
|
+
export default defineConfig(globalIgnores(["dist"]), node, {
|
|
49
|
+
rules: {
|
|
50
|
+
// your own rules
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### VitePress
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
59
|
+
import vitepress from "@neon-pixels/eslint-config/vitepress";
|
|
60
|
+
|
|
61
|
+
export default defineConfig(
|
|
62
|
+
globalIgnores([".vitepress/dist", ".vitepress/cache"]),
|
|
63
|
+
vitepress,
|
|
64
|
+
);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Nuxt
|
|
68
|
+
|
|
69
|
+
Nuxt auto-imports (`useRoute`, `ref`, your own composables, module composables) are resolved by the project, not by this package. The package keeps no list of globals. Instead, wrap the config with `withNuxt()` from `@nuxt/eslint`: the module generates `.nuxt/eslint.config.mjs` on `nuxt prepare` / `nuxt dev`, and its `withNuxt` adds a globals block built from the project's real auto-import registry (layers, modules, `composables/`, `utils/`). That list updates itself when you add a composable, so it cannot go stale. This is why `@nuxt/eslint` is a peer for this entry point, and why `no-undef` still reports auto-imports if you use the config without `withNuxt`.
|
|
70
|
+
|
|
71
|
+
Add `@nuxt/eslint` to `modules` in `nuxt.config.ts` with `standalone` turned off, so `withNuxt()` adds only the Nuxt-specific parts (auto-import globals, Nuxt rules) and this package supplies the base, Vue, and TypeScript rules. Without it, two copies of the Vue and TypeScript rule sets run and ESLint can throw on duplicate plugin instances.
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
// nuxt.config.ts
|
|
75
|
+
export default defineNuxtConfig({
|
|
76
|
+
modules: ["@nuxt/eslint"],
|
|
77
|
+
eslint: { config: { standalone: false } },
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Run `pnpm nuxt prepare`, then:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
// eslint.config.mjs
|
|
85
|
+
import nuxt, { allowClerkComposables } from "@neon-pixels/eslint-config/nuxt";
|
|
86
|
+
import withNuxt from "./.nuxt/eslint.config.mjs";
|
|
87
|
+
|
|
88
|
+
export default withNuxt(
|
|
89
|
+
...nuxt,
|
|
90
|
+
allowClerkComposables("app/composables/useClerkAuth.ts"),
|
|
91
|
+
{ ignores: [".netlify/**"] },
|
|
92
|
+
);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Clerk wrapper rule
|
|
96
|
+
|
|
97
|
+
The `nuxt` entry point forbids Clerk's client composables `useAuth` and `useUser`, so apps go through their own wrapper composables. It reports bare calls (Nuxt auto-imports them, so an import ban alone would miss them), calls in templates, and imports from `@clerk/vue`, `@clerk/nuxt`, and `#imports`, including renamed imports. Type-only imports are allowed.
|
|
98
|
+
|
|
99
|
+
The wrapper itself has to call them. Pass its path pattern (or an array of patterns) to `allowClerkComposables()` and spread the result after the `nuxt` config, as above. The package names no file of its own.
|
|
100
|
+
|
|
101
|
+
Name your wrappers something other than `useAuth` and `useUser`, or the call check flags the wrappers' own callers.
|
|
102
|
+
|
|
103
|
+
#### Overriding
|
|
104
|
+
|
|
105
|
+
`allowClerkComposables()` switches off `no-restricted-imports`, `no-restricted-syntax`, and `vue/no-restricted-syntax` entirely for the files it matches, so put any restrictions of your own for those files in a block after it.
|
|
106
|
+
|
|
107
|
+
A later `no-restricted-imports` or `no-restricted-syntax` block in your config replaces the Clerk rule for the files it matches (flat config does not merge rule options). Re-include the restriction in your own block if you need extra restrictions on the same files.
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
MIT
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/lib/base.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import eslintJs from "@eslint/js";
|
|
2
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
const UNUSED_PREFIX_PATTERN = "^_";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @type {import("eslint").Linter.Config[]}
|
|
9
|
+
*/
|
|
10
|
+
const baseConfigs = [
|
|
11
|
+
eslintJs.configs.recommended,
|
|
12
|
+
...tseslint.configs.recommended,
|
|
13
|
+
{
|
|
14
|
+
name: "neon-pixels/base",
|
|
15
|
+
rules: {
|
|
16
|
+
// The TypeScript-aware rule replaces the core one in typescript-eslint's
|
|
17
|
+
// recommended set; configure it, not the core rule.
|
|
18
|
+
"@typescript-eslint/no-unused-vars": [
|
|
19
|
+
"error",
|
|
20
|
+
{
|
|
21
|
+
argsIgnorePattern: UNUSED_PREFIX_PATTERN,
|
|
22
|
+
varsIgnorePattern: UNUSED_PREFIX_PATTERN,
|
|
23
|
+
caughtErrorsIgnorePattern: UNUSED_PREFIX_PATTERN,
|
|
24
|
+
destructuredArrayIgnorePattern: UNUSED_PREFIX_PATTERN,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The shared base, then the stack's own configs, then
|
|
33
|
+
* `eslint-config-prettier` so it is always the last element.
|
|
34
|
+
*
|
|
35
|
+
* @param {...import("eslint").Linter.Config} stackConfigs
|
|
36
|
+
* @returns {import("eslint").Linter.Config[]}
|
|
37
|
+
*/
|
|
38
|
+
export function withBase(...stackConfigs) {
|
|
39
|
+
return [...baseConfigs, ...stackConfigs, eslintConfigPrettier];
|
|
40
|
+
}
|
package/lib/clerk.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const BANNED_COMPOSABLES = ["useAuth", "useUser"];
|
|
2
|
+
const CLERK_MODULES = ["@clerk/vue", "@clerk/nuxt", "#imports"];
|
|
3
|
+
const COMPOSABLE_CALL_SELECTOR = `CallExpression[callee.name=/^(${BANNED_COMPOSABLES.join("|")})$/]`;
|
|
4
|
+
const MESSAGE =
|
|
5
|
+
"Do not call Clerk's client composables directly. Use your app's wrapper composables instead.";
|
|
6
|
+
|
|
7
|
+
const restrictedSyntax = [
|
|
8
|
+
{ selector: COMPOSABLE_CALL_SELECTOR, message: MESSAGE },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Forbids Clerk's client composables. Nuxt auto-imports them, so an import ban
|
|
13
|
+
* alone would miss bare calls: the call selectors cover those, and the import
|
|
14
|
+
* ban covers renamed imports (`import { useAuth as raw }`).
|
|
15
|
+
*
|
|
16
|
+
* @type {import("eslint").Linter.Config}
|
|
17
|
+
*/
|
|
18
|
+
export const clerkWrapperRestriction = {
|
|
19
|
+
name: "neon-pixels/clerk-wrapper-restriction",
|
|
20
|
+
rules: {
|
|
21
|
+
"no-restricted-imports": [
|
|
22
|
+
"error",
|
|
23
|
+
...CLERK_MODULES.map((name) => ({
|
|
24
|
+
name,
|
|
25
|
+
importNames: BANNED_COMPOSABLES,
|
|
26
|
+
allowTypeImports: true,
|
|
27
|
+
message: MESSAGE,
|
|
28
|
+
})),
|
|
29
|
+
],
|
|
30
|
+
"no-restricted-syntax": ["error", ...restrictedSyntax],
|
|
31
|
+
"vue/no-restricted-syntax": ["error", ...restrictedSyntax],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function isBlankPattern(/** @type {unknown} */ pattern) {
|
|
36
|
+
return typeof pattern !== "string" || pattern.trim() === "";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Turns the Clerk restriction off for the files the app uses to wrap Clerk.
|
|
41
|
+
* Spread it after the entry point's config.
|
|
42
|
+
*
|
|
43
|
+
* @param {string | string[]} files Glob patterns relative to the config file.
|
|
44
|
+
* @returns {import("eslint").Linter.Config}
|
|
45
|
+
*/
|
|
46
|
+
export function allowClerkComposables(files) {
|
|
47
|
+
const patterns = [files].flat();
|
|
48
|
+
if (!patterns.length || patterns.some(isBlankPattern)) {
|
|
49
|
+
throw new TypeError(
|
|
50
|
+
"allowClerkComposables() needs at least one non-empty glob pattern.",
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
name: "neon-pixels/clerk-wrapper-exemption",
|
|
55
|
+
files: patterns,
|
|
56
|
+
rules: {
|
|
57
|
+
"no-restricted-imports": "off",
|
|
58
|
+
"no-restricted-syntax": "off",
|
|
59
|
+
"vue/no-restricted-syntax": "off",
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
package/lib/vue.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import pluginVue from "eslint-plugin-vue";
|
|
2
|
+
import pluginVueAccessibility from "eslint-plugin-vuejs-accessibility";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Vue rules shared by the `nuxt` and `vitepress` entry points. Must come after
|
|
7
|
+
* the base so the Vue parser wins for `.vue` files, with TypeScript parsing the
|
|
8
|
+
* `<script>` blocks.
|
|
9
|
+
*
|
|
10
|
+
* @type {import("eslint").Linter.Config[]}
|
|
11
|
+
*/
|
|
12
|
+
export const vueConfigs = [
|
|
13
|
+
...pluginVue.configs["flat/recommended"],
|
|
14
|
+
...pluginVueAccessibility.configs["flat/recommended"],
|
|
15
|
+
{
|
|
16
|
+
name: "neon-pixels/vue",
|
|
17
|
+
files: ["**/*.vue"],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
parserOptions: { parser: tseslint.parser, sourceType: "module" },
|
|
20
|
+
},
|
|
21
|
+
rules: {
|
|
22
|
+
// The recommended preset only warns, and a warning does not fail CI.
|
|
23
|
+
"vue/no-v-html": "error",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
];
|
package/node.d.ts
ADDED
package/node.js
ADDED
package/nuxt.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
|
+
|
|
3
|
+
declare const config: Linter.Config[];
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A config block that turns the Clerk composable restriction off for the files
|
|
7
|
+
* that wrap Clerk. Spread it after the default export.
|
|
8
|
+
*/
|
|
9
|
+
export function allowClerkComposables(files: string | string[]): Linter.Config;
|
|
10
|
+
|
|
11
|
+
export default config;
|
package/nuxt.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import globals from "globals";
|
|
2
|
+
import { withBase } from "./lib/base.js";
|
|
3
|
+
import { clerkWrapperRestriction } from "./lib/clerk.js";
|
|
4
|
+
import { vueConfigs } from "./lib/vue.js";
|
|
5
|
+
|
|
6
|
+
export { allowClerkComposables } from "./lib/clerk.js";
|
|
7
|
+
|
|
8
|
+
export default withBase(
|
|
9
|
+
...vueConfigs,
|
|
10
|
+
{
|
|
11
|
+
name: "neon-pixels/nuxt",
|
|
12
|
+
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
// Nuxt derives these components' names from the file path, so single-word
|
|
16
|
+
// names such as pages/index.vue and layouts/default.vue are the convention.
|
|
17
|
+
name: "neon-pixels/nuxt-single-word-names",
|
|
18
|
+
files: [
|
|
19
|
+
"**/pages/**/*.vue",
|
|
20
|
+
"**/layouts/**/*.vue",
|
|
21
|
+
"**/app.vue",
|
|
22
|
+
"**/error.vue",
|
|
23
|
+
],
|
|
24
|
+
rules: { "vue/multi-word-component-names": "off" },
|
|
25
|
+
},
|
|
26
|
+
clerkWrapperRestriction,
|
|
27
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neon-pixels/eslint-config",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Shared ESLint flat configuration for Neon Pixels projects (Nuxt, VitePress, Node).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/neonpixels-studio/packages.git",
|
|
10
|
+
"directory": "packages/eslint-config"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"default": "./index.js"
|
|
16
|
+
},
|
|
17
|
+
"./nuxt": {
|
|
18
|
+
"types": "./nuxt.d.ts",
|
|
19
|
+
"default": "./nuxt.js"
|
|
20
|
+
},
|
|
21
|
+
"./vitepress": {
|
|
22
|
+
"types": "./vitepress.d.ts",
|
|
23
|
+
"default": "./vitepress.js"
|
|
24
|
+
},
|
|
25
|
+
"./node": {
|
|
26
|
+
"types": "./node.d.ts",
|
|
27
|
+
"default": "./node.js"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"index.js",
|
|
33
|
+
"index.d.ts",
|
|
34
|
+
"nuxt.js",
|
|
35
|
+
"nuxt.d.ts",
|
|
36
|
+
"vitepress.js",
|
|
37
|
+
"vitepress.d.ts",
|
|
38
|
+
"node.js",
|
|
39
|
+
"node.d.ts",
|
|
40
|
+
"lib"
|
|
41
|
+
],
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": "^22.17.0 || ^24.0.0 || >=26.0.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@eslint/js": "^10.0.0",
|
|
50
|
+
"@nuxt/eslint": ">=1.0.0 <2",
|
|
51
|
+
"eslint": "^10.0.0",
|
|
52
|
+
"eslint-config-prettier": "^10.0.0",
|
|
53
|
+
"eslint-plugin-vue": "^10.12.0",
|
|
54
|
+
"eslint-plugin-vuejs-accessibility": "^2.6.0",
|
|
55
|
+
"globals": ">=16.0.0",
|
|
56
|
+
"typescript-eslint": "^8.73.0",
|
|
57
|
+
"vue-eslint-parser": "^10.0.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@nuxt/eslint": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"eslint-plugin-vue": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"eslint-plugin-vuejs-accessibility": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"vue-eslint-parser": {
|
|
70
|
+
"optional": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@eslint/js": "^10.0.1",
|
|
75
|
+
"eslint": "^10.15.0",
|
|
76
|
+
"eslint-config-prettier": "^10.1.8",
|
|
77
|
+
"eslint-plugin-vue": "^10.12.1",
|
|
78
|
+
"eslint-plugin-vuejs-accessibility": "^2.6.3",
|
|
79
|
+
"globals": "^17.14.0",
|
|
80
|
+
"typescript-eslint": "^8.73.0",
|
|
81
|
+
"vue-eslint-parser": "^10.4.2"
|
|
82
|
+
},
|
|
83
|
+
"scripts": {
|
|
84
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
85
|
+
}
|
|
6
86
|
}
|
package/vitepress.d.ts
ADDED
package/vitepress.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import globals from "globals";
|
|
2
|
+
import { withBase } from "./lib/base.js";
|
|
3
|
+
import { vueConfigs } from "./lib/vue.js";
|
|
4
|
+
|
|
5
|
+
export default withBase(
|
|
6
|
+
...vueConfigs,
|
|
7
|
+
{
|
|
8
|
+
name: "neon-pixels/vitepress",
|
|
9
|
+
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
// VitePress's documented custom-theme entry is `.vitepress/theme/Layout.vue`.
|
|
13
|
+
name: "neon-pixels/vitepress-single-word-names",
|
|
14
|
+
files: ["**/.vitepress/theme/Layout.vue"],
|
|
15
|
+
rules: { "vue/multi-word-component-names": "off" },
|
|
16
|
+
},
|
|
17
|
+
);
|