Installations
npm install @linzjs/style
Developer
linz
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
No
Node Version
20.14.0
NPM Version
10.7.0
Statistics
4 Stars
336 Commits
2 Forks
5 Watching
7 Branches
122 Contributors
Updated on 23 Jun 2024
Languages
JavaScript (63.26%)
TypeScript (36.74%)
Total Downloads
Cumulative downloads
Total Downloads
1,186,769
Last day
3.1%
1,798
Compared to previous day
Last week
0.7%
9,303
Compared to previous week
Last month
-4.5%
42,631
Compared to previous month
Last year
14.2%
393,730
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
@linzjs/style
NPM configuration for base typescript projects
Includes:
- Prettier
- Eslint
- Typescript
And configuration for saneish defaults, which can be extended
Most of these are the raw defaults/recommended settings from typescript, eslint and prettier.
1export class FooBar { 2 get foo(): number { 3 return 1; 4 } 5 6 async bar(): Promise<string> { 7 return 'bar'; 8 } 9 10 /** 11 * @param foo foo to bar 12 */ 13 fooBar(foo = 'foo'): string { 14 return `${foo}bar`; 15 } 16}
IDE Usage
Usage VS Code
- Install
eslint
using the extensions menu - Add the following to your settings.json
1"editor.codeActionsOnSave": { 2 "source.fixAll.eslint": true 3}, 4"eslint.validate": ["javascript"],
Usage with IntelliJ
IntelliJ has ESLint support by default,
- Open the settings in Languages & Frameworks > JavaScript > Code Quality Tools > ESLint
- Check Automatic ESLint Configuration
Project Usage
- Install LINZ Style
1npm install @linzjs/style
- Applying eslint config There are two ways to apply the config
Either create the base configuration files
1# If on windows run `node ./node_modules/@linzjs/style/build/src/install.js` 2# - tsconfig.json 3# - .eslintrc.cjs 4# - .prettierrc.cjs 5npx linz-style-install
Or extend your existing eslintrc.js
config
Example extending the .eslintrc.js
file in your project
1module.exports = { 2 extends: ["./node_modules/@linzjs/style/.eslintrc.cjs"], 3 4 overrides: [ 5 { 6 /** Overrides for typescript */ 7 files: ["**/*.ts", "**/*.tsx"], 8 rules: { 9 "@typescript-eslint/super-crazy-hook-rule": "error", 10 }, 11 }, 12 ] 13}
- Apply the formatting/linting to all source code
npx eslint .
Migration from 3.x to 4.x
See Migration Docs
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
Reason
Found 5/7 approved changesets -- score normalized to 7
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
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/release-please.yml:21
- Warn: no topLevel permission defined: .github/workflows/push.yml:1
- Warn: no topLevel permission defined: .github/workflows/release-please.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/push.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/linz/style-js/push.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-please.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/linz/style-js/release-please.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-please.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/linz/style-js/release-please.yml/master?enable=pin
- Info: 0 out of 3 third-party GitHubAction dependencies pinned
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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 29 are checked with a SAST tool
Score
4.3
/10
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