GithubHelp home page GithubHelp logo

synacor / eslint-plugin-preact-i18n Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 91 KB

eslint plugin for users of the preact-i18n library

License: GNU General Public License v3.0

JavaScript 100.00%

eslint-plugin-preact-i18n's People

Contributors

billneff79 avatar fossabot avatar msfstef avatar savvystef avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-plugin-preact-i18n's Issues

no-missing-template-field error for pluralizedAndtemplated

Hi,
I think there is a bug with eslint for preact-i18n ( https://github.com/synacor/eslint-plugin-preact-i18n/blob/HEAD/docs/rules/no-missing-template-field.md ). I do this exactly like it said :

"pluralizedAndtemplated": {
  "none": "No Things",
  "one": "One Thing",
  "many": "Many {{foo}}"
}

but there is those errors :

TypeError: Object.values is not a function
    at JSXElement.forEach ([PROJECT_PATH]/node_modules/eslint-plugin-preact-i18n/lib/rules/no-missing-template-field.js:61:55)
    at Array.forEach (native)
    at JSXElement ([PROJECT_PATH]/node_modules/eslint-plugin-preact-i18n/lib/rules/no-missing-template-field.js:50:43)
    at listeners.(anonymous function).forEach.listener ([PROJECT_PATH]/node_modules/eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (native)
    at Object.emit ([PROJECT_PATH]/node_modules/eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector ([PROJECT_PATH]/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors ([PROJECT_PATH]/node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode ([PROJECT_PATH]/node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode ([PROJECT_PATH]/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
    at nodeQueue.forEach.traversalInfo ([PROJECT_PATH]/node_modules/eslint/lib/linter.js:860:28)

Hope this help.

Compatibility with newer versions of eslint

Can't install with newer versions of eslint, like the latest 8.11.0:

$ npm i -D [email protected]
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: teeko-cc-ui@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.11.0" from teeko-cc-ui@undefined
npm ERR!   ui
npm ERR!     teeko-cc-ui@undefined
npm ERR!     node_modules/teeko-cc-ui
npm ERR!       workspace ui from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^4.0.0 || ^5.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-preact-i18n
npm ERR!   dev eslint-plugin-preact-i18n@"1.1.0" from teeko-cc-ui@undefined
npm ERR!   ui
npm ERR!     teeko-cc-ui@undefined
npm ERR!     node_modules/teeko-cc-ui
npm ERR!       workspace ui from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/pcarrier/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pcarrier/.npm/_logs/2022-03-20T01_22_12_590Z-debug-0.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.