Skip to content

vanillaes/lint-es

Repository files navigation

Lint-ES

🧹 Modern linting for ECMAScript Modules based on StandardJS 🧹

GitHub Release NPM Weekly Downloads JSR Weekly Downloads JSR Score Latest Status Release Status

Features

  • No Configuration. No .eslint* files to manage.
  • Pre-loaded with the NeoStandard ruleset for clean JavaScript code and styling.
  • Configured with the eslint-plugin-jsdoc ruleset for linting JSDoc comments.
  • The following are ignored by default: node_modules/, coverage/, vendor/, *.min.js, and hidden files.
  • Files included in .gitignore will be ignored as well.
  • Automatically correct linting issues using lint-es --fix.

Note: NeoStandard is a ESLint v9.x+ ruleset. Successor to StandardJS.

lint-es

Arguments

lint-es [...options] [files...]

  • [files] - File(s)/glob(s) to lint (default **/*.js)
  • --cwd - Current working directory
  • --fix - Automatically fix problems
  • --ignore - File(s)/glob(s) to ignore

Usage

# lint the source
lint-es

```sh
# lint the source (matching a different file(s))
lint-es '**/*.mjs'

# lint the source (change the root)
lint-es --cwd src/

# lint the source (automatically fix issues)
lint-es --fix

# lint the source (ignore files)
lint-es --ignore test1/,test2/**/*

Note: In Linux/OSX, matcher patterns must be delimited in quotes.

Configuration

Project-level config can be defined in package.json

package.json

{
  "lint" {
    "files": [ "**.*.mjs" ],
    "fix": true,
    "ignore": [ "test/**.*" ]
  }
}

Note: Configuration defined in the command-line will take precedence over package.json configuration.

About

Modern linting for ECMAScript Modules

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors