diff --git a/src/index.ts b/src/index.ts index 5ef5ee3..8e67b9c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,12 +10,16 @@ import type { Linter } from '@typescript-eslint/utils/ts-eslint'; import base from './configs/base.js'; import recommended from './configs/recommended.js'; import enforceFooBar from './rules/enforce-foo-bar.js'; - +import { name, version } from '../package.json'; export = { configs: { base, recommended }, + meta: { + name, + version + }, rules: { 'enforce-foo-bar': enforceFooBar } diff --git a/tsconfig.json b/tsconfig.json index f130ea3..41deeed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "rootDir": "./src", "outDir": "dist" /* Specify an output folder for all emitted files. */, "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + "resolveJsonModule": true, "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, "strict": true /* Enable all strict type-checking options. */, "noUnusedLocals": true /* Enable error reporting when local variables aren't read. */, @@ -15,5 +16,5 @@ "noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */, "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "include": ["src/**/*"] + "include": ["src/**/*", "./package.json"] }