synacor / eslint-plugin-preact-i18n Goto Github PK
View Code? Open in Web Editor NEWeslint plugin for users of the preact-i18n library
License: GNU General Public License v3.0
eslint plugin for users of the preact-i18n library
License: GNU General Public License v3.0
If a text is hard coded within Link
tag, the plugin does not handle a no-text-as-children
error.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.