Skip to content

lints-js

See the source

The core stylistic config block. This is where the magic happens — all formatting rules in one composable unit.

RuleDefault
SemicolonsNone (ASI)
QuotesDouble
Indent2 spaces
Arrow parensAs needed
Brace style1TBS
Keyword spacingNo space after if, for, while, etc.
Object spacingNo internal spaces: {a: 1}
Blank linesRequired after control statements
Max line length80 characters
Trailing commasNone
ConsoleWarn
["src/**/*.{js,mjs,cjs}"]
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.

Array of glob patterns for files to exclude.

Number of spaces for indentation. Default: 2.

Maximum line length. Default: 80.

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.