index.js 721 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @fileoverview ESLint plugin for i18n
  3. * @author edvardchen
  4. */
  5. 'use strict';
  6. //------------------------------------------------------------------------------
  7. // Requirements
  8. //------------------------------------------------------------------------------
  9. var requireIndex = require('requireindex');
  10. //------------------------------------------------------------------------------
  11. // Plugin Definition
  12. //------------------------------------------------------------------------------
  13. // import all rules in lib/rules
  14. module.exports.rules = requireIndex(__dirname + '/rules');
  15. module.exports.configs = {
  16. recommended: {
  17. plugins: ['i18next'],
  18. rules: {
  19. 'i18next/no-literal-string': [2]
  20. }
  21. }
  22. };