Skip to content

Commit 170f816

Browse files
authored
feat: export meta object (#467)
1 parent 5197597 commit 170f816

19 files changed

+132
-26
lines changed

.changeset/wicked-ways-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-svelte": minor
3+
---
4+
5+
feat: export meta object

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"sveltejs"
2727
],
2828
"scripts": {
29-
"build": "yarn build:ts",
29+
"build": "yarn build:meta && yarn build:ts",
30+
"build:meta": "yarn ts ./tools/update-meta.ts",
3031
"build:ts": "tsc --project ./tsconfig.build.json",
3132
"clean": "rimraf .nyc_output lib coverage build .svelte-kit svelte.config-dist.js",
3233
"cover": "nyc --reporter=lcov yarn test",

src/configs/base.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "yarn update"
14
export = {
25
plugins: ["svelte"],
36
overrides: [

src/configs/prettier.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "yarn update"
14
import path from "path"
25
const base = require.resolve("./base")
36
const baseExtend =

src/configs/recommended.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "yarn update"
14
import path from "path"
25
const base = require.resolve("./base")
36
const baseExtend =

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import recommended from "./configs/recommended"
55
import prettier from "./configs/prettier"
66
import all from "./configs/all"
77
import * as processor from "./processor"
8+
import * as meta from "./meta"
89

910
const configs = {
1011
base,
@@ -19,6 +20,7 @@ const rules = ruleList.reduce((obj, r) => {
1920
}, {} as { [key: string]: RuleModule })
2021

2122
export = {
23+
meta,
2224
configs,
2325
rules,
2426
processors: {

src/meta.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "yarn update"
4+
export const name = "eslint-plugin-svelte" as const
5+
export const version = "2.27.4" as const

src/processor/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Linter } from "eslint"
22
import type { Shared } from "../shared"
33
import { beginShared, terminateShared } from "../shared"
4+
export * as meta from "../meta"
45

56
/** preprocess */
67
export function preprocess(code: string, filename: string): string[] {

src/types-for-node.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "yarn update"
14
//
25
// The information here can be calculated by calculating the type,
36
// but is pre-defined to avoid the computational cost.

src/utils/rules.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// IMPORTANT!
2+
// This file has been automatically generated,
3+
// in order to update its content execute "yarn update"
14
import type { RuleModule } from "../types"
25
import typescriptEslintNoUnnecessaryCondition from "../rules/@typescript-eslint/no-unnecessary-condition"
36
import blockLang from "../rules/block-lang"

0 commit comments

Comments
 (0)