ESLINT(1)

πŸ“¦
version 6.4.0 Β· 5 versions
, in debian trixie, ubuntu resolute

✨ ESLINT(1) ✨

okay so bestie, welcome to the ESLINT(1) manual page, aka the group chat where your JavaScript gets read for filth (affectionately) πŸ’…


🌸 NAME 🌸

eslint β€” JavaScript

literally that's it, that's the whole name. she contains multitudes πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the vibe is: you run

eslint [options] file.js [file.js] [dir]

and eslint goes through your files and tells you what's up. you can pass one file, a bunch of files, or whole directories β€” she's flexible like that 🫢

πŸŽ€ Basic configuration πŸŽ€

  • --no-eslintrc β€” turns OFF using config from .eslintrc.*. like, ignore the config files entirely, we're doing this raw ✨
  • -c, --config path::String β€” use THIS config instead, and it overrides whatever .eslintrc.* options were there if any exist
  • --env [String] β€” specify environments
  • --ext [String] β€” specify JavaScript file extensions β€” default: .js
  • --global [String] β€” define global variables
  • --parser String β€” specify the parser to be used
  • --parser-options Object β€” specify parser options
  • --resolve-plugins-relative-to path::String β€” a folder where plugins should be resolved from, CWD by default

πŸ’œ Specifying rules and plugins πŸ’œ

  • --rulesdir [path::String] β€” use additional rules from this directory
  • --plugin [String] β€” specify plugins
  • --rule Object β€” specify rules

πŸ”₯ Fixing problems πŸ”₯

  • --fix β€” automatically fix problems. she's not just judging, she's helping 😭
  • --fix-dry-run β€” automatically fix problems WITHOUT saving the changes to the file system. like a rehearsal, no commitment bestie
  • --fix-type Array β€” specify the types of fixes to apply (problem, suggestion, layout)

🧚 Ignoring files 🧚

  • --ignore-path path::String β€” specify path of ignore file
  • --no-ignore β€” disable use of ignore files and patterns
  • --ignore-pattern [String] β€” pattern of files to ignore (in addition to those in .eslintignore)

πŸ“ Using stdin πŸ“

  • --stdin β€” lint code provided on <STDIN> β€” default: false
  • --stdin-filename String β€” specify filename to process STDIN as

πŸ’€ Handling warnings πŸ’€

  • --quiet β€” report errors only β€” default: false. sorry to the warnings, they're being silenced πŸ™ˆ
  • --max-warnings Int β€” number of warnings to trigger nonzero exit code β€” default: -1

🌈 Output 🌈

  • -o, --output-file path::String β€” specify file to write report to
  • -f, --format String β€” use a specific output format β€” default: stylish
  • --color, --no-color β€” force enabling/disabling of color

⭐ Inline configuration comments ⭐

  • --no-inline-config β€” prevent comments from changing config or rules
  • --report-unused-disable-directives β€” adds reported errors for unused eslint-disable directives

πŸŽ€ Caching πŸŽ€

  • --cache β€” only check changed files β€” default: false
  • --cache-file path::String β€” path to the cache file. Deprecated: use --cache-location β€” default: .eslintcache
  • --cache-location path::String β€” path to the cache file or directory

πŸ‘‘ Miscellaneous πŸ‘‘

  • --init β€” run config initialization wizard β€” default: false
  • --debug β€” output debugging information
  • -h, --help β€” show help
  • -v, --version β€” output the version number
  • --print-config path::String β€” print the configuration for the given file
ngl bestie, that --cache-file one is deprecated, so maybe slide over to --cache-location instead πŸ‘€

that's the whole page, no cap πŸ’– tysm for reading, go lint something and slay ✨ this was eslint v6.4.0, dated June 2024 β€” mwah, periodt πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from