Installations
npm install eslint-config-xo
Developer
Developer Guide
Module System
ESM
Min. Node Version
>=18.18
Typescript Support
No
Node Version
18.20.2
NPM Version
10.6.0
Statistics
268 Stars
341 Commits
45 Forks
17 Watching
1 Branches
24 Contributors
Updated on 18 Nov 2024
Bundle Size
537.74 kB
Minified
135.70 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
56,016,603
Last day
2%
69,488
Compared to previous day
Last week
3.8%
407,526
Compared to previous week
Last month
35%
1,455,378
Compared to previous month
Last year
16.6%
14,247,366
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
eslint-config-xo
ESLint shareable config for XO
This is for advanced users. You probably want to use XO directly.
See eslint-plugin-unicorn for some additional useful rules.
Use the XO issue tracker instead of this one.
Install
1npm install --save-dev eslint-config-xo
Usage
1// eslint.config.js 2import xo from 'eslint-config-xo'; 3 4export default [ 5 ...xo, 6];
This package also exposes eslint-config-xo/browser
if you're in the browser:
1import xoBrowser from 'eslint-config-xo/browser'; 2 3export default [ 4 ...xoBrowser, 5];
This package also exposes eslint-config-xo/space
if you're in favor of 2-space indent:
1import xoSpace from 'eslint-config-xo/space'; 2 3export default [ 4 ...xoSpace, 5];
This package also exposes eslint-config-xo/space/browser
if you're in favor of 2-space indent and in browser:
1import xoSpaceBrowser from 'eslint-config-xo/space/browser'; 2 3export default [ 4 ...xoSpaceBrowser, 5];
Use the XO CLI instead
XO is an ESLint wrapper with great defaults.
Here are some reason why you should use the XO CLI instead of this config:
- XO comes bundled with this config.
- Beautiful output.
- Bundles many useful plugins, like
eslint-plugin-unicorn
,eslint-plugin-import
,eslint-plugin-ava
, and more. - No need to specify file paths to lint. It will lint all JS files except commonly ignored paths.
- Super simple to add XO to a project with
$ npm init xo
. - Specify
indent
andsemicolon
preferences easily without messing with the rule config. - Config/rule overrides per files/globs.
- Can open all files with errors at the correct line in your editor. (See the
--open
flag) - The editor plugins are IMHO better than the ESLint ones. (Subjective)
tl;dr You miss out on a lot by just using this config.
Related
- eslint-config-xo-space - ESLint shareable config for XO with 2-space indent
- eslint-config-xo-typescript - ESLint shareable config for TypeScript to be used with this config
- eslint-config-xo-react - ESLint shareable config for React to be used with this config
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
- Info: security policy file detected: .github/security.md:1
- Info: Found linked content: .github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/security.md:1
- Info: Found text in security policy: .github/security.md:1
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
Found 7/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/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/xojs/eslint-config-xo/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/xojs/eslint-config-xo/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:22
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
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 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Score
4.4
/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 MoreOther packages similar to eslint-config-xo
eslint-config-xo-typescript
ESLint shareable config for TypeScript to be used with eslint-config-xo
eslint-config-xo-react
ESLint shareable config for React to be used with eslint-config-xo
eslint-config-xo-lass
ESLint shareable config for Lass to be used with eslint-config-xo
eslint-config-xo-nextjs
ESLint shareable config for Next.js to be used with eslint-config-xo