Gathering detailed insights and metrics for eslint-plugin-relay
Gathering detailed insights and metrics for eslint-plugin-relay
Gathering detailed insights and metrics for eslint-plugin-relay
Gathering detailed insights and metrics for eslint-plugin-relay
A plugin for the code linter ESLint to lint specific details about Relay.
npm install eslint-plugin-relay
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
100 Stars
256 Commits
46 Forks
20 Watching
5 Branches
30 Contributors
Updated on 23 Oct 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-7.4%
21,614
Compared to previous day
Last week
4%
114,290
Compared to previous week
Last month
21.5%
484,985
Compared to previous month
Last year
-28.2%
4,331,962
Compared to previous year
1
eslint-plugin-relay
is a plugin for ESLint to catch common problems in code using Relay early.
npm i --save-dev eslint-plugin-relay
"relay"
to your eslint plugins
section."relay/graphql-syntax": "error"
to your eslint rules
section, see the example for all rules.Example .eslintrc.js:
1module.exports = { 2 // Other eslint properties here 3 rules: { 4 'relay/graphql-syntax': 'error', 5 'relay/compat-uses-vars': 'warn', 6 'relay/graphql-naming': 'error', 7 'relay/generated-flow-types': 'warn', 8 'relay/must-colocate-fragment-spreads': 'warn', 9 'relay/no-future-added-value': 'warn', 10 'relay/unused-fields': 'warn', 11 'relay/function-required-argument': 'warn', 12 'relay/hook-required-argument': 'warn' 13 }, 14 plugins: ['relay'] 15};
You can also enable all the recommended or strict rules at once.
Add plugin:relay/recommended
or plugin:relay/strict
in extends
:
1{ 2 "extends": [ 3 "plugin:relay/recommended" 4 ] 5}
The following rules support suppression within graphql tags:
Supported rules can be suppressed by adding # eslint-disable-next-line relay/name-of-rule
to the preceding line:
1graphql`fragment foo on Page { 2 # eslint-disable-next-line relay/must-colocate-fragment-spreads 3 ...unused1 4}`
Note that only the eslint-disable-next-line
form of suppression works. eslint-disable-line
doesn't currently work until graphql-js provides support for parsing Comment nodes in their AST.
We actively welcome pull requests, learn how to contribute.
eslint-plugin-relay
is MIT licensed.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/13 approved changesets -- score normalized to 5
Reason
6 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More