Skip to content

Commit

Permalink
feat: annotate plugin type
Browse files Browse the repository at this point in the history
  • Loading branch information
ramijarrar committed Aug 23, 2024
1 parent 675c507 commit a76dc42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { ESLint } from 'eslint';

declare const plugin: ESLint.Plugin;

export = plugin;
8 changes: 5 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ var requireIndex = require('requireindex');
// Plugin Definition
//------------------------------------------------------------------------------

// import all rules in lib/rules
module.exports.rules = requireIndex(__dirname + '/rules');
const plugin = {
// import all rules in lib/rules
rules: requireIndex(__dirname + '/rules'),

module.exports.configs = {
recommended: {
plugins: ['i18next'],
rules: {
'i18next/no-literal-string': [2]
}
}
};

module.exports = plugin;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"files": [
"lib"
],
"types": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/edvardchen/eslint-plugin-i18next.git"
Expand Down

0 comments on commit a76dc42

Please sign in to comment.