Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 354dd12

Browse files
committed
Switch from vue-pug-sfc to vue-pug
1 parent c2af06a commit 354dd12

29 files changed

+173
-473
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"eslint-plugin-spellcheck": "~0.0.19",
5858
"eslint-plugin-unicorn": "~42.0.0",
5959
"eslint-plugin-vue": "~8.6.0",
60+
"eslint-plugin-vue-pug": "~0.4.0",
6061
"esno": "~0.14.1",
6162
"json-schema-to-typescript": "~10.1.5",
6263
"prettier": "2.6.2",

pnpm-lock.yaml

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-rule-files.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import eslintPluginUnicorn from 'eslint-plugin-unicorn';
1818
// @ts-expect-error
1919
import eslintPluginVue from 'eslint-plugin-vue';
2020
// @ts-expect-error
21-
import eslintPluginVuePugSfc from 'eslint-plugin-vue-pug-sfc';
21+
import eslintPluginVuePug from 'eslint-plugin-vue-pug';
2222
import * as fs from 'fs';
2323
import type { JSONSchema4 } from 'json-schema';
2424
import { compile } from 'json-schema-to-typescript';
@@ -80,9 +80,9 @@ const generationMap: Record<string, Plugin> = {
8080
prefix: '@intlify/vue-i18n',
8181
rules: (eslintPluginVueI18n as Plugin).rules,
8282
},
83-
'vue-pug-sfc': {
84-
name: 'VuePugSfc',
85-
rules: (eslintPluginVuePugSfc as Plugin).rules,
83+
'vue-pug': {
84+
name: 'VuePug',
85+
rules: (eslintPluginVuePug as Plugin).rules,
8686
},
8787
};
8888

src/extends/eslint-plugin-vue-pug-sfc.d.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Eslint Vue Pug extensions.
3+
*
4+
* @see [Eslint Vue Pug extensions](https://github.com/rashfael/eslint-plugin-vue-pug#usage)
5+
*/
6+
export type VuePugExtensions =
7+
| 'plugin:vue-pug/base'
8+
| 'plugin:vue-pug/vue3-essential'
9+
| 'plugin:vue-pug/vue3-strongly-recommended'
10+
| 'plugin:vue-pug/vue3-recommended'
11+
| 'plugin:vue-pug/essential'
12+
| 'plugin:vue-pug/strongly-recommended'
13+
| 'plugin:vue-pug/recommended';

src/extends/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { NodeExtensions } from './eslint-plugin-node';
66
import type { PrettierExtensions } from './eslint-plugin-prettier';
77
import type { UnicornExtensions } from './eslint-plugin-unicorn';
88
import type { VueExtensions } from './eslint-plugin-vue';
9-
import type { VuePugSfcExtensions } from './eslint-plugin-vue-pug-sfc';
9+
import type { VuePugExtensions } from './eslint-plugin-vue-pug';
1010
import type { IntlifyVueI18nExtensions } from './intlify-vue-i18n';
1111
import type { TypescriptEslintExtensions } from './typescript-eslint';
1212

@@ -23,7 +23,7 @@ export type KnownExtensions = LiteralUnion<
2323
| TypescriptEslintExtensions
2424
| UnicornExtensions
2525
| VueExtensions
26-
| VuePugSfcExtensions
26+
| VuePugExtensions
2727
>;
2828

2929
/**

src/parser-options.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,10 @@ export interface ParserOptions extends Partial<Record<string, unknown>> {
242242
*/
243243
interpolationAsNonHTML?: boolean;
244244
};
245+
/**
246+
* @see [templateTokenizer](https://github.com/rashfael/eslint-plugin-vue-pug#usage)
247+
*/
248+
templateTokenizer?: {
249+
pug?: LiteralUnion<'vue-eslint-parser-template-tokenizer-pug'>;
250+
};
245251
}

src/rules/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { TypeScriptRules } from './typescript-eslint';
88
import type { UnicornRules } from './unicorn';
99
import type { VueRules } from './vue';
1010
import type { VueI18nRules } from './vue-i18n';
11-
import type { VuePugSfcRules } from './vue-pug-sfc';
11+
import type { VuePugRules } from './vue-pug';
1212

1313
/**
1414
* Rules.
@@ -25,6 +25,6 @@ export type Rules = Partial<
2525
UnicornRules &
2626
VueRules &
2727
VueI18nRules &
28-
VuePugSfcRules &
28+
VuePugRules &
2929
Record<string, RuleConfig>
3030
>;

src/rules/vue-pug-sfc/attribute-hyphenation.d.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/rules/vue-pug-sfc/index.d.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)