File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { RuleModule } from "./types"
22import { rules as ruleList } from "./utils/rules"
33import * as recommended from "./configs/recommended"
44import * as all from "./configs/all"
5+ export * as meta from "./meta"
56
67export const configs = {
78 recommended,
Original file line number Diff line number Diff line change 1+ // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
2+ // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- Get meta data
3+ export const { name, version } = require ( "../package.json" )
Original file line number Diff line number Diff line change 1+ import assert from "assert"
2+ import * as plugin from "../../lib"
3+ import { version } from "../../package.json"
4+ const expectedMeta = {
5+ name : "eslint-plugin-regexp" ,
6+ version,
7+ }
8+
9+ describe ( "Test for meta object" , ( ) => {
10+ it ( "A plugin should have a meta object." , ( ) => {
11+ assert . deepStrictEqual ( plugin . meta , expectedMeta )
12+ } )
13+ } )
Original file line number Diff line number Diff line change 1818 "*" : [" typings/*" ]
1919 },
2020 "esModuleInterop" : true ,
21+ "resolveJsonModule" : true ,
2122
2223 "skipLibCheck" : true
2324 },
You can’t perform that action at this time.
0 commit comments