Gathering detailed insights and metrics for @spotify/eslint-config-base
Gathering detailed insights and metrics for @spotify/eslint-config-base
Gathering detailed insights and metrics for @spotify/eslint-config-base
Gathering detailed insights and metrics for @spotify/eslint-config-base
@spotify/eslint-config-typescript
Spotify's ESLint config for TypeScript
eslint-config-airbnb-base
Airbnb's base JS ESLint config, following our styleguide
@spotify/eslint-config-react
Spotify's ESLint config for React projects
eslint-config-airbnb
Airbnb's ESLint config, following our styleguide
npm install @spotify/eslint-config-base
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
383 Stars
1,119 Commits
64 Forks
6 Watching
15 Branches
43 Contributors
Updated on 19 Aug 2024
TypeScript (66.53%)
JavaScript (31.19%)
Shell (2.28%)
Cumulative downloads
Total Downloads
Last day
-13.4%
8,106
Compared to previous day
Last week
-4.2%
47,280
Compared to previous week
Last month
2.6%
202,533
Compared to previous month
Last year
24.3%
2,315,953
Compared to previous year
1
2023-12-15: This repository is now officially deprecated. This means that the repository is no longer actively maintained and will not receive any further updates or bug fixes.
A monorepo of base configs and CLI wrappers used to speed up development @ Spotify.
Want to use it? Check out the CLI documentation to get started!
@spotify/web-scripts is a CLI that combines shared configuration for building, linting, testing, formatting, and releasing libraries for Node and the browser. It is opinionated, but allows configuration to avoid lock-in. You can also pick and choose which scripts you use. It is inspired by other tooling bundles like react-scripts and kcd-scripts.
1yarn add --dev @spotify/web-scripts husky
It is intended to be used within a project as a series of npm scripts.
1{ 2 "devDependencies": { 3 "@spotify/web-scripts": "^12.0.0", 4 "husky": "^7.0.0" 5 }, 6 "scripts": { 7 "build": "web-scripts build", 8 "test": "web-scripts test", 9 "format": "web-scripts format", 10 "lint": "web-scripts lint", 11 "commit": "web-scripts commit", 12 "release": "web-scripts release", 13 "prepare": "husky install && web-scripts audit" 14 } 15}
Additionally, you'll need to run the following two commands to create the commit and pre-commit hooks:
1npx husky set .husky/pre-commit 'yarn web-scripts precommit --no-tests --no-typecheck' 2 3npx husky set .husky/commit-msg 'yarn web-scripts commitmsg --edit="$1"' && \ 4 sed 's/edit=""/edit="$1"/g' .husky/commit-msg | tee .husky/commit-msg
NOTE: the second command uses sed to hack around this bug in husky that removes $1
.
You'll want to add and commit the .husky
directory.
View the full CLI documentation for more details on how to get started.
To quickly get started with a new @spotify/web-scripts
library, you can build one with our library scaffolding tool:
1yarn create @spotify/web-scripts-library my-library-name
The other projects in this repo are shared configurations for common tools we use for building, linting, and formatting our code. They can be installed separately and used by anyone should they opt to follow our standards. We have a specialized point-of-view on what belongs in our configs. They are all used by the web-scripts CLI by default.
We have a few guiding principles for this project.
web-scripts
is meant to be configurable. We want to avoid the "eject" problem. You should be able to easily take the base configs and extend them in your project.yarn lint
which includes Prettier, ESLint, and TypeScript checks. We could have done yarn lint
, yarn typecheck
, and yarn stylecheck
. That would have meant pushing "new" linting to all repos on new versions would be much harder, as we would need to communicate that you need to update your invocation in package.json.This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.
This project is an opinionated approach to static analysis, code formatting, testing, and publishing. It's the result of consensus between many web engineers inside Spotify, and the default configs will mostly be written by Spotify employees. We may reject PRs to the ESLint config if we don't agree that the rule makes sense as part of our baseline, for example. Use it if it aligns with your needs!
If you get an error like Cannot find module '../cjs'
when running yarn test
, you need to bootstrap web-scripts.
1$ yarn lerna run bootstrap
The repo releases automatically on merge to master using semantic-release
and lerna
in a Github Action, if the commit message has the right semantic-release format
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/15 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
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