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"
2
2
import { rules as ruleList } from "./utils/rules"
3
3
import * as recommended from "./configs/recommended"
4
4
import * as all from "./configs/all"
5
+ export * as meta from "./meta"
5
6
6
7
export const configs = {
7
8
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 18
18
"*" : [" typings/*" ]
19
19
},
20
20
"esModuleInterop" : true ,
21
+ "resolveJsonModule" : true ,
21
22
22
23
"skipLibCheck" : true
23
24
},
You can’t perform that action at this time.
0 commit comments