lints-js
The core stylistic config block. This is where the magic happens — all formatting rules in one composable unit.
What it enforces
Section titled “What it enforces”| Rule | Default |
|---|---|
| Semicolons | None (ASI) |
| Quotes | Double |
| Indent | 2 spaces |
| Arrow parens | As needed |
| Brace style | 1TBS |
| Keyword spacing | No space after if, for, while, etc. |
| Object spacing | No internal spaces: {a: 1} |
| Blank lines | Required after control statements |
| Max line length | 80 characters |
| Trailing commas | None |
| Console | Warn |
Default file patterns
Section titled “Default file patterns”["src/**/*.{js,mjs,cjs}"]Options
Section titled “Options”uglify({ with: ["lints-js"], options: { "lints-js": { files: ["src/**/*.js", "lib/**/*.js"], ignores: ["src/generated/**"], indent: 4, maxLen: 120, overrides: { "no-console": "off", }, }, },})Array of glob patterns for files this config applies to.
ignores
Section titled “ignores”Array of glob patterns for files to exclude.
indent
Section titled “indent”Number of spaces for indentation. Default: 2.
maxLen
Section titled “maxLen”Maximum line length. Default: 80.
overrides
Section titled “overrides”An object of ESLint rule overrides. These are merged on top of the default rules, so you can tweak individual rules without losing the rest.