Skip to content

Commit

Permalink
Merge pull request #130 from avorra/types
Browse files Browse the repository at this point in the history
feat: add type definitions
  • Loading branch information
edvardchen authored Sep 12, 2024
2 parents 675c507 + c463dfe commit d0859d3
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 d0859d3

Please sign in to comment.