Installations
npm install eslint-plugin-enact
Developer
enactjs
Developer Guide
Module System
CommonJS
Min. Node Version
>=14.17.0
Typescript Support
No
Node Version
16.20.0
NPM Version
8.19.4
Statistics
86 Commits
102 Watching
14 Branches
32 Contributors
Updated on 22 Jul 2024
Bundle Size
96.21 kB
Minified
26.81 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
1,081,867
Last day
-13.4%
1,888
Compared to previous day
Last week
-29.4%
8,117
Compared to previous week
Last month
35.4%
42,527
Compared to previous month
Last year
41%
463,073
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
ESLint-plugin-Enact
Enact specific linting rules for ESLint
Installation
Install ESLint either locally or globally.
1$ npm install eslint
If you installed ESLint
globally, you have to install React plugin globally too. Otherwise, install it locally.
1$ npm install eslint-plugin-enact
Configuration
Add plugins
section and specify ESLint-plugin-Enact as a plugin.
1{ 2 "plugins": [ 3 "enact" 4 ] 5}
You can also specify some settings that will be shared across all the plugin rules.
1{ 2 "settings": { 3 "enact": { 4 "kind": "kind", // Regex for Component Factory to use, default to "kind" 5 "hoc": "hoc" // Regex for HoC Factory to use, default to "hoc" 6 } 7 } 8}
If it is not already the case you must also configure ESLint
to support JSX.
With ESLint 1.x.x:
1{ 2 "ecmaFeatures": { 3 "jsx": true 4 } 5}
With ESLint 2.x.x+:
1{ 2 "parserOptions": { 3 "ecmaFeatures": { 4 "jsx": true 5 } 6 } 7}
Finally, enable all of the rules that you would like to use:
1 "rules": { 2 "enact/kind-name": 1, 3 "enact/display-name": 1, 4 "enact/prop-types": 1, 5 "enact/no-module-exports-import": 2 6 }
List of supported rules
- enact/kind-name: Prevent missing
name
in a Enact component definition - enact/display-name: Prevent missing
displayName
in a React component definitions without false-flagging Enact kinds - enact/prop-types: Prevent missing props validation in a React component definition
- enact/no-module-exports-import: Disallow module.exports with import statements (see webpack issue #4039)
Note:
enact/display-name
andenact/prop-types
supersedereact/display-name
andreact/prop-types
, respectively. The latter two should be disabled when used with Enact.
Other useful plugins
- React: eslint-plugin-react
License
ESLint-plugin-Enact is based on work from ESLint-plugin-React and is licensed under the MIT License.
Copyright and License Information
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
Copyright (c) 2016-2024 LG Electronics
Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
Found 8/30 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-copyright-years.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/enactjs/eslint-plugin-enact/update-copyright-years.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/update-copyright-years.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/enactjs/eslint-plugin-enact/update-copyright-years.yml/master?enable=pin
- Info: 0 out of 1 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/update-copyright-years.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Score
3.6
/10
Last Scanned on 2024-11-25
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